Remove dependencies, add meta packages

This commit is contained in:
rubenwardy
2018-05-27 16:37:54 +01:00
parent 65fdba5882
commit 7b6ad051c4
7 changed files with 98 additions and 72 deletions

View File

@@ -255,7 +255,6 @@ No warranty is provided, express or implied, for any part of the project.
mod.title = "Sweet Foods"
mod.license = licenses["CC0"]
mod.type = PackageType.MOD
mod.harddeps.append(food)
mod.author = ruben
mod.tags.append(tags["player_effects"])
mod.repo = "https://github.com/rubenwardy/food_sweet/"
@@ -314,6 +313,19 @@ Uses the CTF PvP Engine.
rel.approved = True
db.session.add(rel)
db.session.commit()
metas = {}
for package in Package.query.filter_by(type=PackageType.MOD).all():
meta = None
try:
meta = metas[package.name]
except KeyError:
meta = MetaPackage(package.name)
db.session.add(meta)
metas[package.name] = meta
package.provides.append(meta)
delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
if delete_db and os.path.isfile("db.sqlite"):