Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2021-10-27 22:21:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old) and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.1890 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openSUSE-release-tools" Wed Oct 27 22:21:14 2021 rev:341 rq:927654 version:20211026.f1790c67 Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2021-10-26 20:14:33.350037130 +0200 +++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.1890/openSUSE-release-tools.changes 2021-10-27 22:21:32.547209018 +0200 @@ -1,0 +2,12 @@ +Tue Oct 26 16:51:38 UTC 2021 - opensuse-releaset...@opensuse.org + +- Update to version 20211026.f1790c67: + * pkglistgen: Keep caching repo solv files but copy them away + +------------------------------------------------------------------- +Tue Oct 26 10:04:07 UTC 2021 - opensuse-releaset...@opensuse.org + +- Update to version 20211026.417c4e6d: + * pkglistgen: Skip relying on the global cache directory + +------------------------------------------------------------------- Old: ---- openSUSE-release-tools-20211026.802e0d64.obscpio New: ---- openSUSE-release-tools-20211026.f1790c67.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openSUSE-release-tools.spec ++++++ --- /var/tmp/diff_new_pack.pvoCbb/_old 2021-10-27 22:21:33.191209348 +0200 +++ /var/tmp/diff_new_pack.pvoCbb/_new 2021-10-27 22:21:33.191209348 +0200 @@ -20,7 +20,7 @@ %define source_dir openSUSE-release-tools %define announcer_filename factory-package-news Name: openSUSE-release-tools -Version: 20211026.802e0d64 +Version: 20211026.f1790c67 Release: 0 Summary: Tools to aid in staging and release work for openSUSE/SUSE License: GPL-2.0-or-later AND MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.pvoCbb/_old 2021-10-27 22:21:33.227209366 +0200 +++ /var/tmp/diff_new_pack.pvoCbb/_new 2021-10-27 22:21:33.227209366 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param> - <param name="changesrevision">802e0d64c05d297dfb9ee9407ba52ded4c9c79d5</param> + <param name="changesrevision">775f9a42a2fe05c0a508e8e1b4f85ce97a11245f</param> </service> </servicedata> ++++++ openSUSE-release-tools-20211026.802e0d64.obscpio -> openSUSE-release-tools-20211026.f1790c67.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20211026.802e0d64/pkglistgen/tool.py new/openSUSE-release-tools-20211026.f1790c67/pkglistgen/tool.py --- old/openSUSE-release-tools-20211026.802e0d64/pkglistgen/tool.py 2021-10-26 07:54:46.000000000 +0200 +++ new/openSUSE-release-tools-20211026.f1790c67/pkglistgen/tool.py 2021-10-26 18:50:44.000000000 +0200 @@ -57,7 +57,6 @@ self.unwanted = set() self.output = None self.locales = set() - self.did_update = False self.filtered_architectures = None self.dry_run = False self.all_architectures = None @@ -218,13 +217,11 @@ for project, reponame in self.repos: repo = pool.add_repo(project) - s = os.path.join(CACHEDIR, 'repo-{}-{}-{}.solv'.format(project, reponame, arch)) - r = repo.add_solv(s) - if not r: - if not self.did_update: - raise Exception( - 'failed to add repo {}/{}/{}. Need to run update first?'.format(project, reponame, arch)) - continue + # check back the repo state to avoid suprises + state = repository_arch_state(self.apiurl, project, reponame, arch) + s = f'repo-{project}-{reponame}-{arch}-{state}.solv' + if not repo.add_solv(s): + raise Exception('failed to add repo {}/{}/{}'.format(project, reponame, arch)) for solvable in repo.solvables_iter(): if ignore_conflicts: solvable.unset(solv.SOLVABLE_CONFLICTS) @@ -336,18 +333,47 @@ return 'devel package of ' + g.develpkgs[package] return None - def update_repos(self, architectures): + def update_one_repo(self, project, repo, arch, solv_file, solv_file_hash): + # Either hash changed or new, so remove any old hash files. + file_utils.unlink_list(None, glob.glob(solv_file + '::*')) + + d = os.path.join(CACHEDIR, project, repo, arch) + if not os.path.exists(d): + os.makedirs(d) + + self.logger.debug('updating %s', d) + # only there to parse the repos bs_mirrorfull = os.path.join(SCRIPT_PATH, '..', 'bs_mirrorfull') - global_update = False + args = [bs_mirrorfull] + args.append('--nodebug') + args.append('{}/public/build/{}/{}/{}'.format(self.apiurl, project, repo, arch)) + args.append(d) + with subprocess.Popen(args, stdout=subprocess.PIPE) as p: + for line in p.stdout: + self.logger.info(line.decode('utf-8').rstrip()) + if p.wait() != 0: + raise Exception("Mirroring repository failed") + + files = [os.path.join(d, f) + for f in os.listdir(d) if f.endswith('.rpm')] + suffix = f'.{os.getpid()}.tmp' + fh = open(solv_file + suffix, 'w') + p = subprocess.Popen( + ['rpms2solv', '-m', '-', '-0'], stdin=subprocess.PIPE, stdout=fh) + p.communicate(bytes('\0'.join(files), 'utf-8')) + fh.close() + if p.wait() != 0: + raise Exception("rpm2solv failed") + os.rename(solv_file + suffix, solv_file) + + # Create hash file now that solv creation is complete. + open(solv_file_hash, 'a').close() + + def update_repos(self, architectures): for project, repo in self.repos: for arch in architectures: - # TODO: refactor to common function with repo_checker.py - d = os.path.join(CACHEDIR, project, repo, arch) - if not os.path.exists(d): - os.makedirs(d) - # Fetch state before mirroring in-case it changes during download. state = repository_arch_state(self.apiurl, project, repo, arch) @@ -355,46 +381,18 @@ # Repo might not have this architecture continue + repo_solv_name = 'repo-{}-{}-{}.solv'.format(project, repo, arch) # Would be preferable to include hash in name, but cumbersome to handle without # reworking a fair bit since the state needs to be tracked. - solv_file = os.path.join(CACHEDIR, 'repo-{}-{}-{}.solv'.format(project, repo, arch)) + solv_file = os.path.join(CACHEDIR, repo_solv_name) solv_file_hash = '{}::{}'.format(solv_file, state) if os.path.exists(solv_file) and os.path.exists(solv_file_hash): # Solve file exists and hash unchanged, skip updating solv. self.logger.debug('skipping solv generation for {} due to matching state {}'.format( '/'.join([project, repo, arch]), state)) - continue - - # Either hash changed or new, so remove any old hash files. - file_utils.unlink_list(None, glob.glob(solv_file + '::*')) - global_update = True - - self.logger.debug('updating %s', d) - args = [bs_mirrorfull] - args.append('--nodebug') - args.append('{}/public/build/{}/{}/{}'.format(self.apiurl, project, repo, arch)) - args.append(d) - with subprocess.Popen(args, stdout=subprocess.PIPE) as p: - for line in p.stdout: - self.logger.info(line.decode('utf-8').rstrip()) - if p.wait() != 0: - raise Exception("Mirroring repository failed") - - files = [os.path.join(d, f) - for f in os.listdir(d) if f.endswith('.rpm')] - fh = open(solv_file, 'w') - p = subprocess.Popen( - ['rpms2solv', '-m', '-', '-0'], stdin=subprocess.PIPE, stdout=fh) - p.communicate(bytes('\0'.join(files), 'utf-8')) - fh.close() - if p.wait() != 0: - raise Exception("rpm2solv failed") - - # Create hash file now that solv creation is complete. - open(solv_file_hash, 'a').close() - self.did_update = True - - return global_update + else: + self.update_one_repo(project, repo, arch, solv_file, solv_file_hash) + shutil.copy(solv_file, f'./repo-{project}-{repo}-{arch}-{state}.solv') def create_weakremovers(self, target, target_config, directory, output): drops = dict() @@ -425,9 +423,12 @@ for arch in self.all_architectures: for project, repo in self.repos: - fn = os.path.join(CACHEDIR, 'repo-{}-{}-{}.solv'.format(project, repo, arch)) + # check back the repo state to avoid suprises + state = repository_arch_state(self.apiurl, project, repo, arch) + fn = f'repo-{project}-{repo}-{arch}-{state}.solv' r = pool.add_repo('/'.join([project, repo])) - r.add_solv(fn) + if not r.add_solv(fn): + raise Exception('failed to add repo {}/{}/{}.'.format(project, repo, arch)) pool.createwhatprovides() ++++++ openSUSE-release-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.pvoCbb/_old 2021-10-27 22:21:33.815209668 +0200 +++ /var/tmp/diff_new_pack.pvoCbb/_new 2021-10-27 22:21:33.815209668 +0200 @@ -1,5 +1,5 @@ name: openSUSE-release-tools -version: 20211026.802e0d64 -mtime: 1635227686 -commit: 802e0d64c05d297dfb9ee9407ba52ded4c9c79d5 +version: 20211026.f1790c67 +mtime: 1635267044 +commit: f1790c675a89da16f0c65504f87337fe356af890