]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- lock rpmdb minimally
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 20 Feb 2008 16:32:51 +0000 (16:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- use C locale to avoid side effects
- skip one subshell

Changed files:
    rpm-hrmib-cache -> 1.2

rpm-hrmib-cache

index 74af68d3e4eaffdbc7d7b06d5a32d937f926ebf8..abca818657759246a320e73c62ad4dac9dc4f4dd 100644 (file)
@@ -3,13 +3,15 @@ mydir=/var/cache/hrmib
 mkdir -p $mydir || exit 1
 rm -f $mydir/*
 
-rpm -qa --qf '%{name}-%{version}-%{release}.%{arch} %{installtime:date}\n' | \
-while read nvra idate ; do
+export LC_ALL=C
+
+buf=$(rpm --nodigest --nosignature  -qa --qf '%{name}-%{version}-%{release}.%{arch} %{installtime:date}\n')
+echo "$buf" | while read nvra idate; do
    case $nvra in
    gpg-pubkey-*)
         ;;
    *)
-        touch -d "`echo $idate`" $mydir/$nvra
+        touch -d "$idate" "$mydir/$nvra"
         ;;
    esac
 done
This page took 0.044042 seconds and 4 git commands to generate.