FS#4191 - pacman -Su --dryrun type option

Attached to Project: Pacman
Opened by Aaron Bull Schaefer (elasticdog) - Saturday, 18 March 2006, 17:03 GMT
Last edited by Dan McGee (toofishes) - Friday, 24 August 2007, 01:21 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

It has come up a few times in the forums, and it would be helpful if pacman had the ability to list what packages would be upgraded if you were to do a full 'pacman -Syu'. Much like Gentoo's 'emerge --pretend', or DarwinPorts 'port outdated', it could be useful in a number of ways...

As it is now, you have to be root in order to see a list of new upgrades, and by default, hitting the <Enter> key will choose 'Y' and install all of the new packages. That can be a fairly dangerous as it's an easy mistake to hit the <Enter> before you're ready to mess with doing a large upgrade (like new kernels, xorg, etc.). Having a separate option could eliminate the need to worry and would even allow the listings to be incorporated into scripts and whatnot that wouldn't necessarily have root access.

Not only that, but the flag could be used to give more detailed information than what the current method does, like what version of the package you currently have, and what version you would upgrade to. I would imagine it would work best with one package per line (easy to grep) and look something like this:

ruby 1.8.3-1 --> ruby 1.8.4-1
gimp 2.2.10-1 --> gimp 2.2.10-2

For more information, see this forum thread: http://bbs.archlinux.org/viewtopic.php?t=19750
This task depends upon

Closed by  Dan McGee (toofishes)
Friday, 24 August 2007, 01:21 GMT
Reason for closing:  Implemented
Additional comments about closing:  implemented in 3.0.X releases
Comment by Jeff Mickey (codemac) - Monday, 08 May 2006, 05:43 GMT
I'll go ahead and say I would like this as well.
Comment by John (Acid7711) - Monday, 18 December 2006, 02:54 GMT
Honestly, I'm really surprised more people haven't responded to this. I myself coming directly from Gentoo miss this feature a LOT. I used it all the time. I would love to see something like adding a 'pretend' feature into pacman happen. I'd use it a lot. Thanks for your consideration.
Comment by Roman Kyrylych (Romashka) - Monday, 18 December 2006, 09:54 GMT
well, some of functionality can be done when doing pacman -Syu and then pressing "n". ;)
But yes, this feature request aims to bring more functionality.
Comment by John (Acid7711) - Thursday, 21 December 2006, 06:43 GMT
Sure, sometimes that works, however there are sometimes where installing a package where pacman goes ahead and just upgrades without consent or much of any information being displayed. Maybe I'm the only one who's noticed this. :)
Comment by Jeff Forcier (bitprophet) - Saturday, 30 December 2006, 02:55 GMT
I, too, think this sort of extra info/feedback from pacman is a vital part of a package manager. Emerge is probably the farthest ahead in this arena, in my experience, and especially since a lot of Archers seem to come from Gentoo, it's a "feature" the lack of which will only generate more complaints in the future.
Comment by Aaron Griffin (phrakture) - Friday, 26 January 2007, 16:37 GMT
Silly question... how about kinda reusing an option here:
pacman -Slu

-l, --list is "list packages". To me this says "sync, list, upgrade" or "list packages for upgrade", but that might not be that intuitive... opinions?

And yeah, something like this should be fairly easy to implement, but it's not critical right now
Comment by Aaron Bull Schaefer (elasticdog) - Friday, 26 January 2007, 21:41 GMT
I see what you're saying with the --list option, but don't think it would be very intuitive. If I see an -Su together, I would assume it will actually upgrade the packages, and -Slu would list things in a different manner than what you'd expect from running something like a -Ql. I think one of the other options would be more semantic and to the point. I imagine the command would fit under the -Q functionality since you are really wanting information about the packages that are currently on your system, not the ones in the repository. If you don't like the terminology, it could be something like -Qu too keep in parallel with the -Su option, and would stand for "query for upgrades". Plenty of ways to go with it, but I'd have to say the list option isn't real clear for me.
Comment by Aaron Griffin (phrakture) - Friday, 26 January 2007, 21:59 GMT
Oh, I like -Qu.

I'll use that. I'll try and get this in cvs this weekend.
Comment by Dan McGee (toofishes) - Sunday, 19 August 2007, 22:01 GMT
Problem that I noted with 3.0.X releases- pacman -Qu isn't always the same as pacman -Su, it seems to miss pulling in a lot of the dependencies. We should work that out before we close this bug report, or at least open a new one to address that issue.

Here is an example:

dmcgee@dublin ~
$ pacman -Qu
Checking for package upgrades...

Targets: cpio-2.9-1 docbook-xsl-1.73.0-1 ed-0.8-1 glib2-2.14.0-3
graphviz-2.14-2 gtk2-2.10.14-3 intltool-0.36.1-1 kdelibs-3.5.7-5
libarchive-2.2.6-1 man-pages-2.64-1 pciutils-2.2.6-1
readline-5.2-3 xterm-229-1

Total Package Size: 35.63 MB

$ sudo pacman -Su
:: Starting full system upgrade...
resolving dependencies... done.
looking for inter-conflicts... done.

Targets: cpio-2.9-1 docbook-xsl-1.73.0-1 ed-0.8-1 glib2-2.14.0-3
gd-2.0.35-1 graphviz-2.14-2 gtk2-2.10.14-3 intltool-0.36.1-1
kdelibs-3.5.7-5 libarchive-2.2.6-1 man-pages-2.64-1
pciutils-2.2.6-1 readline-5.2-3 xterm-229-1

Total Package Size: 35.80 MB

Loading...