summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtupkg/update/tupkgupdate34
1 files changed, 29 insertions, 5 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate
index 7e8c67bd..5c20abfa 100755
--- a/tupkg/update/tupkgupdate
+++ b/tupkg/update/tupkgupdate
@@ -297,6 +297,16 @@ def runGensync(repo, pkgbuild):
command = "gensync '" + pkgbuild + "' '" + target + "'"
return execute(command)
+def runUpdatesyncUpd(repo, pkgbuild):
+ targetDB = os.path.join(repo, "community.db.tar.gz")
+ command = "updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'"
+ return execute(command)
+
+def runUpdatesyncDel(repo, pkgname):
+ targetDB = os.path.join(repo, "community.db.tar.gz")
+ command = "updatesync del '" + targetDB + "' '" + pkgname +"'"
+ return execute(command)
+
############################################################
# Functions for error handling
############################################################
@@ -528,8 +538,22 @@ if (switches.get("--delete") == True):
for file in copy:
deleteFile(file)
# Run gensync to build the repo index
-if (len(copy) + len(delete) > 0):
- retval = runGensync(repo_dir, pkgbuild_dir)
- if (retval != 0):
- error("Gensync returned an error!")
- sys.exit(-1)
+#if (len(copy) + len(delete) > 0):
+# retval = runGensync(repo_dir, pkgbuild_dir)
+# if (retval != 0):
+# error("Gensync returned an error!")
+# sys.exit(-1)
+
+# Run updatesync where it is needed
+for package in dbremove:
+ retval = runUpdatesyncDel(repo_dir, package.name)
+ if (retval != 0):
+ error("Updatesync del returned an error!")
+ sys.exit(-1)
+for package in dbmodify:
+ retval = runUpdatesyncUpd(repo_dir, os.path.join(pkgbuild_dir,package.category,package.name,"PKGBUILD"))
+ if (retval != 0):
+ error("Updatesync upd returned an error!")
+ sys.exit(-1)
+
+# vim: ft=python ts=2 sw=2 noet