diff options
author | adrianp <adrianp> | 2007-07-14 17:17:45 +0000 |
---|---|---|
committer | adrianp <adrianp> | 2007-07-14 17:17:45 +0000 |
commit | 9685e6c665ce8aa63c7a90a25804b5d8685bacc4 (patch) | |
tree | 733bb9bf8834c4e036cdad133a94991629481b5d /mk/bulk/upload | |
parent | 264c8f28440396a0458c98a5fe136454ed8f99b5 (diff) | |
download | pkgsrc-9685e6c665ce8aa63c7a90a25804b5d8685bacc4.tar.gz |
Add support for the upcoming pkg_install-20070714 which now includes
audit-packages.
Diffstat (limited to 'mk/bulk/upload')
-rw-r--r-- | mk/bulk/upload | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/mk/bulk/upload b/mk/bulk/upload index f11eb95ad63..3d0f1f0eff0 100644 --- a/mk/bulk/upload +++ b/mk/bulk/upload @@ -1,11 +1,12 @@ #!/bin/sh -# $NetBSD: upload,v 1.37 2006/12/15 13:15:06 martti Exp $ +# $NetBSD: upload,v 1.38 2007/07/14 17:17:45 adrianp Exp $ # # Upload non-restricted binary pkgs to ftp server # AWK=${AWK:-/usr/bin/awk} +PKG_ADMIN="pkg_admin" set -eu @@ -129,7 +130,12 @@ install_required() MD5="digest md5"; SHA1="digest sha1"; -REQUIRED_PACKAGES="pkgtools/pkglint net/rsync security/audit-packages" +_INFO_VER=`${PKG_INFO} -V`; +if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER}; then + REQUIRED_PACKAGES="pkgtools/pkglint net/rsync security/audit-packages" +else + REQUIRED_PACKAGES="pkgtools/pkglint net/rsync" +fi opsys=`uname -s` case "$opsys" in @@ -208,7 +214,16 @@ done echo "upload> Making sure vulnerability-list is up-to-date:" if [ -z "$UPDATE_VULNERABILITY_LIST" -o "$UPDATE_VULNERABILITY_LIST" = "yes" ] then - env PKGVULNDIR=${distdir} download-vulnerability-list + if ${PKG_ADMIN} pmatch 'pkg_install<20070714' pkg_install-${_INFO_VER} + then + env PKGVULNDIR=${distdir} download-vulnerability-list + else + _PKGVULNDIR=`audit-packages ${AUDIT_PACKAGES_FLAGS} -Q PKGVULNDIR` + download-vulnerability-list ${DOWNLOAD_VULNERABILITY_LIST_FLAGS} + if [ "x${_PKGVULNDIR}" != "x${distdir}" ]; then + cp ${_PKGVULNDIR}/pkg-vulnerabilities ${distdir} + fi + fi echo " done." else echo " (skipped)" |