mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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
7c91c59245
.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
bd78b14cb5
commit
e1bf49e03c
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue