From f47b09de422ae3bf57ed6e70768fa7012783d842 Mon Sep 17 00:00:00 2001 From: simo Date: Sat, 31 Dec 2005 05:54:11 +0000 Subject: tupkgupdate resource usage improvements now gets binary package name/ver/rel from filename, rather than untarring --- tupkg/update/tupkgupdate | 8 ++++++-- 1 file 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.*)-(?P.*)-(?P.*).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 -- cgit v1.2.3-70-g09d2