Commit e1bf49e0 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Fix dependency generation in "gendummydata.py".

Package dependencies are no longer stored as references to the
"Packages" table but kept directly in "PackageDepends", so the dummy
data generation script should be fixed to create package names instead
of references, also. Regression introduced in commit
7c91c592

.
Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
parent bd78b14c
......@@ -252,9 +252,9 @@ for p in seen_pkgs.keys():
this_deps = {}
i = 0
while i != num_deps:
dep = random.randrange(1, len(seen_pkgs) + 1)
dep = random.choice([k for k in seen_pkgs])
if not this_deps.has_key(dep):
s = "INSERT INTO PackageDepends VALUES (%d, %d, NULL);\n"
s = "INSERT INTO PackageDepends VALUES (%d, '%s', NULL);\n"
s = s % (seen_pkgs[p], dep)
out.write(s)
i += 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment