summaryrefslogtreecommitdiffstats
path: root/tupkg/update/tupkgupdate
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-04-10 00:56:26 +0000
committerpjmattal <pjmattal>2005-04-10 00:56:26 +0000
commit3cdff3b929b8c8272d6381639d567712756ccbb0 (patch)
treefe729985648cce29b8dfac729e2a173e9dffc3da /tupkg/update/tupkgupdate
parentda80234d77f7ea22613d19e0f8831fe91f4f4352 (diff)
downloadaurweb-3cdff3b929b8c8272d6381639d567712756ccbb0.tar.xz
added check for new package going transitioning from unsupported --> community getting maintainer reset
hardcoded community as the name of the repo, for now
Diffstat (limited to 'tupkg/update/tupkgupdate')
-rwxr-xr-xtupkg/update/tupkgupdate12
1 files changed, 11 insertions, 1 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate
index c828799..bc0b701 100755
--- a/tupkg/update/tupkgupdate
+++ b/tupkg/update/tupkgupdate
@@ -87,6 +87,15 @@ class PackageDatabase:
"LocationID = " + str(locationId) + " " +
"WHERE ID = " + str(id))
self.insertNewInfo(package, id, locationId)
+ # we must lastly check to see if this is a move of a package from
+ # unsupported to community, because we'd have to reset maintainer and location
+ q = self.cursor()
+ q.execute("SELECT LocationID FROM Packages WHERE ID = " + str(id))
+ if (q.rowcount != 0):
+ row = q.fetchone()
+ if (row[0] != 3):
+ q = self.cursor()
+ q.execute("UPDATE Packages SET LocationID = 3, MaintainerUID = null WHERE ID = " + str(id))
def remove(self, id, locationId):
warning("DB: Removing package with id: " + str(id))
q = self.cursor()
@@ -256,7 +265,8 @@ def deleteFile(filename):
execute(command)
def runGensync(repo, pkgbuild):
- target = os.path.join(repo, os.path.basename(repo) + ".db.tar.gz")
+#target = os.path.join(repo, os.path.basename(repo) + ".db.tar.gz")
+ target = os.path.join(repo, "community.db.tar.gz")
command = "gensync '" + pkgbuild_dir + "' '" + target + "'"
execute(command)