diff options
author | Britney Fransen <brfransen@gmail.com> | 2011-07-12 05:08:03 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2011-07-12 05:08:03 (GMT) |
commit | 6fda8667afda0b83abb8068ac46841d55210a97b (patch) | |
tree | 4c35fe9dff35843e6bb962f0ec1ffde5e248264d /build_tools | |
parent | e93b351de20930b836964fee06a136933dea0d53 (diff) | |
download | linhes_dev-6fda8667afda0b83abb8068ac46841d55210a97b.zip |
mp.py: add support for .gz pkgs
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/bin/mp.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py index 62f55a1..7744450 100755 --- a/build_tools/bin/mp.py +++ b/build_tools/bin/mp.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Version 0.6.8 +# Version 0.6.9 import os import sys @@ -32,6 +32,9 @@ pkgrel = "" arch = "" CARCH = "" PKGDEST = "" +TOTALPKG = "" +GZPKG = "" +XZPKG = "" # See what git branch we're working under git_repo = Git() @@ -225,13 +228,18 @@ def update_repo(): for i in pkglist: print "Package name:",i - TOTALPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.gz" - if not os.path.isfile(PKGDEST + "/" + TOTALPKG): - TOTALPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.xz" + + GZPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.gz" + XZPKG = i + "-" + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.xz" + if os.path.isfile(PKGDEST + "/" + XZPKG): + TOTALPKG = XZPKG + elif os.path.isfile(PKGDEST + "/" + GZPKG): + TOTALPKG = GZPKG else: - print "ERROR in function update_repo: Couldn't find the new package ",TOTALPKG + print "ERROR in function update_repo: Couldn't find the new package",PKGDEST + "/" + TOTALPKG sys.exit(2) + print "Package file:",TOTALPKG # Remove old package(s) from local copy pv = re.compile('[\d]+[\w.]+') dirlist = os.listdir(DOCROOT) @@ -390,7 +398,7 @@ def config_file(): SRCPKG = pkgbase + "-" + pkgver + "-" + pkgrel + ".src.tar.gz" else: SRCPKG = pkgname + "-" + pkgver + "-" + pkgrel + ".src.tar.gz" - print "Source package will be: ",SRCPKG + print "Source package will be:",SRCPKG # Get needed makepkg.conf variables mpkg="/etc/makepkg.conf" @@ -408,7 +416,7 @@ def config_file(): if mp_lines.strip().startswith("PKGDEST"): PKGDEST = mp_lines.partition("=")[2].strip('\n') print "CARCH is:",CARCH - print "Package desitination is:",PKGDEST + print "Package destination is:",PKGDEST print "Architecture is:",arch def make_package(): |