[pacman-dev] [PATCH] Treat -Sc like an option

Dan McGee dpmcgee at gmail.com
Tue Mar 11 09:00:17 EDT 2008


2008/3/11 Nagy Gabor <ngaba at bibl.u-szeged.hu>:
>
> > On Mon, Mar 10, 2008 at 6:29 PM, Dan McGee <dpmcgee at gmail.com> wrote:
>  >
>  > > >  >From now on 'pacman -Sc target' will first clean the cache, then
>  > > install target...
>  > >
>  > > This seems sane, I'm just not sure how useful (or expected) this
>  > > behavior would be. Can you give a use case?
>  > >
>  > >
>  > I actually think this could cause confusion. A user could very well think
>  > that pacman is going to clean only the target package.
>  >
>  > Scott
>  >
>  To be honest, the main reason for this patch was to clean needs_transaction()
>  and needs_root() check. See:
>  http://www.archlinux.org/pipermail/pacman-dev/2008-March/011382.html
>  However, this wasn't just selfish:
>  * the current code also can be fooled easily:
>  -Sc needs root and clean cache
>  -Scg DOESN'T need root and [tries to] clean cache only
>  * We have no clear definition what will happen on pacman -Syucg foo (*)[this is
>  a syntactically correct command-line now], so imho this patch doesn't hurt
>  anything: users still should use 'pacman -Sc' "alone", but power-users can use
>  it in combination with -Su to clean-up cache (to get some disk space) and THEN
>  do a sysupgrade.
>  * answer to your fear: this won't be mentioned in manual and see (*): these
>  command-lines are already allowed with undefined result.

Well perhaps we should address the real problem then and find a better
way to allow/disallow options in combination with each other?

It scares me more to say "oh, the behavior is weird, so we aren't
going to even put it in the manpage".

-Dan




More information about the pacman-dev mailing list