diff options
author | simo <simo> | 2005-06-20 09:30:09 +0200 |
---|---|---|
committer | simo <simo> | 2005-06-20 09:30:09 +0200 |
commit | d97a0a376b92bded036275079eeee78714b0fb81 (patch) | |
tree | dddb66ddaf433fff80b2fb2510d109a7310ac1c6 /tupkg/update/tupkgupdate | |
parent | 02b82cf9bad4d9a708384fe517fed37ff8fa902e (diff) | |
download | aur-d97a0a376b92bded036275079eeee78714b0fb81.tar.gz aur-d97a0a376b92bded036275079eeee78714b0fb81.tar.xz |
Tupkgupdate now uses updatesync
Diffstat (limited to 'tupkg/update/tupkgupdate')
-rwxr-xr-x | tupkg/update/tupkgupdate | 34 |
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 |