On 25/01/11 23:03, Dan McGee wrote:
On Thu, Jan 20, 2011 at 12:20 PM, Florian Pritz
<[email protected]>  wrote:
On 19.01.2011 19:29, Dan McGee wrote:
On Wed, Jan 19, 2011 at 11:13 AM, Florian Pritz<[email protected]>  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.

Anyone else want to offer an opinion on this? I'd like to reverse the
two options to match what we do elsewhere- -d will now just ignore
versions, -dd everything.


That seems reasonable. With -d getting stricter in terms of dependency checks, there should not be any issues caused by this change going unnoticed by people who currently using -d.

Allan

Reply via email to