diff --git a/core/save.py b/core/save.py index 75edae6bf9b536a0dbe4ca86c712c17064f122b4..5553690a710d6940bc267beef04fc4f69d2610f1 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 8e5e06c60e04bcf126bd740ddc783da7d3dc048b..9575bd737fa1fedb903079710def82c3ed453d77 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):