fix for situation, where the package tar filename is different from the actual package name (ie. chromium-pepper-flash != chromium-plugins.tar.gz)

Signed-off-by: Philip <philm@manjaro.org>
This commit is contained in:
Mateusz Mikołajczyk 2014-09-22 10:22:57 +02:00 committed by Philip
parent 5840789f4e
commit df8ca4fc58
2 changed files with 10 additions and 2 deletions

View File

@ -210,4 +210,12 @@ def get_extract_tarball(pkg):
print(e)
return None
else:
return os.path.join(srcpkgdir, pkg.name)
return os.path.join(srcpkgdir, get_name(pkg))
def get_name(pkg):
# the splitext is to remove the original extension
# which is tar.foo - currently foo is gz, but this can change
# the rstrip is to remove the trailing tar part.
if pkg.name not in pkg.tarpath:
return os.path.splitext(os.path.basename(pkg.tarpath))[0].rstrip('.tar')
return pkg.name

View File

@ -640,7 +640,7 @@ def download(url_list, path):
def build_next():
global build_proc
pkg = to_build[0]
path = os.path.join(aur.srcpkgdir, pkg.name)
path = os.path.join(aur.srcpkgdir, aur.get_name(pkg))
new_pkgs = aur.get_pkgs(path + '/PKGBUILD')
# sources are identicals for splitted packages
# (not complete) download(new_pkgs[0].source, path)