diff options
author | Michał Masłowski <mtjm@mtjm.eu> | 2012-10-16 15:42:10 +0200 |
---|---|---|
committer | Michał Masłowski <mtjm@mtjm.eu> | 2012-10-16 15:42:10 +0200 |
commit | c6542576f04e6dc159e731b50a19f1a10d9d5ff3 (patch) | |
tree | d4c52f7377519476bb9abd0481d7e92e8d4fb9e4 /db-list-unsigned-packages | |
parent | f4c42f9e68131ad4fbfb1be07fb44678eb90d6f7 (diff) |
db-list-unsigned-packages: rewrite using a helper Python script.
The previous implementation parsed each tarball multiple times having
quadratic time complexity in the number of packages. It was too slow
for a complete run.
Diffstat (limited to 'db-list-unsigned-packages')
-rwxr-xr-x | db-list-unsigned-packages | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/db-list-unsigned-packages b/db-list-unsigned-packages index 35a5421..26e22eb 100755 --- a/db-list-unsigned-packages +++ b/db-list-unsigned-packages @@ -29,19 +29,10 @@ if [ $# -lt 1 ]; then fi arch=$1 -pkgarch=$2 +shift for repo in ${PKGREPOS[@]} do db="${FTP_BASE}/${repo}/os/${arch}/${repo}.db" - for f in $(tar tf $db | egrep /desc$) - do - if ! tar xOf $db $f | fgrep %PGPSIG% > /dev/null - then - if [ -z $2 ] || tar xOf $db $f | fgrep -A1 %ARCH% | fgrep $pkgarch > /dev/null - then - echo $repo/${f%/desc} - fi - fi - done + "$(dirname $0)/db-list-unsigned-packages.py" "$@" < "$db" done |