vfs/extfs/rpm
- From: Roland Illig <roland illig gmx de>
- To: MC Devel <mc-devel gnome org>
- Subject: vfs/extfs/rpm
- Date: Fri, 21 Jan 2005 13:46:29 +0100
Hi,
I just noticed that we quoted too much in the rpm script. After applying
the patch, rpm works again for me, using rpm-2.5.4 on NetBSD.
But I'm a little bit confused about the bug report that is mentioned in
out script:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=64007
Roland
Index: rpm
===================================================================
RCS file: /cvsroot/mc/mc/vfs/extfs/rpm,v
retrieving revision 1.22
diff -u -p -u -r1.22 rpm
--- rpm 3 Sep 2004 21:23:05 -0000 1.22
+++ rpm 21 Jan 2005 12:43:21 -0000
@@ -25,10 +25,13 @@ else
RPM="rpm"
fi
RPM2CPIO="rpm2cpio"
-SED="sed"
-# Surround the whole filename with single quotes and handle specially
-# \', ' and \ at the end of the string.
-SEDCMD="s/\\(\\\\\\?\\)'/'\\1\\1\\\\''/g;s/\\\\\$/'\\\\\\\\'/;s/^/'/;s/\$/'/"
+
+mcrpmfs_quote() {
+ case "$1" in
+ /*) echo "$1";;
+ *) echo "./$1";;
+ esac
+}
mcrpmfs_list ()
{
@@ -38,7 +41,7 @@ mcrpmfs_list ()
if test -z "$MCFASTRPM"; then
MCFASTRPM=$MCFASTRPM_DFLT
fi
- f="`echo "$1" | $SED "$SEDCMD"`"
+ f=`mcrpmfs_quote "$1"`
FILEPREF="-r--r--r-- 1 root root "
DESC=`$RPM -qip "$f" 2>/dev/null` || {
echo "$FILEPREF 0 "`date +"%b %d %H:%M"`" ERROR"
@@ -133,7 +136,7 @@ mcrpmfs_list ()
mcrpmfs_copyout ()
{
- f="`echo "$1" | $SED "$SEDCMD"`"
+ f=`mcrpmfs_quote "$1"`
case "$2" in
HEADER) $RPM -qip "$f" > "$3"; exit 0;;
INSTALL) echo "# Run this to install this RPM package" > "$3"; exit 0;;
@@ -175,7 +178,7 @@ mcrpmfs_copyout ()
mcrpmfs_run ()
{
- f="`echo "$1" | $SED "$SEDCMD"`"
+ f=`mcrpmfs_quote "$1"`
case "$2" in
INSTALL) echo "Installing \"\"$f\"\""; $RPM -ivh "$f"; exit 0;;
UPGRADE) echo "Upgrading \"\"$f\"\""; $RPM -Uvh "$f"; exit 0;;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]