diff options
author | pjmattal <pjmattal> | 2007-05-26 12:24:01 +0000 |
---|---|---|
committer | pjmattal <pjmattal> | 2007-05-26 12:24:01 +0000 |
commit | d397bac2d1e41a6c23ca599b4b16e0f8280f4c03 (patch) | |
tree | 1c3d6acc5a62140ce2bf06b3441a130a36885dcb /tupkg/update/tupkgupdate | |
parent | 0d7cd0c4f06f90f7d38a41155ac5117c547f1668 (diff) | |
download | aurweb-d397bac2d1e41a6c23ca599b4b16e0f8280f4c03.tar.xz |
fixes to tupkgupdate to use repo-add and repo-remove
Diffstat (limited to 'tupkg/update/tupkgupdate')
-rwxr-xr-x | tupkg/update/tupkgupdate | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate index d44a7a3..5ca7477 100755 --- a/tupkg/update/tupkgupdate +++ b/tupkg/update/tupkgupdate @@ -305,22 +305,23 @@ def runGensync(repo, pkgbuild): command = "gensync '" + pkgbuild + "' '" + target + "'" return execute(command) -def runUpdatesyncUpd(repo, pkgbuild): +def runRepoAdd(repo, package): global havefakeroot targetDB = os.path.join(repo, "community.db.tar.gz") + destfile = os.path.join(repo, os.path.basename(package.new.file)) if havefakeroot: - command = "fakeroot updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'" + command = "fakeroot repo-add '" + targetDB + "' '" + destfile + "'" else: - command = "updatesync upd '" + targetDB + "' '" + pkgbuild + "' '" + repo +"'" + command = "repo-add '" + targetDB + "' '" + destfile + "'" return execute(command) -def runUpdatesyncDel(repo, pkgname): +def runRepoRemove(repo, pkgname): global havefakeroot targetDB = os.path.join(repo, "community.db.tar.gz") if havefakeroot: - command = "fakeroot updatesync del '" + targetDB + "' '" + pkgname +"'" + command = "fakeroot repo-remove '" + targetDB + "' '"+ pkgname + "'" else: - command = "updatesync del '" + targetDB + "' '" + pkgname +"'" + command = "repo-remove '" + targetDB + "' '" + pkgname +"'" return execute(command) ############################################################ @@ -569,14 +570,14 @@ if (switches.get("--delete") == True): # Run updatesync where it is needed for package in dbremove: - retval = runUpdatesyncDel(repo_dir, package.name) + retval = runRepoRemove(repo_dir, package.name) if (retval != 0): - error("Updatesync del returned an error!") + error("repo-remove returned an error!") sys.exit(-1) for package in dbmodify: - retval = runUpdatesyncUpd(repo_dir, os.path.join(pkgbuild_dir,package.category,package.name,"PKGBUILD")) + retval = runRepoAdd(repo_dir, package.new.file) if (retval != 0): - error("Updatesync upd returned an error!") + error("repo-add returned an error!") sys.exit(-1) # vim: ft=python ts=2 sw=2 noet |