/etc/zypp/locks: Allow to specify edition ranges with solvable:name and dependencies
authorMichael Andres <ma@suse.de>
Tue, 20 Apr 2010 13:49:19 +0000 (15:49 +0200)
committerMichael Andres <ma@suse.de>
Tue, 20 Apr 2010 13:49:19 +0000 (15:49 +0200)
- e.g 'solvable_name: zypper <= 1.2.8'

zypp/PoolQuery.cc

index 3a49497..628020f 100644 (file)
@@ -1214,7 +1214,17 @@ attremptycheckend:
         string s = attrName;
         str::replaceAll( s,"_",":" );
         SolvAttr a(s);
-        addAttribute(a,attrValue);
+       if ( a == SolvAttr::name || isDependencyAttribute( a ) )
+       {
+         Capability c( attrValue );
+         CapDetail d( c );
+         if ( d.isVersioned() )
+           addDependency( a, d.name().asString(), d.op(), d.ed() );
+         else
+           addDependency( a, attrValue );
+       }
+       else
+         addAttribute( a, attrValue );
       }
 
     } while ( true );