From 5dec7587e2c951c8faa850101d685ccdf7ea2af4 Mon Sep 17 00:00:00 2001 From: yaokai13 Date: Thu, 3 Dec 2020 11:51:38 +0800 Subject: [PATCH] creat latest_rpm dir --- core/save.py | 3 ++- core/update_obs_repos.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/save.py b/core/save.py index 75edae6..5553690 100644 --- a/core/save.py +++ b/core/save.py @@ -105,7 +105,8 @@ class SaveInfo(object): datestr_root_path = os.path.join(self.obs_pkg_rpms_files_dir, branch_name) if not os.path.exists(datestr_root_path): os.makedirs(datestr_root_path) - with open("%s.csv" % datestr_root_path, "w") as f: + latest_rpm_file = os.path.join(self.obs_pkg_rpms_files_dir, "latest_rpm,", "%s.csv" % branch_name) + with open(latest_rpm_file, "w") as f: f_csv = csv.writer(f) file_list = os.listdir(datestr_root_path) prj_list = self.branch_prj[branch_name].split(" ") diff --git a/core/update_obs_repos.py b/core/update_obs_repos.py index 8e5e06c..9575bd7 100755 --- a/core/update_obs_repos.py +++ b/core/update_obs_repos.py @@ -62,8 +62,8 @@ class RPMManager(object): self.obs_pkg_rpms_files_dir = None self._download_obs_pkg_rpms_file(self.obs_pkg_rpms_url, self.kwargs["gitee_user"], \ self.kwargs["gitee_pwd"]) - self.obs_pkg_rpms_file = os.path.join(self.obs_pkg_rpms_files_dir, "%s_%s.yaml" \ - % (self.obs_project.replace(":", "-"), self.arch)) + self.obs_pkg_rpms_file = os.path.join(self.obs_pkg_rpms_files_dir, "latest_rpm", \ + "%s_%s.yaml" % (self.obs_project.replace(":", "-"), self.arch)) self.get_old_rpms_list_from_file(self.obs_pkg_rpms_file) def _set_rpms_to_repo(self): -- Gitee