diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2015-08-14 12:45:01 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-08-14 12:45:36 +0200 |
commit | 4bc6c55d988e508613afafbb7f8173cf1ed3270f (patch) | |
tree | c148701b63c1c652894a7ca482f81c024021c7ef | |
parent | da1153857f63babd0080c0d8ebd75d5f8400e6e9 (diff) | |
download | aurweb-4bc6c55d988e508613afafbb7f8173cf1ed3270f.tar.xz |
git-update: Move blacklist reading further down
Since c4870a9 (git-update: Only check HEAD for blacklisted packages,
2015-06-04), only the HEAD commit package name is looked up in the
blacklist. This means that we no longer need to read the blacklist
before running the commit walker. Moving the blacklist reading code
further down makes the code easier to read.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rwxr-xr-x | git-interface/git-update.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git-interface/git-update.py b/git-interface/git-update.py index 935fa5b..de6ceb4 100755 --- a/git-interface/git-update.py +++ b/git-interface/git-update.py @@ -212,9 +212,6 @@ walker = repo.walk(sha1_new, pygit2.GIT_SORT_TOPOLOGICAL) if sha1_old != "0000000000000000000000000000000000000000": walker.hide(sha1_old) -cur.execute("SELECT Name FROM PackageBlacklist") -blacklist = [row[0] for row in cur.fetchall()] - for commit in walker: for fname in ('.SRCINFO', 'PKGBUILD'): if not fname in commit.tree: @@ -293,6 +290,9 @@ pkgbase = srcinfo._pkgbase['pkgname'] cur.execute("SELECT ID FROM PackageBases WHERE Name = %s", [pkgbase]) pkgbase_id = cur.fetchone()[0] +cur.execute("SELECT Name FROM PackageBlacklist") +blacklist = [row[0] for row in cur.fetchall()] + for pkgname in srcinfo.GetPackageNames(): pkginfo = srcinfo.GetMergedPackage(pkgname) pkgname = pkginfo['pkgname'] |