summaryrefslogtreecommitdiffstats
path: root/build_tools/bin
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2022-10-18 16:39:30 (GMT)
committerBritney Fransen <brfransen@gmail.com>2022-10-18 16:39:30 (GMT)
commit286c69461d049049a0b2d5ab48578808b7c3d2ee (patch)
treefed36f29a00410acac701f7ab1e091d5a7500fce /build_tools/bin
parente80c2a2f1a4cf6a5fca70ca432132877f397be66 (diff)
downloadlinhes_dev-master.zip
mpv2.py: add zst supportHEADR8.6.1testingmaster
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-xbuild_tools/bin/mpv2.py30
1 files changed, 20 insertions, 10 deletions
diff --git a/build_tools/bin/mpv2.py b/build_tools/bin/mpv2.py
index b3d5cf2..51a9cb7 100755
--- a/build_tools/bin/mpv2.py
+++ b/build_tools/bin/mpv2.py
@@ -156,6 +156,7 @@ class Packagefile(object):
self.TOTALPKG = ""
self.GZPKG = ""
self.XZPKG = ""
+ self.ZSTPKG = ""
self.repolist=["core", "extra",
"chroot-devel", "mv-core", "xmpl", "local"]
self.mydir = os.getcwd()
@@ -540,10 +541,14 @@ class Packagefile(object):
self.GZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.gz"
self.XZPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.xz"
+ self.ZSTPKG = i + "-" + self.epoch + self.pkgver + "-" + self.pkgrel + "-" + self.CARCH + ".pkg.tar.zst"
print self.GZPKG
print self.XZPKG
+ print self.ZSTPKG
- if os.path.isfile(self.PKGDEST + "/" + self.XZPKG):
+ if os.path.isfile(self.PKGDEST + "/" + self.ZSTPKG):
+ self.TOTALPKG = self.ZSTPKG
+ elif os.path.isfile(self.PKGDEST + "/" + self.XZPKG):
self.TOTALPKG = self.XZPKG
elif os.path.isfile(self.PKGDEST + "/" + self.GZPKG):
self.TOTALPKG = GZPKG
@@ -565,13 +570,14 @@ class Packagefile(object):
print n,"does not match"
continue
else:
- OLDPKG = glob.glob(oldpkgcheck.search(n).group() + "*.pkg.tar.?z")
+ OLDPKG = glob.glob(oldpkgcheck.search(n).group() + "*.pkg.tar.*")
print "OLDPKG =",OLDPKG
if OLDPKG:
for DELPKG in OLDPKG:
if "--rmold" in self.cli_list:
print "Deleting old package:",DELPKG
os.remove(DELPKG)
+ #subprocess.call(["repo-remove", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", DELPKG])
# Remove any symlinks to old packages
# We make it conditional on "--force" because force will overwrite
# an existing package and we want the symlink to stay, pointing to
@@ -583,6 +589,10 @@ class Packagefile(object):
print " Updating " + self.DOCROOT + " with " + self.TOTALPKG
print " Copying " + self.PKGDEST + "/" + self.TOTALPKG
shutil.copy2(self.PKGDEST + "/" + self.TOTALPKG, self.DOCROOT)
+ print " Creating symlink " + self.PKGDEST + "/" + self.TOTALPKG
+ if os.path.islink(self.mydir + "/" + self.TOTALPKG):
+ os.remove(self.mydir + "/" + self.TOTALPKG)
+ os.symlink(self.DOCROOT + "/" + self.TOTALPKG, self.mydir + "/" + self.TOTALPKG)
subprocess.call(["repo-add", self.DOCROOT+ "/" + self.REPO + ".db.tar.gz", self.DOCROOT + "/" + self.TOTALPKG])
print " Updating pacman database"
subprocess.call(["pacman","-Syyyyy" ])
@@ -1020,15 +1030,15 @@ def main():
print "\n\n\n\n"
print "#######################################################"
- print "\n"
- print "Successful updated from ABS:"
- print "----------------------------"
- pprint.pprint(update_pkg)
+# print "\n"
+# print "Successful updated from ABS:"
+# print "----------------------------"
+# pprint.pprint(update_pkg)
- print "\n"
- print "Failed updated from ABS:"
- print "----------------------------"
- pprint.pprint(failed_update)
+# print "\n"
+# print "Failed updated from ABS:"
+# print "----------------------------"
+# pprint.pprint(failed_update)
print "\n"