diff options
author | 2009-10-03 14:43:03 +0200 | |
---|---|---|
committer | 2009-10-03 14:43:03 +0200 | |
commit | e5ec1045380530d7173cbd2f1af4be9784262f7a (patch) | |
tree | fb1733e24bcbd9c7d3adf5394993139f4c3e6470 /gnome-bumpchecker.py | |
parent | Fix crash happening when upstream releng version list has a nonsensical versi... (diff) | |
download | gentoo-bumpchecker-e5ec1045380530d7173cbd2f1af4be9784262f7a.tar.gz gentoo-bumpchecker-e5ec1045380530d7173cbd2f1af4be9784262f7a.tar.bz2 gentoo-bumpchecker-e5ec1045380530d7173cbd2f1af4be9784262f7a.zip |
X modular bumpchecker version 1.0
Diffstat (limited to 'gnome-bumpchecker.py')
-rwxr-xr-x | gnome-bumpchecker.py | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gnome-bumpchecker.py b/gnome-bumpchecker.py new file mode 100755 index 0000000..7069f93 --- /dev/null +++ b/gnome-bumpchecker.py @@ -0,0 +1,56 @@ +#! /usr/bin/python +# Copyright John N. Laliberte <allanonjl@gentoo.org> +# Copyright Daniel Gryniewicz <dang@gentoo.org> +# LICENSE - GPL2 + +import os,sys + +exename=os.path.basename(sys.argv[0]) +version = "0.0.2" +sys.path = ["modules"]+sys.path + +if __name__ == '__main__': + import clioptions_module + options = clioptions_module.Options() + if (options.options.release_number == None): + options.parser.error("No revision") + + # generate 2 lists. + # 1st list is the packages needed for a release ( from GNOME FTP ) + # 2nd list is the latest versions of the packages w.r.t. the major/minor of + # the release ( from GNOME FTP ) + import gnome_module + + gnome = gnome_module.GNOME(options.get_arguments().nextrev) + + # Quick versions file parsing + release_packages = gnome.generate_data_release() + latest_packages = gnome.generate_data_individual() + + # Old FTP scraping way: + # release_packages, latest_packages = gnome.generate_data_ftp() + + # figure out what versions of these packages are in portage. + # we need a list of package names to check for, so we choose + # to use the release_packages list. + import portage_module + packages_in_portage = \ + portage_module.find_packages_in_tree(release_packages, \ + options.get_arguments().portdir, \ + options.get_arguments().all_overlays, \ + options.get_arguments().overlays) + + # compare the versions in order to check if we are up to date. + comparison_result_packages = gnome_module.compare_packages(release_packages, \ + latest_packages, \ + packages_in_portage) + + # output these results to a nice html document + import gnome_output + gnome_output.Output(comparison_result_packages, True).generate_html() + + # if we specified to generate a keywords file, generate it + # keep in mind this will do it for the versions in portage, which + # may not be the release versions if we are not up to date. + if True == options.get_arguments().keywords: + gnome_output.Output(packages_in_portage, False).generate_keywords() |