diff options
author | Nirbheek Chauhan <nirbheek@gentoo.org> | 2009-09-29 00:50:32 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@gentoo.org> | 2009-09-29 00:54:53 +0530 |
commit | 2ee4b4c2a938a74f80d706077906a5c15ca5e7f8 (patch) | |
tree | 97737c4975b473c9198df9a369dd65448eaa0bcc /scripts | |
parent | app-editors/gedit: 2.27.6 -> 2.28.0 (diff) | |
download | gnome-2ee4b4c2a938a74f80d706077906a5c15ca5e7f8.tar.gz gnome-2ee4b4c2a938a74f80d706077906a5c15ca5e7f8.tar.bz2 gnome-2ee4b4c2a938a74f80d706077906a5c15ca5e7f8.zip |
scripts/bump-to-latest.py: Fix bug in finding overlay_ebuilds
* Make sure filename ends in .ebuild before adding to ebuilds list
* Fix whitespace, add a comment
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bump-to-latest.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/bump-to-latest.py b/scripts/bump-to-latest.py index 835de458..4eab4fda 100755 --- a/scripts/bump-to-latest.py +++ b/scripts/bump-to-latest.py @@ -63,7 +63,7 @@ def match_cpv_to_ebuild(categ, pkg, ver): Returns (None, None) if no matching ebuild found""" pv = "%s-%s" % (pkg, ver) overlay_path = "%s/%s/%s" % (GNOME_OVERLAY, categ, pkg) - overlay_ebuilds = os.listdir(overlay_path) + overlay_ebuilds = [i for i in os.listdir(overlay_path) if i.endswith('.ebuild')] for ebuild in overlay_ebuilds: if ebuild.find(pv) != -1: @@ -87,15 +87,16 @@ for i in dirs: for categ in categs: for pkg in os.listdir(categ): - vers = versions(pkg).split() + # Get versions from bumpchecker output + vers = versions(pkg).split() if not vers: continue cv = vers[1] # Current Version lv = vers[3] # Latest Version if cv >= lv: continue - (ce, cv) = match_cpv_to_ebuild(categ, pkg, cv) - le = "%s/%s/%s-%s.ebuild" % (categ, pkg, pkg, lv) + (ce, cv) = match_cpv_to_ebuild(categ, pkg, cv) + le = "%s/%s/%s-%s.ebuild" % (categ, pkg, pkg, lv) if not ce: # No matching ebuild found in overlay continue |