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
Task Type Feature Request
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7 Wombat
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

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 .
Comment by Mark Rosenstand (mrose) - Saturday, 01 October 2005, 13:12 GMT
This should of course also be possible when -S'ing.

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).
Comment by dtw (dibblethewrecker) - Saturday, 01 October 2005, 13:23 GMT
OK - we just had a big discussion about this and the original request is not clear.

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.
Comment by samuel (samlt) - Thursday, 24 May 2007, 15:04 GMT
Couldn't we just have an option like --oneshot (some of you might recognise it...) for that purpose? This would be cleaner, and would avoid the trick mentionned above (makepkg -s and -r), and thus an uninstall & reinstall step (which became really annoying as soon as dependencies also have dependencies and so on..)
Comment by Roman Kyrylych (Romashka) - Thursday, 24 May 2007, 16:49 GMT
Wouldn't it be better to make -Rs really do what it says, independently of how dependencies were installed?
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?
Comment by samuel (samlt) - Thursday, 24 May 2007, 18:08 GMT
well
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
Comment by Roman Kyrylych (Romashka) - Thursday, 24 May 2007, 18:54 GMT
1) sudo is completely irrelevant here
2) instead of adding yet another option this solution makes existing one behave more logically (and do what it states).
Comment by samuel (samlt) - Friday, 25 May 2007, 10:21 GMT
an other reason it would be usefull to have this option in pacman instead of a workaround with makepkg:

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...
Comment by Aaron Griffin (phrakture) - Friday, 25 May 2007, 16:13 GMT
I actually like roman's idea. I don't see a reason for -Rs to skip explicitly installed depends, really.
Comment by samuel (samlt) - Friday, 25 May 2007, 16:19 GMT
actually the point wasn't
=> 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...
Comment by Roman Kyrylych (Romashka) - Wednesday, 30 May 2007, 19:08 GMT
After reading http://bugs.archlinux.org/task/7193 I've realized that the original proposal (at least for -A/-U way of installing) was already implemented long time ago!
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?
Comment by Xavier (shining) - Friday, 01 June 2007, 22:42 GMT
Say I installed foo package, which I use every day, then a while after, bar package, which requires foo, foo1, foo2, ..., foo100.
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.
Comment by Dan McGee (toofishes) - Monday, 18 June 2007, 17:44 GMT
Yes, this was the undocumented -D option. Thus the reason I hate undocumented options.

Loading...