diff options
author | Michael Hanson <hansonorders@verizon.net> | 2011-03-29 02:44:45 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verizon.net> | 2011-03-29 02:44:45 (GMT) |
commit | 50635a9eefcbe0e387460cc808439df01e5b32e1 (patch) | |
tree | c73f79cfc417b5d95810078716a6437e970b9eba /build_tools/bin | |
parent | 6cb91638645b0b3662a86b95a7a3c4d9c328e72b (diff) | |
download | linhes_dev-50635a9eefcbe0e387460cc808439df01e5b32e1.zip |
mp.py: minor edits, note that old pkgs are not being deleted properly
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-x | build_tools/bin/mp.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py index fe8459b..18a4f2c 100755 --- a/build_tools/bin/mp.py +++ b/build_tools/bin/mp.py @@ -1,5 +1,5 @@ #!/usr/bin/env python2 -# Version 0.6.3 +# Version 0.6.4 import os import sys @@ -214,7 +214,7 @@ def update_repo(): os.chdir(DOCROOT) print - print "INFO: Changed working dir to ",DOCROOT + print "INFO: Changed working dir to",DOCROOT print for i in pkglist: @@ -226,10 +226,12 @@ def update_repo(): print "ERROR in function update_repo: Couldn't find the new package ",TOTALPKG sys.exit(2) # Remove old package from local copy - OLDPKG = glob.glob(i + "-" + pkgver + "-*-" + CARCH + ".pkg.tar.*z") + ## FIX ME + ## This only works is the pkgver of the old pkg is the same as the new. + OLDPKG = glob.glob(i + "-" + pkgver + "-*-" + CARCH + ".pkg.tar.*z") if OLDPKG: DELPKG = OLDPKG.pop() - print "DELPKG:",DELPKG + print "Deleting old package:",DELPKG os.remove(DELPKG) # Remove any symlinks to old packages # We make it conditional on "--force" because force will overwrite @@ -240,7 +242,8 @@ def update_repo(): os.remove(mydir + "/" + DELPKG) # Copy in new package print "############################################" - print "Updating " + DOCROOT + "/" + CARCH + "/" + REPO + " with " + TOTALPKG + print "Updating " + DOCROOT + " with " + TOTALPKG + print "Copying " + PKGDEST + "/" + TOTALPKG shutil.copy2(PKGDEST + "/" + TOTALPKG, DOCROOT) subprocess.call(["repo-add", DOCROOT+ "/" + REPO + ".db.tar.gz", DOCROOT + "/" + TOTALPKG]) print "############################################" |