From 3cdff3b929b8c8272d6381639d567712756ccbb0 Mon Sep 17 00:00:00 2001 From: pjmattal Date: Sun, 10 Apr 2005 00:56:26 +0000 Subject: added check for new package going transitioning from unsupported --> community getting maintainer reset hardcoded community as the name of the repo, for now --- tupkg/update/tupkgupdate | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'tupkg') 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) -- cgit v1.2.3-70-g09d2