summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimo <simo>2005-06-20 07:30:09 +0000
committersimo <simo>2005-06-20 07:30:09 +0000
commitd97a0a376b92bded036275079eeee78714b0fb81 (patch)
treedddb66ddaf433fff80b2fb2510d109a7310ac1c6
parent02b82cf9bad4d9a708384fe517fed37ff8fa902e (diff)
downloadaurweb-d97a0a376b92bded036275079eeee78714b0fb81.tar.xz
Tupkgupdate now uses updatesync
-rwxr-xr-xtupkg/update/tupkgupdate34
1 files changed, 29 insertions, 5 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate
index 7e8c67b..5c20abf 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