[arch-projects] [archweb] [PATCH] reporead: Auto-adopt new packages to packager
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> --- devel/management/commands/reporead.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 7206117..6e26710 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -33,7 +33,7 @@ from devel.utils import UserFinder from main.models import Arch, Package, PackageFile, Repo -from packages.models import Depend, Conflict, Provision, Replacement, Update +from packages.models import Depend, Conflict, Provision, Replacement, Update, PackageRelation from packages.utils import parse_version @@ -396,6 +396,12 @@ def db_update(archname, reponame, pkgs, force=False): with transaction.atomic(): populate_pkg(dbpkg, pkg, timestamp=timestamp) Update.objects.log_update(None, dbpkg) + prel = PackageRelation(pkgbase=dbpkg.pkgbase, + user=dbpkg.packager, + type=PackageRelation.MAINTAINER) + prel.save() + + except IntegrityError: if architecture.agnostic: logger.warning("Could not add package %s; " -- 2.7.1
participants (1)
-
Johannes Löthberg