summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2016-02-13 21:42:12 +0100
committerAngel Velasquez <angvp@archlinux.org>2016-07-31 05:36:13 +0000
commit77fe5ea1f9dc978c68fb6b01b6185dcb5f11908f (patch)
tree88d41b2e39f409947543088db2caeb6e3d67fe4c /devel
parentedd9f77dbadbe80c49722fcf021f719443164782 (diff)
reporead: Auto-adopt new packages to packager
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Angel Velasquez <angvp@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 72061176..6e26710f 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -33,7 +33,7 @@ from django.utils.timezone import now
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; "