SOURCES: rpm-hrmib-cache - avoid commandline args overflow

glen glen at pld-linux.org
Wed May 21 21:15:47 CEST 2008


Author: glen                         Date: Wed May 21 19:15:47 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- avoid commandline args overflow

---- Files affected:
SOURCES:
   rpm-hrmib-cache (1.10 -> 1.11) 

---- Diffs:

================================================================
Index: SOURCES/rpm-hrmib-cache
diff -u SOURCES/rpm-hrmib-cache:1.10 SOURCES/rpm-hrmib-cache:1.11
--- SOURCES/rpm-hrmib-cache:1.10	Sat Feb 23 22:18:44 2008
+++ SOURCES/rpm-hrmib-cache	Wed May 21 21:15:42 2008
@@ -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 @@
 
 	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
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-hrmib-cache?r1=1.10&r2=1.11&f=u



More information about the pld-cvs-commit mailing list