diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 57b8207ae..49d0f9078 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,11 @@ +2001-04-19 Pavel Roskin + + * extfs/rpm (mcrpmfs_list): Use cpio for the listing since the + rpm output varies between versions. + (mcrpmfs_copyout): Fix processing of CONTENTS.cpio. Match + filenames beginning with "./" - they are used in the version 4 + packages. + 2001-04-17 Pavel Roskin * fish.c (open_archive_int): Redirect stderr of start_fish_server diff --git a/vfs/extfs/rpm b/vfs/extfs/rpm index 1068ffd9c..6f176c2de 100644 --- a/vfs/extfs/rpm +++ b/vfs/extfs/rpm @@ -113,7 +113,7 @@ mcrpmfs_list () echo "$FILEPREF 0 $DATE INFO/CHANGELOG" fi - rpm -qlvp "$1" | sed -e 's/^\(..........\)[-t]* /\1 1 /' + rpm2cpio "$1" | cpio -tv --quiet echo "$FILEPREF 0 $DATE CONTENTS.cpio" } @@ -150,16 +150,16 @@ mcrpmfs_copyout () INFO/OS) rpm -qp --qf "%{OS}\n" "$1" > "$3"; exit 0;; INFO/CHANGELOG) rpm -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$1" > "$3"; exit 0;; INFO/SIZE) rpm -qp --qf "%{SIZE} bytes\n" "$1" > "$3"; exit 0;; + CONTENTS.cpio) rpm2cpio "$1" > "$3"; exit 0;; *) TMPDIR=/tmp/mctmpdir.$$ mkdir $TMPDIR || exit 1 cd $TMPDIR - rpm2cpio "$1" | cpio -iumd --quiet "$2" >/dev/null - mv "$2" "$3" + # Files in RPM version 4 and above start with "./" - try both + rpm2cpio "$1" | cpio -iumd --quiet "$2" "./$2" >/dev/null + mv "$2" "$3" 2>/dev/null cd / rm -rf $TMPDIR;; - - CONTENTS.cpio) rpm2cpio "$1" > "$3"; exit 0;; esac }