You are not logged in.

#1 2006-03-17 16:30:43

fatius
Member
Registered: 2006-03-17
Posts: 4

pacman --pretend or something similiar?

I'm sure this gets asked all the time, but I can't find any reference to it in the wiki, forums, website, google, etc.

Is there way to get pacman to tell you what it would try to install without really trying... like gentoo's: emerge --pretend.

Thanks a lot.

Offline

#2 2006-03-17 16:53:32

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: pacman --pretend or something similiar?

Most of the time people always reply to just do <code>pacman -Syu</code> and then answer no once the package list comes up, but agree with you that there should be an option to do a dry run...that way you won't accidentally install stuff if you should happen to hit <code><ENTER></code> by mistake.  I just never had the guts to bring it up myself  big_smile

Offline

#3 2006-03-17 18:52:44

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: pacman --pretend or something similiar?

Stick a feature request on the bugtracker - it might get into a future release.

Offline

#4 2006-03-17 23:35:24

Cam
Member
From: Brisbane, Aus
Registered: 2004-12-21
Posts: 658
Website

Re: pacman --pretend or something similiar?

I never thought it was needed, if you try to install something it'll always list the packages to be installled and ask your for Y/N, is that not what emerge -va does?

Offline

#5 2006-03-17 23:39:09

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: pacman --pretend or something similiar?

whats wrong with answering "no" after a pacman -S <pkg> ??
If its more work then consider the extra dash and letters to type out --pretend

Offline

#6 2006-03-17 23:40:57

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: pacman --pretend or something similiar?

It would probably be implemented as -p as well as --pretend.

(FWIW, I don't think it's really necessary. On the other hand, I doubt it would be hard to implement... Still, better to let the maintainers alone in this case I think.)

Offline

#7 2006-03-18 06:14:18

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: pacman --pretend or something similiar?

I think it's better than just saying no for a couple of reasons...one it could potentially be run without root access (like <code>pacman -Ss</code> is now), and also it would prevent you from accidentally upgrading when you weren't ready to do so.  Right now, if you happen to hit <code><ENTER></code> at the prompt, it will choose yes by default and install the packages. Having the ability to see what needs upgrading before hand could prevent mistakes.  It could even be in a format that gives you a little more information like what your current version is and what it will go to:

ruby 1.8.3-1 --> ruby 1.8.4-1

If you're familiar with DarwinPorts (a package management system for OS X), they use a syntax that's fairly parallel to pacman, but add the option to do something similar to this with: <code>port outdated</code>.  Anyway, I could see a lot of use for it...

Offline

#8 2006-03-18 12:14:03

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,982

Re: pacman --pretend or something similiar?

I agree this would be useful.

I tend to check carefully what -Syu wants to upgrade, and if there are things in the list like a new kernel/xorg/kde i usually do the other updates first before applying those.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#9 2006-03-18 15:01:40

jaboua
Member
Registered: 2005-11-05
Posts: 634

Re: pacman --pretend or something similiar?

elasticdog wrote:

it would prevent you from accidentally upgrading when you weren't ready to do so

Control-C. I think it's unnecesarry too. About priveleges, you have to be root to upgrade anyway - so if you're not sure if you want to  upgrade, you can watch the list through "su -c" or sudo and avoid the extra step of re-running pacman in case you want to install the updates. If not, press N as said.

Offline

#10 2006-03-18 15:23:10

fatius
Member
Registered: 2006-03-17
Posts: 4

Re: pacman --pretend or something similiar?

It's not the same as canceling out of a "-S"... First of all, you wouldn't need to be root to do it. Second, sometimes pacman -S doesn't tell you what you need to know until after you say "Y" ...

For example on "pacman -S kde" it will tell you that it's going to install "arts" and "kde-common,"  I'd like to know what version it wants to install, etc.

Right now, I do "sudo pacman -S kde," then say "Y," then cancel when it tells me what is going on... not the ideal solution.

I agree that it's not real important, but I was just asking if there was a way to do it.

Offline

#11 2006-03-18 17:04:54

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: pacman --pretend or something similiar?

Added a feature request to flyspray...

Offline

#12 2006-03-18 17:19:14

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: pacman --pretend or something similiar?

Another couple of points...if there were one package listed per line, it would be easy to grep, which in turn could make it easier to do scripting with the information (you could make custom adesklets, send yourself emails on important upgrades, etc.).  It would also give a quick way to check on people's setup when they ask questions in the forum (i.e. we could just ask them to run <code>pacman -Su --pretend | grep perl</code>), or it could even have the ability to check on individual packages: <code>pacman -S --pretend perl</code>.

I equate it with something like <code>tar --diff</code>...by some people's arguments, why would anyone need it if they could just do <code>tar --list</code> and see what's in there, or watch during the unpacking and hit <code>Ctrl-C</code> if they saw something they didn't like?  Why would any command line programs have a dryrun option?

Anyway, that's my $0.02, and I guess it's in the dev's court now...

Offline

#13 2006-03-18 18:16:58

fatius
Member
Registered: 2006-03-17
Posts: 4

Re: pacman --pretend or something similiar?

Thanks for making that feature request elasticdog. Also, I totally agree with making it more scriptable. That would be incredibly useful.

Offline

#14 2006-05-08 05:42:37

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: pacman --pretend or something similiar?

I think this would be useful as well.  I don't update like I used to on gentoo, so it would be neat to send myself an email every morning listing possible package upgrades.  I know you can do this with a little yes -n | pacman -Syu fun, but really, I think that it's a useful feature to be built in.

Offline

Board footer

Powered by FluxBB