diff options
author | Mike Gilbert <floppym@gentoo.org> | 2020-10-26 13:47:40 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2020-10-26 13:47:40 -0400 |
commit | 1c4fc5a149952a22b74a8d0fc498716ee5c7dfa8 (patch) | |
tree | 763870309c2cdce7ba600e10b73357c44f0aa357 /chrome-bump | |
parent | chrome-bump: drop the version suffix from google-chrome (diff) | |
download | chromium-tools-1c4fc5a149952a22b74a8d0fc498716ee5c7dfa8.tar.gz chromium-tools-1c4fc5a149952a22b74a8d0fc498716ee5c7dfa8.tar.bz2 chromium-tools-1c4fc5a149952a22b74a8d0fc498716ee5c7dfa8.zip |
Update chrome-bump script
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'chrome-bump')
-rwxr-xr-x | chrome-bump | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/chrome-bump b/chrome-bump index d8df1fc..1b138e5 100755 --- a/chrome-bump +++ b/chrome-bump @@ -51,7 +51,7 @@ def get_deb_release(archive, dist): def get_deb_packages(archive, dist, comp, arch): url = '%s/dists/%s/%s/binary-%s/Packages' % (archive, dist, comp, arch) with closing(urlopen(url)) as fp: - return list(deb822.Packages.iter_paragraphs(fp)) + return list(deb822.Packages.iter_paragraphs(fp, use_apt_pkg=False)) def ebuild_pvr(pn, ebuild): return ebuild[len(pn) + 1 : -7] @@ -82,11 +82,15 @@ def sync_ebuilds(pkg, debs): os.chdir(os.path.join(PORTDIR, pkg)) pn = pkg.split('/')[1] changed = False + new_versions = [] for pattern in PKGMAP[pkg]: (sep, name) = PKGMAP[pkg][pattern] ebuilds = sorted(glob(pattern), reverse=True) + if not ebuilds: + continue + for deb in debs: if deb['Package'] != name: continue @@ -99,6 +103,7 @@ def sync_ebuilds(pkg, debs): break if not found: copy_ebuild(ebuilds[0], new_ebuild(pn, version, sep, '')) + new_versions.append(version) changed = True for ebuild in ebuilds: @@ -119,7 +124,10 @@ def sync_ebuilds(pkg, debs): if ARGS.commit: print('repoman commit') if not ARGS.dry_run: - subprocess.check_call(['repoman', 'commit', '-S', '-m', pkg + ': automated update']) + message = '%s: automated update (%s)' % (pkg, ', '.join(new_versions)) + if len(message) > 69: + message = '%s: automated update' % pkg + subprocess.check_call(['repoman', 'commit', '-S', '-m', message]) else: print('repoman manifest') if not ARGS.dry_run: |