[pacman-dev] [PATCH] Don't ask for install confirmation if no dependencies

Mike Smith mmiikkee13 at gmail.com
Fri Dec 28 21:37:32 EST 2007

Dan McGee wrote:
> On Dec 28, 2007 7:16 PM, Scott Horowitz <stonecrest at gmail.com> wrote:
>> On Dec 28, 2007 2:19 PM,  <mmiikkee13 at gmail.com> wrote:
>>> This is a patch to make Pacman only ask for confirmation if anything
>>> different from what the user requested (i.e. dependencies) is going to
>>> be installed. Since the user took the time to type out "pacman -Sy
>>> foo", they obviously did want foo installed, and it really wouldn't
>>> make sense to ask them this again unless something else will be
>>> installed.
>> I like this. It's akin to the fact that pacman -R foo doesn't prompt you.
>> (How crazy is that? Removing a package doesn't prompt you but
>> installing a package does.)
> -R never resolves dependencies.
> -A/-U never resolve dependencies.
> -S *does* resolve dependencies. Thus the difference.
> I like the idea, although I may disagree that people expect it to be
> installed immediately instead of getting confirmation. Did you test
> this in the replaces case? Something like pkgA replaces pkgB, you have
> pkgB installed, and you run 'pacman -S pkgA'. I'd be caught awfully
> off guard if pacman just went ahead in this case, but the target list
> wouldn't grow so I'm guessing your patch would have unintended
> consequences here.
> Thoughts from the rest of the crew?
> -Dan
> _______________________________________________
> pacman-dev mailing list
> pacman-dev at archlinux.org
> http://archlinux.org/mailman/listinfo/pacman-dev

Good point - I didn't think about that. I just quickly read through some 
of the pacman code before doing this - I still don't completely 
understand it. If there's an alpm_list_compare or something like that, 
that would be better. But that's a job for someone else, as I'd probably 
break something :-)

(Just a note: I tested this with a package with no deps, 2 packages with 
no deps, a package with deps and a package without, and a package with 
deps. I didn't even think of replacements.)

More information about the pacman-dev mailing list