[pacman-dev] [PATCH 3/5] add -dd option

Florian Pritz bluewind at server-speed.net
Thu Jan 20 13:20:36 EST 2011


On 19.01.2011 19:29, Dan McGee wrote:
> On Wed, Jan 19, 2011 at 11:13 AM, Florian Pritz <bluewind at xssn.at> wrote:
>> -dd ignores only the version of a dependency being checked, but not the
>> package itself.
>
> I don't mind this, but it just seems...backwards. Specifying more
> flags should make it less-restrictive, not more restrictive, but I
> understand the desire to keep backward compatibility. With that said,
> does it matter? People that use -d very often are usually screwing
> their system or know what they are doing- should we make -d just skip
> versions and -dd skip everything?

>> >  static int parsearg_trans(int opt)
>> >  {
>> > +       static int nodeps = 0;
>> >        switch(opt) {
>> > -               case 'd': config->flags |= PM_TRANS_FLAG_NODEPS; break;
>> > +               case 'd':
>> > +                       nodeps++;
>> > +                       if(nodeps == 1) {
>> > +                               config->flags |= PM_TRANS_FLAG_NODEPS;
>> > +                       } else if(nodeps == 2) {
>> > +                               config->flags ^= PM_TRANS_FLAG_NODEPS;
>> > +                               config->flags |= PM_TRANS_FLAG_NODEPVERSION;
>> > +                       }
>> > +                       break;
> You can do this without a static local; look at "case 's'" in parsearg_remove().

I'll wait for a decision about -d and -dd before fixing that.

-- 
Florian Pritz -- {flo,bluewind}@server-speed.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/pacman-dev/attachments/20110120/64e77554/attachment.asc>


More information about the pacman-dev mailing list