FS#3241 - pacman wishlist (1/4): Option to fake %REASON% when --add'ing packages.
Attached to Project:
Pacman
Opened by Mark Rosenstand (mrose) - Wednesday, 28 September 2005, 00:06 GMT
Last edited by Dan McGee (toofishes) - Sunday, 15 July 2007, 16:54 GMT
Opened by Mark Rosenstand (mrose) - Wednesday, 28 September 2005, 00:06 GMT
Last edited by Dan McGee (toofishes) - Sunday, 15 July 2007, 16:54 GMT
|
Details
This is handy, for example, if you're installing
$makedepend'ed packages
or a chain of home made packages (e.g., libgalago in order to install galago-daemon) and don't want the dependencies to be kept after removing. |
This task depends upon
Closed by Dan McGee (toofishes)
Sunday, 15 July 2007, 16:54 GMT
Reason for closing: None
Additional comments about closing: Outdated, fixed twice, see bug 7193 .
Sunday, 15 July 2007, 16:54 GMT
Reason for closing: None
Additional comments about closing: Outdated, fixed twice, see
From some of the feedback I've gotten on this request, it seems I haven't been clear enough.
What the option should do is to set %REASON% to 1 (i.e. installed as a dep) when installing a package, whether the package(s) is explicitly installed or not. This helps keeping track on dependencies (for later system cleaning) when using -A to install packages, but can also be handy if you want to install a package temporarily and won't have to remember to remove it manually later (see 3242 for how this should be done).
When a pkg is installed using pacman -A it cannot later be removed as dependency using pacman -Rs. However, an extra option for -A could allow you to fake %REASON% as "installed as a dependency for another package" rather than "explicitly installed" which should result in pacman picking up the reverse dep during pacman -Rs.
Also, as far as I can tell, no problems should arise if another pkg comes to depend on the "faked" install as pacman would refuse to remove it anyway for dep reasons further up another branch, as normal, but could still be removed with pacman -Rsc.
gensync and makepkg -s and makepkg -r are still the BEST way to do avoid the need for this functionality but I can see how this would help in the tiny minority of cases that -A ALREADY exists to account for.
for example:
# makepkg -Ss
Targets: pth-2.0.7-1 gnupg-1.4.7-1 libksba-1.0.0-1 libassuan-1.0.0-1
pinentry-0.7.2-3 dirmngr-0.9.6-1 gnupg2-2.0.4-1 gpgme-1.1.4-1
(dependencies were not removed)
# sudo pacman -U ~/packages/gpa-0.7.6-1-i686.pkg.tar.gz
# sudo pacman -Rs gpa
Targets: gpa
This is the current behaviour.
If it will be:
Targets: pth-2.0.7-1 gnupg-1.4.7-1 libksba-1.0.0-1 libassuan-1.0.0-1
pinentry-0.7.2-3 dirmngr-0.9.6-1 gnupg2-2.0.4-1 gpgme-1.1.4-1
gpa
Then there will be no need for special option for %REASON% spoofing.
Any objections against this change in dependency removing?
Maybe I did miss something?
1) this suppose you set up Sudo,
2) I don't see how this is different from adding a kind of --oneshot option to pacman directly given that makepkg use pacman
2) instead of adding yet another option this solution makes existing one behave more logically (and do what it states).
if you mess things up with a given package, you might want to reinstall it, but if it's a dependency, you do not want to become explicitely installed...
=> to make -Rs to skip explicitly installed depends,
but
=> to have a way to install a package (or reinstall) a package without it to be set as "explicitely installed"
I don't know may something like %REQUIREDBY% dummy...
Isn't that the undocumented -D command that was used by makepkg until recently?
As for my proposal about -Rs change to more correct behaviour - maybe I should create a separate FR?
Any objections on closing this FR then?
I finally find that bar is crappy and bloated, and so I want to remove it, as well as all the deps that were installed during bar install,
that is foo1, foo2, ..., foo100, but not foo (which was explicitly installed some times before), because I need that one :)
Note : I don't use this option, I only install packages, don't remove any (or nearly) ;)
But I still find it interesting, and some (many?) people use it.