diff options
author | Michael Hanson <hansonorders@verizon.net> | 2011-01-12 21:07:50 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verizon.net> | 2011-01-12 21:07:50 (GMT) |
commit | 63a7d9308df828cba8e050f753079db4bb8c9cf6 (patch) | |
tree | 6ddbfb0d1e78ce88fdbf57f5b752da697ebe8a59 /build_tools/bin | |
parent | b24e3493f47d372dd821efa211044567d696288d (diff) | |
download | linhes_dev-63a7d9308df828cba8e050f753079db4bb8c9cf6.zip |
mp.py: Script clean up and add code to remove old symlinks
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-x | build_tools/bin/mp.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/build_tools/bin/mp.py b/build_tools/bin/mp.py index 5c20011..5dab22e 100755 --- a/build_tools/bin/mp.py +++ b/build_tools/bin/mp.py @@ -213,10 +213,6 @@ def find_repo(): def update_repo(): # pkgname could be a list of several pkgs. Since bash array format is # loose, let bash parse the pkgname(s) first, then return a list for us. - #b = subprocess.Popen(['/bin/bash','-c', 'source ' + pkgfile + '; echo ${pkgname[@]}'], stdout = subprocess.PIPE,) - #output = b.communicate()[0].strip('\n') - #print "Pkglist:",output - #pkglist = list(output.split()) os.chdir(DOCROOT) print @@ -237,6 +233,9 @@ def update_repo(): DELPKG = OLDPKG.pop() print "DELPKG:",DELPKG os.remove(DELPKG) + # Remove any symlinks to old packages + if os.path.islink(mydir + "/" + DELPKG): + os.remove(mydir + "/" + DELPKG) # Copy in new package print "############################################" print "Updating " + DOCROOT + "/" + CARCH + "/" + REPO + " with " + TOTALPKG @@ -334,18 +333,18 @@ def config_file(): if item == "pkgbase": pkgbase = value print "pkgbase:",pkgbase - if item == "pkgname": + elif item == "pkgname": pkgname = value print "pkgname:",pkgname pkglist = list(value.split()) print "pkglist:",pkglist - if item == "pkgver": + elif item == "pkgver": pkgver = value print "pkgver:",pkgver - if item == "pkgrel": + elif item == "pkgrel": pkgrel = value print "pkgrel:",pkgrel - if item == "arch": + elif item == "arch": arch = value print "arch:",arch |