fixed ignored .arch (bnc #561294)
authorJán Kupec <jkupec@suse.cz>
Sat, 30 Jan 2010 12:59:26 +0000 (13:59 +0100)
committerJán Kupec <jkupec@suse.cz>
Sat, 30 Jan 2010 12:59:26 +0000 (13:59 +0100)
src/install.cc
src/utils/misc.cc

index 324b05a..96886dd 100755 (executable)
@@ -642,7 +642,8 @@ void install_remove(Zypper & zypper,
 
 
     // is version specified?
-    by_capability = str.find_first_of("=<>") != string::npos;
+    if (!by_capability)
+      by_capability = str.find_first_of("=<>") != string::npos;
 
     // try to find foo-bar-1.2.3-2
     if (!by_capability && str.find('-') != string::npos)
index 42d2e0e..0068db5 100644 (file)
@@ -329,8 +329,11 @@ static string preparse_cap_str(const string & capstr, const string & arch)
     }
     if (!arch.empty())
       new_capstr.insert(op_pos, "." + arch);
-    DBG << "new capstr: " << new_capstr << endl;
   }
+  else if (!arch.empty())
+    new_capstr += "." + arch;
+
+  DBG << "new capstr: " << new_capstr << endl;
 
   return new_capstr;
 }