summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:32:50 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-04 22:32:50 -0500
commit8e742b884e38d15b874cb506d8674b46c72ca960 (patch)
tree1dc0bc9072de5e217b6e478a5fd298473046972d
parent58fc4756e9822d39f224a8773209e306349146e0 (diff)
parentea3160d4149a18cb070bec788d57fd6c8ec0da84 (diff)
Merge branch 'archweb-generic' into lukeshu/netbootlukeshu/netboot
-rw-r--r--devel/management/commands/reporead.py18
-rw-r--r--templates/public/index.html3
2 files changed, 17 insertions, 4 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 12c01fbc..c1eaec6d 100644
--- a/templates/public/index.html
+++ b/templates/public/index.html
@@ -112,6 +112,9 @@
<ul>
<li><a href="{% wiki_url %}"
title="Community documentation">Wiki</a></li>
+ <!-- NB: ArchWiki has merged the "Beginners' guide" into the
+ main "Installation Guide". I expect that ParabolaWiki
+ will follow suit soon. -->
<li><a href="{% wiki_url "Beginners'_guide" %}"
title="A good place to start for beginners">Beginners' Guide</a></li>
<li><a href="{% wiki_url 'Installation_Guide' %}"