[arch-projects] [archweb] [PATCH] reporead: Auto-adopt new packages to packager
Johannes Löthberg
johannes at kyriasis.com
Sat Feb 13 23:29:36 UTC 2016
Signed-off-by: Johannes Löthberg <johannes at 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
More information about the arch-projects
mailing list