diff options
author | James Meyer <james.meyer@operamail.com> | 2011-07-31 15:01:55 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2011-07-31 15:01:55 (GMT) |
commit | b7c82adb5afd3791eda59133df205f47c1213d33 (patch) | |
tree | e743cad1b121e3a149475d3f19df591ea60be66d /build_tools/bin | |
parent | a20ccf238df384f71aee5cb1da5dd82480104230 (diff) | |
download | linhes_dev-b7c82adb5afd3791eda59133df205f47c1213d33.zip |
mp.py: add the ability to account for epoch tag in PKGBUILD
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-x | build_tools/bin/mp.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py index 7744450..0d7f98d 100755 --- a/build_tools/bin/mp.py +++ b/build_tools/bin/mp.py @@ -17,7 +17,7 @@ PKGHOME = "/data/pkg_repo/packages" SRCPKGHOME = "/data/pkg_repo/src_packages" mydir = os.getcwd() repolist = ['core', 'extra'] -variables = ['pkgbase','pkgname','pkgver','pkgrel','arch'] +variables = ['pkgbase','pkgname','pkgver','pkgrel','arch','epoch'] cli_dict = {} cli_list = [] makepkg_cmd = ['makepkg'] @@ -29,6 +29,7 @@ pkgbase = "" pkgname = "" pkgver = "" pkgrel = "" +epoch = "" arch = "" CARCH = "" PKGDEST = "" @@ -228,9 +229,10 @@ def update_repo(): for i in pkglist: print "Package name:",i + + GZPKG = i + "-" + epoch + pkgver + "-" + pkgrel + "-" + CARCH + ".pkg.tar.gz" + XZPKG = i + "-" + epoch + 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): @@ -354,6 +356,7 @@ def config_file(): global pkglist global pkgver global pkgrel + global epoch global arch global SRCPKG global CARCH @@ -376,6 +379,7 @@ def config_file(): for item in variables: v = subprocess.Popen(['/bin/bash','-c', 'source ' + pkgfile + '; echo ${' + item + '[@]}'], stdout = subprocess.PIPE,) value = v.communicate()[0].strip('\n') + if item == "pkgbase": pkgbase = value print "pkgbase:",pkgbase @@ -390,14 +394,19 @@ def config_file(): elif item == "pkgrel": pkgrel = value print "pkgrel:",pkgrel + elif item == "epoch": + if value: + epoch = "%s:" %value + print "epoch" , epoch elif item == "arch": arch = value print "arch:",arch + if pkgbase: - SRCPKG = pkgbase + "-" + pkgver + "-" + pkgrel + ".src.tar.gz" + SRCPKG = pkgbase + "-" + epoch + pkgver + "-" + pkgrel + ".src.tar.gz" else: - SRCPKG = pkgname + "-" + pkgver + "-" + pkgrel + ".src.tar.gz" + SRCPKG = pkgname + "-" + epoch + pkgver + "-" + pkgrel + ".src.tar.gz" print "Source package will be:",SRCPKG # Get needed makepkg.conf variables |