Re: extfs trpm

Leonard den Ottolander wrote:
On Wed, 2004-10-20 at 00:44, Leonard den Ottolander wrote:


Attached you find the proposed fixes to trpm. The SEDCMD that is used in
rpm can not be used for the rpms file system. This should fix all the
quoting. Increased the "file" size for UNINSTALL to 40 as the message
"uninstalling rpm" was missing the last char.

Please check for omissions and errors before committing ;) .

One omission is that you did not properly quote filenames that might start with a hyphen. Imagine a weird rpm called -package-4.5.rpm.

To solve this you can use mc_shellquote:

mc_shellquote() {
  case "$1" in [A-Za-z0-9_./]*) echo "$1";; *) echo "./$1";; esac

trpm_copyout() {
  rpmname=`mc_shellquote "$1"`


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]