slackware-current/source/a/rpm2tgz/patches/0008-Avoid-none-values-in-slack-desc.patch
Patrick J Volkerding 75a4a592e5 Slackware 13.37
Mon Apr 25 13:37:00 UTC 2011
Slackware 13.37 x86_64 stable is released!

Thanks to everyone who pitched in on this release: the Slackware team,
the folks producing upstream code, and linuxquestions.org for providing
a great forum for collaboration and testing.

The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD.  Please consider supporting the Slackware
project by picking up a copy from store.slackware.com.  We're taking
pre-orders now, and offer a discount if you sign up for a subscription.

As always, thanks to the Slackware community for testing, suggestions,
and feedback.  :-)

Have fun!
2018-05-31 22:45:18 +02:00

36 lines
1.3 KiB
Diff

From 31205a87c10659e5e4534825e8aece34c5b6dba8 Mon Sep 17 00:00:00 2001
From: Igor Murzov <igor@gplsoft.org>
Date: Thu, 5 Aug 2010 11:22:31 +0400
Subject: [PATCH 08/09] Avoid (none) values in slack-desc
---
rpm2targz | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/rpm2targz b/rpm2targz
index 45ac1d7..d9d6a8b 100644
--- a/rpm2targz
+++ b/rpm2targz
@@ -209,7 +209,18 @@ for i in $* ; do
if [ "$DESC" = "true" ]; then
get_meta_data $i
mkdir -p $TMPDIR/install
- rpm -qp --qf '%{NAME} (%{SUMMARY})\n\n%{DESCRIPTION}\n\n %{URL}\n' $i | head -n 11 | sed -r "s/^/$PRGNAM: /" > $TMPDIR/install/slack-desc
+ if [ "$(rpm -qp --qf %{SUMMARY} $i )" != '(none)' ] ; then
+ rpm -qp --qf "$PRGNAM (%{SUMMARY})\n\n" $i > $TMPDIR/install/slack-desc
+ else
+ echo -en "$PRGNAM\n\n" > $TMPDIR/install/slack-desc
+ fi
+ if [ "$(rpm -qp --qf %{DESCRIPTION} $i )" != '(none)' ] ; then
+ rpm -qp --qf "%{DESCRIPTION}\n\n" $i >> $TMPDIR/install/slack-desc
+ fi
+ if [ "$(rpm -qp --qf %{URL} $i )" != '(none)' ] ; then
+ rpm -qp --qf " %{URL}\n" $i >> $TMPDIR/install/slack-desc
+ fi
+ sed -ri "s/^/$PRGNAM: /;11q" $TMPDIR/install/slack-desc
fi
# If this program was called as "rpm2targz", then repack as a plain
--
1.7.1