[pacman-dev] [PATCH] '-Spp and -Supp' options were added to generate uri list without the downloaded package uris

Laszlo Papp djszapi2 at gmail.com
Wed Sep 2 13:29:41 EDT 2009


> > Instead of adding several options, wouldn't it be possible to let "-p"
> > accept a string argument with formatting information similar to the way
> > the date command works. This would be extensible in the future and
> > could include the following interpretted sequences (among others)
> >
> > %u - url
> > %n - pkgname
> > %v - pkgver-pkgrel
> > %s - size
> >
> > I don't know how difficult it would be to code but that seems the most
> > elegant to me, rather than hardcoding the output format and having to
> > worry about extensibility and breakage in the future.
> >
> > This might not make sense though in terms of "non-download" vs "all"
> > but as pointed out, "-yy" and "-cc" mean "all", so  "-pp" should too.
> > I'm not sure how the double flag would work with accepting an argument.
> > Maybe there should be an additional argument "--print-format" which
> > accepts the string, but then we're back to extra argument silliness
> > again (although that would enable "-p" to easily default to printing
> > URLs).
> >
> > As far as backwards compatibility with "--print-uris" goes, I would
> > suggest breaking it if a better solution is found. Holding back better
> > design because people can't slightly modify a few simple scripts is not
> > a valid justification imho.
> >
>
> hmm I think I like all these suggestions, I will give it a try :)
>
> It should indeed not break too much all scripts using -Sp. They might
> just need to switch to -Spp if they want all packages.
> and for a different output one could use -Sp or -Spp with an
> additional --print-format '%n'
> (then probably -p --print-uris needs to be renamed to -p --print)
>
>
1. Yeah, it's a good idea I think, I thought for something similar with -Si,
-Qi, to print out the given line with an option instead of the all, like -Si
--packager, --depends, etc..

2. -p --print doesn't seem so good for me, because it would be more talative
like -p --print-uris.

But in generally, it would be a good idea to keep -p option as a general
printer option with more suboption to it.


More information about the pacman-dev mailing list