diff --git a/calculate/templates/template_processor.py b/calculate/templates/template_processor.py index 5af409c..fcd94c7 100644 --- a/calculate/templates/template_processor.py +++ b/calculate/templates/template_processor.py @@ -505,7 +505,7 @@ class TemplateWrapper: # Если целевой файл отсутствует. if self.target_path in self.target_package: # Проверка -- был ли файл удален. - # self.contents_matching = self.contents_matching + self.contents_matching = False pass else: self.contents_matching = True diff --git a/calculate/utils/package.py b/calculate/utils/package.py index 8020eee..bb72580 100644 --- a/calculate/utils/package.py +++ b/calculate/utils/package.py @@ -823,13 +823,13 @@ class Package: def add_sym(self, file_name, target_path=None, mtime=None): '''Метод для добавления в CONTENTS символьных ссылок.''' - file_name = self.remove_cfg_prefix(file_name) - real_path = file_name + + file_name = self.remove_cfg_prefix(file_name) file_name = self.remove_chroot_path(file_name) - if real_path == file_name: - real_path = join_paths(self.chroot_path, file_name) + if not real_path.startswith(self.chroot_path): + real_path = join_paths(self.chroot_path, real_path) if target_path is None: target_path = read_link(real_path)