- fixed an issue with virtual packages matching

- fixed a small glitch with printing config_protect files

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@789 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
(no author)
2007-11-30 13:04:59 +00:00
parent 6d3bd5a608
commit 0174e7ca60
2 changed files with 6 additions and 3 deletions
+3 -1
View File
@@ -1171,11 +1171,13 @@ def installPackage(infoDict):
# request new tofile then
if (protected):
if tofile not in etpConst['configprotectskip']:
oldtofile = tofile
tofile, prot_status = allocateMaskedFile(tofile, fromfile)
if not prot_status:
protected = False
else:
oldtofile = tofile
if oldtofile.find("._cfg") != -1:
oldtofile = os.path.dirname(oldtofile)+"/"+os.path.basename(oldtofile)[10:]
equoLog.log(ETP_LOGPRI_INFO,ETP_LOGLEVEL_NORMAL,"Protecting config file: "+oldtofile)
print_warning(darkred(" ## ")+red("Protecting config file: ")+oldtofile)
else:
+3 -2
View File
@@ -3204,10 +3204,11 @@ class etpDatabase:
idpackage = result[1]
cat = self.retrieveCategory(idpackage)
cats.add(cat)
if (cat == mypkgcat) or ((not virtual) and (mypkgcat == "virtual")): # in case of virtual packages only (that they're not stored as provide)
if (cat == mypkgcat) or ((not virtual) and (mypkgcat == "virtual") and (cat == mypkgcat)): # in case of virtual packages only (that they're not stored as provide)
foundCat = cat
break
# if I found something at least...
# if I found something at least...
if (not foundCat) and (len(cats) == 1):
foundCat = list(cats)[0]
if (not foundCat) and (mypkgcat == "null"):