diff options
author | simo <simo> | 2005-12-31 05:54:11 +0000 |
---|---|---|
committer | simo <simo> | 2005-12-31 05:54:11 +0000 |
commit | f47b09de422ae3bf57ed6e70768fa7012783d842 (patch) | |
tree | e78f589b6e8f3230bbc057392f9e95d9b42c9412 /tupkg | |
parent | 4e74ee9adf954facc8ab3758b29e31478cd5ef48 (diff) |
tupkgupdate resource usage improvements
now gets binary package name/ver/rel from filename, rather than untarring
Diffstat (limited to 'tupkg')
-rwxr-xr-x | tupkg/update/tupkgupdate | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate index f300024..41f87d4 100755 --- a/tupkg/update/tupkgupdate +++ b/tupkg/update/tupkgupdate @@ -212,8 +212,12 @@ def areFilesIdentical(file_a, file_b): ############################################################ def infoFromPackageFile(filename): - pkg = pacman.load(filename) - return pkg.name, pkg.version + "-" + pkg.release + pkg = os.path.basename(filename) + m = re.compile("(?P<pkgname>.*)-(?P<pkgver>.*)-(?P<pkgrel>.*).pkg.tar.gz").search(pkg) + if not m: + raise Exception("Non-standard filename") + else: + return m.group('pkgname'), m.group('pkgver') + "-" + m.group('pkgrel') def infoFromPkgbuildFile(filename): # first grab the category based on the file path |