Add option to automatically remove unused dependency packages #40

Closed
af123 wants to merge 1 commits from autoremove into master
Owner

Idea courtesy of prpr, but implemented as an advanced option.
(we can discuss what the default value for the option should be!)

Idea courtesy of prpr, but implemented as an advanced option. (we can discuss what the default value for the option should be!)
af123 added 1 commit 2021-02-24 15:08:30 +00:00
prpr requested changes 2021-02-24 16:56:45 +00:00
prpr left a comment
Owner

Looks good to me.
One thing I would change though is to put the word "dependent" in there, to avoid
panicking folk that things they haven't used for a while are automatically going to
get deleted:
"Automatically remove unused dependent packages" or
"Automatically remove unneeded dependent packages"
but it's getting a bit long. Perhaps just:
"Automatically remove dependent packages"

I would also have the default as 1 not 0.
If package X installs "a whole lotta libs" on installation, I think most users would
expect "a whole lotta libs" to get uninstalled when package X is.

Looks good to me. One thing I would change though is to put the word "dependent" in there, to avoid panicking folk that things they haven't used for a while are automatically going to get deleted: "Automatically remove unused dependent packages" or "Automatically remove unneeded dependent packages" but it's getting a bit long. Perhaps just: "Automatically remove dependent packages" I would also have the default as 1 not 0. If package X installs "a whole lotta libs" on installation, I think most users would expect "a whole lotta libs" to get uninstalled when package X is.
Author
Owner

Done in fc3b28e978
Incorporated both things - wording and default.

Done in fc3b28e9780e6cd92aee8937820351cdc13361b5 Incorporated both things - wording and default.
af123 closed this pull request 2021-02-24 18:15:54 +00:00
Contributor

A possible issue is that some of the dependent packages could be useful in their own right.

For example uninstalling detectads could cause the removal of the ir package

detectads depends on chaseget which depends on ir

It might be better (but more work) to only auto remove Advanced packages

I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed.

A possible issue is that some of the dependent packages could be useful in their own right. For example uninstalling detectads could cause the removal of the ir package detectads depends on chaseget which depends on ir It might be better (but more work) to only auto remove Advanced packages I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed.
Owner

I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed.

opkg knows the difference.
If ir was installed manually, then detactads was installed and subsequently removed, then only chaseget would get uninstalled, leaving ir intact.
If the user really wanted ir and it had been installed as a dependency rather than manually, then they would soon reinstall it manually if it got removed.

> I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed. opkg knows the difference. If *ir* was installed manually, then *detactads* was installed and subsequently removed, then only *chaseget* would get uninstalled, leaving *ir* intact. If the user really wanted *ir* and it had been installed as a dependency rather than manually, then they would soon reinstall it manually if it got removed.
Contributor

I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed.

opkg knows the difference.
If ir was installed manually, then detactads was installed and subsequently removed, then only chaseget would get uninstalled, leaving ir intact.
If the user really wanted ir and it had been installed as a dependency rather than manually, then they would soon reinstall it manually if it got removed.

Good, I withdraw my suggestion

> > I assume it would be difficult to tell if a package was initially installed as a dependency or had been manually installed. > > opkg knows the difference. > If *ir* was installed manually, then *detactads* was installed and subsequently removed, then only *chaseget* would get uninstalled, leaving *ir* intact. > If the user really wanted *ir* and it had been installed as a dependency rather than manually, then they would soon reinstall it manually if it got removed. > Good, I withdraw my suggestion
prpr deleted branch autoremove 2022-03-26 10:11:31 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hummypkg/webif#40
No description provided.