diff options
author | 2010-02-28 11:36:23 +0200 | |
---|---|---|
committer | 2010-03-16 08:48:29 +0200 | |
commit | fb8baf8843006a97fef9b4ad909ee81569e38f8b (patch) | |
tree | 289a4e6397b94d2ef12a870ba01fbc91fdf5d7ce | |
parent | Skip packages from mobile category. (diff) | |
download | gentoo-bumpchecker-fb8baf8843006a97fef9b4ad909ee81569e38f8b.tar.gz gentoo-bumpchecker-fb8baf8843006a97fef9b4ad909ee81569e38f8b.tar.bz2 gentoo-bumpchecker-fb8baf8843006a97fef9b4ad909ee81569e38f8b.zip |
Add perl package support.
-rw-r--r-- | modules/gnome_module.py | 25 | ||||
-rw-r--r-- | modules/package_module.py | 32 |
2 files changed, 30 insertions, 27 deletions
diff --git a/modules/gnome_module.py b/modules/gnome_module.py index 6442ab0..1eb2198 100644 --- a/modules/gnome_module.py +++ b/modules/gnome_module.py @@ -43,20 +43,17 @@ class GNOME: ret = [] for line in f.readlines(): components = str.strip(line).split(':') - if len(components) == 4 and len(components[2]) > 0: - # Ignore perl packages that don't have versions known in version-stable due to different infrastructure for hosting - # We have a workaround in compare_packages now, but we don't have a proper mapping to ruby-g* stuff yet, so ignore them for now - if (components[0] == 'bindings' and components[3] == 'perl'): - continue - # Skip mobile stuff, because we don't care. And they are mostly dupes anyway - if components[0] == 'mobile': - continue - pkg = package_module.Package(components[1] + "-" + components[2]) - if (pkg.name and pkg.version): - ret.append(pkg) - else: - print "Warning: Ignoring package %s because parsing of its name or version string '%s' failed" % (components[1], components[2]) - + # Skip invalid lines + if len(components) != 4 or len(components[2]) == 0: + continue + # Skip mobile stuff, because we don't care. And they are mostly dupes anyway + if components[0] == 'mobile': + continue + pkg = package_module.Package(components[1] + "-" + components[2]) + if (pkg.name and pkg.version): + ret.append(pkg) + else: + print "Warning: Ignoring package %s because parsing of its name or version string '%s' failed" % (components[1], components[2]) f.close() return ret diff --git a/modules/package_module.py b/modules/package_module.py index ede3d88..442bdcd 100644 --- a/modules/package_module.py +++ b/modules/package_module.py @@ -7,19 +7,25 @@ import sys sys.path = ["modules"]+sys.path import portage_module -class Package: - # special cases - special_cases = { "GConf":"gconf", - "ORBit2":"orbit", - "libidl":"libIDL", - "libxml++":"libxmlpp", - "gnome2-vfs":"gnome-vfs", - "gtk2":"gtk2-perl", - "gnome2-vfs":"gnome2-vfs-perl", - "pkg-config":"pkgconfig", - "glade3":"dev-util/glade", - "gdl":"dev-libs/gdl", - } +class Package(object): + special_cases = { + "GConf":"gconf", + "ORBit2":"orbit", + "libidl":"libIDL", + "libxml++":"libxmlpp", + "pkg-config":"pkgconfig", + "glade3":"dev-util/glade", + "gdl":"dev-libs/gdl", + # Perl package mappings + 'Glib' : 'dev-perl/glib-perl', + 'Gnome2-Canvas' : 'dev-perl/gnome2-canvas', + 'Gnome2-GConf' : 'dev-perl/gnome2-gconf', + 'Gnome2-VFS' : 'dev-perl/gnome2-vfs-perl', + 'Gnome2' : 'dev-perl/gnome2-perl', + 'Gtk2-GladeXML' : 'dev-perl/gtk2-gladexml', + 'Gtk2' : 'dev-perl/gtk2-perl', + 'Pango' : 'dev-perl/Pango', + } def __init__(self, raw_data): self.raw_string = raw_data |