mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
tupkgupdate resource usage improvements
now gets binary package name/ver/rel from filename, rather than untarring
This commit is contained in:
parent
4e74ee9adf
commit
f47b09de42
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue