diff --git a/client/equoTools.py b/client/equoTools.py index 0a0aa31b0..83c4e8224 100644 --- a/client/equoTools.py +++ b/client/equoTools.py @@ -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: diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 84820203c..7f8ab2198 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -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"):