summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:26:32 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:26:32 -0500
commitea3160d4149a18cb070bec788d57fd6c8ec0da84 (patch)
tree47b031c5460ac67cd9016d2e69b3aca15e0427ac
parent422aaee026c57b65dda81b78b6a0f49263c6dd1e (diff)
parent72ddf3b134a21896f40c94e8a9c7173f4274b7fe (diff)
Merge tag 'release_2017-01-02' into archweb-genericarchweb-generic
-rw-r--r--devel/management/commands/reporead.py18
-rw-r--r--templates/public/index.html2
2 files changed, 14 insertions, 6 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 7b963c28..c97c2384 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -30,6 +30,7 @@ from django.core.management.base import BaseCommand, CommandError
from django.db import connections, router, transaction
from django.db.utils import IntegrityError
from django.utils.timezone import now
+from django.contrib.auth.models import User
from devel.utils import UserFinder
from main.models import Arch, Package, PackageFile, Repo
@@ -401,10 +402,19 @@ 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()
+
+ if not Package.objects.filter(
+ pkgname=pkg.name).exclude(id=dbpkg.id).exists():
+ if not User.objects.filter(
+ package_relations__pkgbase=dbpkg.pkgbase,
+ package_relations__type=PackageRelation.MAINTAINER
+ ).exists():
+ packager = finder.find(pkg.packager)
+ if packager:
+ prel = PackageRelation(pkgbase=dbpkg.pkgbase,
+ user=packager,
+ type=PackageRelation.MAINTAINER)
+ prel.save()
except IntegrityError:
diff --git a/templates/public/index.html b/templates/public/index.html
index a1dda065..f28f43ce 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -114,8 +114,6 @@
title="Community documentation">Wiki</a></li>
<li><a href="{% wiki_url 'Installation_guide' %}"
title="Installation guide">Installation Guide</a></li>
- <li><a href="{% wiki_url "Beginners'_guide" %}"
- title="A good place to start for beginners">Beginners' Guide</a></li>
</ul>
<h4>Community</h4>