diff --git a/pym/calculate/lib/cl_template.py b/pym/calculate/lib/cl_template.py index 089518c..f461a38 100644 --- a/pym/calculate/lib/cl_template.py +++ b/pym/calculate/lib/cl_template.py @@ -3007,8 +3007,10 @@ class Template(_file, _terms, _warning, xmlShare, templateFormat, self.autoUpdateFiles = [] self.autoUpdateDirs = [] - self.protectedFiles = self.objVar.Get('main.cl_env_path') + \ - [self.functObj.fileConfigIni] + self.protectedFiles = [ + pathJoin(self._baseDir, x) + for x in self.objVar.Get('main.cl_env_path') + ] + [self.functObj.fileConfigIni] # список выполненных файлов self.executedFiles = [] @@ -3658,9 +3660,12 @@ gettext -d cl_template "$*" if category: pkgContents = PkgContents("{CATEGORY}/{PF}".format( **category[0]), prefix=chrootPath) + protected = [] for filename, action in self.changedFiles.getPkgFiles(pkg): - if filename in self.protectedFiles: + origFn = pkgContents.origFileName(filename) + if origFn in self.protectedFiles: pkgContents.removeObject(filename) + protected.append(origFn) continue if action in (ChangedFiles.FILE_MODIFIED, ChangedFiles.DIR_CREATED, @@ -3670,7 +3675,7 @@ gettext -d cl_template "$*" ChangedFiles.DIR_REMOVED): pkgContents.removeObject(filename) files = set(map(lambda x: pathJoin(chrootPath, x), - pkgContents.content.keys())) + pkgContents.content.keys()) + protected) if (self.objVar.Get('cl_dispatch_conf') != 'usenew' and self.objVar.Get('cl_autoupdate_set') != "on"): notUpdate = files - set(self.autoUpdateFiles) diff --git a/pym/calculate/lib/utils/content.py b/pym/calculate/lib/utils/content.py index 3e0e91a..9fee03b 100644 --- a/pym/calculate/lib/utils/content.py +++ b/pym/calculate/lib/utils/content.py @@ -110,6 +110,9 @@ class PkgContents: return filename[len(self.prefix):] return filename + def origFileName(self, filename): + return self.reCfg.sub("/", filename) + def removeObject(self, filename): filename = self._fixNameByPrefix(filename) filename = self.reCfg.sub("/", filename)