From 0174e7ca608b8b53fa167446f8a729eda797da78 Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Fri, 30 Nov 2007 13:04:59 +0000 Subject: [PATCH] - 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 --- client/equoTools.py | 4 +++- libraries/databaseTools.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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"):