summaryrefslogtreecommitdiffstats
path: root/tupkg/update/tupkgupdate
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-02-23 06:16:24 +0100
committerpjmattal <pjmattal>2005-02-23 06:16:24 +0100
commiteb000511dac404faca0a9e81432a2a3395f50124 (patch)
treeaaa5e910d438f783df47eb96a5dac064e9b36e84 /tupkg/update/tupkgupdate
parentdde20ef6bbcfe76101d3109801b512e64cc1d12f (diff)
downloadaur-eb000511dac404faca0a9e81432a2a3395f50124.tar.gz
aur-eb000511dac404faca0a9e81432a2a3395f50124.tar.xz
make sure all dummy packages are created in tupkgupdate in location 1
Diffstat (limited to 'tupkg/update/tupkgupdate')
-rwxr-xr-xtupkg/update/tupkgupdate13
1 files changed, 4 insertions, 9 deletions
diff --git a/tupkg/update/tupkgupdate b/tupkg/update/tupkgupdate
index 3de449ff..b700177d 100755
--- a/tupkg/update/tupkgupdate
+++ b/tupkg/update/tupkgupdate
@@ -93,24 +93,19 @@ class PackageDatabase:
q.execute("DELETE FROM PackageContents WHERE PackageID = " + str(id))
q.execute("DELETE FROM PackageDepends WHERE PackageID = " + str(id))
q.execute("DELETE FROM PackageSources WHERE PackageID = " + str(id))
- def lookupOrDummy(self, packagename, locationId):
+ def lookupOrDummy(self, packagename):
retval = self.lookup(packagename)
if (retval != None):
return retval
- self.createDummy(packagename, locationId)
- retval = self.lookup(packagename)
- return retval
- def createDummy(self, packagename, locationId):
+ return self.createDummy(packagename)
+ def createDummy(self, packagename):
warning("DB: Creating dummy package for: " + packagename)
q = self.cursor()
q.execute("INSERT INTO Packages " +
"(Name, Description, LocationID, DummyPkg) " +
"VALUES ('" +
MySQLdb.escape_string(packagename) + "', '" +
- MySQLdb.escape_string("A dummy package") + "', " +
- str(locationId) + ", " +
- "1" +
- ")")
+ MySQLdb.escape_string("A dummy package") + "', 1)")
return self.lookup(packagename)
def insertNewInfo(self, package, id, locationId):
q = self.cursor()