From: Elan Ruusamäe Date: Wed, 21 May 2008 19:15:42 +0000 (+0000) Subject: - avoid commandline args overflow X-Git-Tag: auto/ac/rpm-build-macros-1_452-1~2 X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=commitdiff_plain;h=62cdf60a9a029626aa5e826819007cb452005cbe - avoid commandline args overflow Changed files: rpm-hrmib-cache -> 1.11 --- diff --git a/rpm-hrmib-cache b/rpm-hrmib-cache index 096e7d8..8ee25bb 100644 --- a/rpm-hrmib-cache +++ b/rpm-hrmib-cache @@ -1,7 +1,7 @@ #!/bin/sh build_hrmib_cache() { - # skip if no rpm(1) or touch(1) - [ -x /bin/rpm -a -x /bin/touch ] || return + # skip if no rpm(1), touch(1), xargs(1) + [ -x /bin/rpm -a -x /bin/touch -a -x /bin/xargs ] || return export LC_ALL=C umask 002 @@ -10,7 +10,7 @@ build_hrmib_cache() { echo >&2 "Populating $mydir with initial contents" mkdir -p $mydir || return - rm -f $mydir/* + echo $mydir/* | xargs rm -f buf=$(rpm --nodigest --nosignature -qa --qf '%{N}-%{V}-%{R}.%{ARCH} %{INSTALLTIME:date}\n') echo "$buf" | while read nvra idate; do