summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomáš Chvátal <scarabeus@gentoo.org>2009-10-06 17:02:29 +0200
committerTomáš Chvátal <scarabeus@gentoo.org>2009-10-06 17:02:29 +0200
commit99e7cc18e97dbcdd8020a831e4dabd92901fbd9d (patch)
tree37a6e71dff36b9502c6301440e7820ce54f610dc /modules
parentX modular bumpchecker version 1.0 (diff)
downloadgentoo-bumpchecker-99e7cc18e97dbcdd8020a831e4dabd92901fbd9d.tar.gz
gentoo-bumpchecker-99e7cc18e97dbcdd8020a831e4dabd92901fbd9d.tar.bz2
gentoo-bumpchecker-99e7cc18e97dbcdd8020a831e4dabd92901fbd9d.zip
Handle aso tar.gz format.
Diffstat (limited to 'modules')
-rw-r--r--modules/xmodular_module.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/modules/xmodular_module.py b/modules/xmodular_module.py
index 98a3a5a..e6a78f1 100644
--- a/modules/xmodular_module.py
+++ b/modules/xmodular_module.py
@@ -12,10 +12,9 @@ class X_modular:
options = clioptions_module.Options()
args = options.get_arguments()
self.ftpserver = "ftp.x.org"
- self.release_directories = [ "pub/current/src/app/", "pub/current/src/data/", "pub/current/src/doc/",
- "pub/current/src/driver/", "pub/current/src/font/", "pub/current/src/lib/", "pub/current/src/proto/",
- "pub/current/src/util/", "pub/current/src/xserver/" ]
-
+ #self.release_directories = [ "pub/current/src/app/", "pub/current/src/data/", "pub/current/src/doc/",
+ # "pub/current/src/driver/", "pub/current/src/font/", "pub/current/src/lib/", "pub/current/src/proto/",
+ # "pub/current/src/util/", "pub/current/src/xserver/" ]
self.latest_directories = [ "pub/individual/app/", "pub/individual/data/", "pub/individual/doc/",
"pub/individual/driver/", "pub/individual/font/", "pub/individual/lib/", "pub/individual/proto/",
"pub/individual/util/", "pub/individual/xserver/" ]
@@ -47,6 +46,11 @@ class X_modular:
individual_package = package_module.Package(individual_package_name)
individual_packages.append(individual_package)
+ # searching for formated packages
+ #for ip in individual_packages:
+ # if ip.name=="xkeyboard-config":
+ # print ip.name+"-"+ip.version
+
latest_packages = [] # the latest versions
package_in_use = [] # checker so we dont repeat packages
for package in individual_packages:
@@ -104,7 +108,10 @@ class X_modular:
if snapshots == "false" and ( loc_major > 98 or loc_minor > 98 or loc_subminor > 98 or loc_subsubminor > 98 ):
continue
-
+ # Debuging why some package does not show correct version...
+ #if name == "xkeyboard-config":
+ # print "Vychozi: "+str(major)+"."+str(minor)+"."+str(subminor)+"."+str(subsubminor)
+ # print "Lokalni: "+str(loc_major)+"."+str(loc_minor)+"."+str(loc_subminor)+"."+str(loc_subsubminor)
if loc_major < major:
continue
if loc_major == major and loc_minor < minor:
@@ -118,7 +125,7 @@ class X_modular:
minor = loc_minor
subminor = loc_subminor
subsubminor = loc_subsubminor
- if length <3:
+ if length < 3:
latest = str(major)+"."+str(minor)
elif length < 4:
latest = str(major)+"."+str(minor)+"."+str(subminor)
@@ -132,10 +139,10 @@ class X_modular:
# we want to filter out all the bad files.
newfiles = []
for file in files:
- # only keep files with .tar.bz2 ending.
- if ( 0 < file.find(".tar.") and 0 < file.find(".bz2") ):
+ # only keep files with .tar.bz2 or .tar.gz ending.
+ if ( ( ( 0 < file.find(".tar.") and 0 < file.find(".bz2") ) or ( 0 < file.find(".tar.") and 0 < file.find(".gz") ) ) and 0 > file.find(".asc") and 0 > file.find(".sha") ):
+ file = string.replace(file,".tar.gz","")
file = string.replace(file,".tar.bz2","")
- file = string.replace(file,".asc","")
newfiles.append(file)
return newfiles