* extfs/rpm: Command line parameters fix for UPGRADE.

Fix mcrpmfs_copyout for INFO/OBSOLETES and INFO/LICENSE

        From Leonard den Ottolander <leonard@den.ottolander.nl>
This commit is contained in:
Andrew V. Samoilov 2004-08-18 21:18:07 +00:00
parent fecb161283
commit b328811d2a
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2004-08-18 Pavel S. Shirshov <pavelsh@mail.ru>
* extfs/rpm: Command line parameters fix for UPGRADE.
Fix mcrpmfs_copyout for INFO/OBSOLETES and INFO/LICENSE
From Leonard den Ottolander <leonard@den.ottolander.nl>
2004-08-16 Pavel S. Shirshov <pavelsh@mail.ru>
* extfs/deb.in: Security fix patch. Fix insecure temporary file and

View File

@ -149,6 +149,7 @@ mcrpmfs_copyout ()
INFO/BUILDTIME) $RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
INFO/SERIAL) $RPM -qp --qf "%{SERIAL}\n" "$f" >"$3"; exit 0;;
INFO/COPYRIGHT) $RPM -qp --qf "%{COPYRIGHT}\n" "$f" >"$3"; exit 0;;
INFO/LICENSE) $RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
INFO/RPMVERSION) $RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
INFO/REQUIRENAME) $RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;;
INFO/PROVIDES) $RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;;
@ -162,6 +163,7 @@ mcrpmfs_copyout ()
INFO/OS) $RPM -qp --qf "%{OS}\n" "$f" > "$3"; exit 0;;
INFO/CHANGELOG) $RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$f" > "$3"; exit 0;;
INFO/SIZE) $RPM -qp --qf "%{SIZE} bytes\n" "$f" > "$3"; exit 0;;
INFO/OBSOLETES) $RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$f" > "$3"; exit 0;;
CONTENTS.cpio) $RPM2CPIO "$1" > "$3"; exit 0;;
*)
TMPDIR=/tmp/mctmpdir.$$
@ -179,7 +181,7 @@ mcrpmfs_run ()
{
case "$2" in
INSTALL) echo "Installing \"\"$1\"\""; $RPM -ivh "$1"; exit 0;;
UPGRADE) echo "Upgrading \"\"$1\"\""; $RPM -iUvh "$1"; exit 0;;
UPGRADE) echo "Upgrading \"\"$1\"\""; $RPM -Uvh "$1"; exit 0;;
esac
}