System cleanup?
Is your feature request related to a problem? Please describe.
Adding LibreOffice to the community-repository. The strategy is to deliver LibreOffice specific packages with it and dependencies common to other apps separately.
The package definition looks like this:
- &apps-libreoffice
category: "apps"
name: "libreoffice"
version: "7.2.5.2-r1+2"
labels:
emerge.jobs: "3"
emerge.packages: >-
app-office/libreoffice
atom: "app-office/libreoffice"
provides:
- category: "app-office"
name: "libreoffice"
version: ">=0"
- category: "app-office"
name: "libreoffice-l10n"
version: ">=0"
- category: "app-text"
name: "libnumbertext"
version: ">=0"
- category: "app-text"
name: "libstaroffice"
version: ">=0"
- category: "dev-cpp"
name: "libcmis"
version: ">=0"
- category: "dev-libs"
name: "liborcus"
version: ">=0"
- category: "dev-libs"
name: "libixion"
version: ">=0"
- category: "games-engines"
name: "box2d"
version: ">=0"
- category: "sys-devel"
name: "ucpp"
version: ">=0"
- category: "sci-libs"
name: "coinor-mp"
version: ">=0"
pre_reqs:
- app-text/libabw
- app-text/libebook
- app-text/libepubgen
- app-text/libetonyek
- app-text/libexttextcat
- app-text/liblangtag
- app-text/libmspub
- app-text/libmwaw
- app-text/libodfgen
- app-text/libqxp
- app-text/libwps
- app-text/mythes
- dev-cpp/clucene
- dev-db/mariadb-connector-c
# - dev-db/postgresql
- *layers-java-packages
- dev-java/ant-core
- dev-java/javatoolkit
# - dev-java/bsh
# - dev-java/rhino
- dev-util/mdds
- dev-libs/redland
- dev-libs/xmlsec
- dev-perl/Archive-Zip
- dev-util/cppunit
- media-gfx/fontforge
- media-libs/libfreehand
- media-libs/libpagemaker
- media-libs/libvisio
- media-libs/libzmf
- media-libs/zxing-cpp
- sci-mathematics/lpsolve
requires:
- <<: *layers-gnome-common
- <<: *layers-java
- <<: *libs-libabw
- <<: *libs-libebook
- <<: *libs-libepubgen
- <<: *libs-libetonyek
- <<: *libs-libexttextcat
- <<: *libs-liblangtag
- <<: *libs-libmspub
- <<: *libs-libmwaw
- <<: *libs-libodfgen
- <<: *libs-libqxp
- <<: *libs-libwps
- <<: *libs-mythes
- <<: *libs-clucene
- <<: *libs-mariadb-connector-c
# - <<: *apps-postgresql
- <<: *apps-ant-core
- <<: *apps-javatoolkit
# - <<: *libs-bsh
# - <<: *libs-rhino
- <<: *libs-mdds
- <<: *libs-redland
- <<: *libs-xmlsec
- <<: *libs-Archive-Zip
- <<: *libs-cppunit
- <<: *apps-fontforge
- <<: *libs-libfreehand
- <<: *libs-libpagemaker
- <<: *libs-libvisio
- <<: *libs-libzmf
- <<: *libs-lpsolve
build_requires:
- <<: *layers-gnome-common
libs/mariadb-connector-c | 3.1.13 | | mocaccino-community
libs/lpsolve | 5.5.2.0 | | mocaccino-community
libs/libzmf | 0.0.2 | | mocaccino-community
apps/libpagemaker | 0.0.4 | | mocaccino-community
libs/libqxp | 0.0.2 | | mocaccino-community
libs/colamd | 2.9.6 | | mocaccino-community
apps/libfreehand | 0.1.2 | | mocaccino-community
apps/libreoffice | 7.2.5.2-r1+2 | | mocaccino-community
libs/clucene | 2.3.3.4-r6 | | mocaccino-community
libs/raptor | 2.0.15-r4 | | mocaccino-community
libs/libodfgen | 0.1.8 | | mocaccino-community
libs/libexttextcat | 3.4.6 | | mocaccino-community
libs/libetonyek | 0.1.10+1 | | mocaccino-community
libs/ossp-uuid | 1.6.2-r6 | | mocaccino-community
libs/libebook | 0.1.3-r2+1 | | mocaccino-community
libs/libiodbc | 3.52.15 | | mocaccino-community
libs/mdds | 1.7.0 | | mocaccino-community
apps/fontforge | 20201107+3 | | mocaccino-community
libs/mhash | 0.9.9.9-r2 | | mocaccino-community
libs/cppunit | 1.15.1-r3 | | mocaccino-community
libs/suitesparseconfig | 5.4.0 | | mocaccino-community
layers/java | 11.0.14_p91+7 | | mocaccino-desktop
apps/javatoolkit | 0.6.7 | | mocaccino-community
libs/libmwaw | 0.3.21 | | mocaccino-community
libs/libepubgen | 0.1.1 | | mocaccino-community
libs/redland | 1.0.17-r2 | | mocaccino-community
libs/xmlsec | 1.2.33 | | mocaccino-community
libs/liblangtag | 0.6.3+1 | | mocaccino-community
libs/libvisio | 0.1.7+3 | | mocaccino-community
libs/libabw | 0.1.3+1 | | mocaccino-community
libs/libmspub | 0.1.4 | | mocaccino-community
libs/mythes | 1.2.4-r1 | | mocaccino-community
entity/postgres | 1 | | mocaccino-os-commons
libs/libwps | 0.4.12 | | mocaccino-community
libs/postgresql | 13.5-r1 | | mocaccino-community
libs/Archive-Zip | 1.680.0 | | mocaccino-community
apps/ant-core | 1.10.9-r3 | | mocaccino-community
@joostruis decided to add the dependencies to a layer. So, here comes the question:
Given the cases:
- when some needs removal of the packages that will were moved
- simply remove the package
- OS cleanup ... how can the system be cleaned up by removing those dependencies?
Also, when removing a list of packages that are dependent on each other, luet complains, so those packages must be removed gradually, in sets that have no dependent packages. This may become difficult.
Describe the solution you'd like
There is already oscheckoption to reinstall missing packages if found missing.
According to the repos definitions, and not from technical point of view (like ldconfig), are there options to:
- check for orphan packages that are not needed
- list those packages
- cleanup those packages by removing them
- check a list of packages to be removed that depend on each other and if no other dependent packages are found outside that list, to remove them
- ask/remove package dependencies that would become orphans at package removal?
If not, those are necessary features, IMO.
Describe alternatives you've considered
Additional context
The issue seems a bit broad. do you mean to enhance oscheck by giving out those information? or are you refering explicitly to the uninstall phase?
Did you tried with luet uninstall --full / luet uninstall --full-clean?
oscheck or another option.
--full or --full-clean return nothing when some, but not all, of the dependencies are common to more than one app.
Should be able to detect the ones not needed anymore by the specified packages and no other packages as well.