]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- avoid commandline args overflow
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 21 May 2008 19:15:42 +0000 (19:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-hrmib-cache -> 1.11

rpm-hrmib-cache

index 096e7d84cbf6ac503b630e6c9bebf654c5d0ab25..8ee25bb410e2bfff1b92a9531faefcd1d2f6becf 100644 (file)
@@ -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
This page took 0.044216 seconds and 4 git commands to generate.