X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-hrmib-cache;h=8ee25bb410e2bfff1b92a9531faefcd1d2f6becf;hb=18ebe47bdcf42333464c48127f49208713cddae1;hp=d793086a0fedc8918ef56f7e0dfe5d325696d8eb;hpb=7f23b189a0d61c54ad699b1ce8ad6b6c91449b94;p=packages%2Frpm.git diff --git a/rpm-hrmib-cache b/rpm-hrmib-cache index d793086..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,9 +10,9 @@ 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 'gpg*' --qf '%{N}-%{V}-%{R}%|ARCH?{.%{ARCH}}| %{INSTALLTIME:date}\n') + buf=$(rpm --nodigest --nosignature -qa --qf '%{N}-%{V}-%{R}.%{ARCH} %{INSTALLTIME:date}\n') echo "$buf" | while read nvra idate; do touch -d "$idate" "$mydir/$nvra" done