From 32a2500e40958333aa0f2fe317949d815dc4bea6 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 2 Nov 2016 08:01:35 +0200 Subject: [PATCH] Fix harmless unused variable warning from fedora-specspo patch Fedora specspo version is much simpler than the upstream one and doesn't need to change languages etc, just drop the unused foa tripping warnings.o --- ...o.patch => rpm-4.13.0-fedora-specspo.patch | 31 ++++++++++++++----- rpm.spec | 7 +++-- 2 files changed, 29 insertions(+), 9 deletions(-) rename rpm-4.9.90-fedora-specspo.patch => rpm-4.13.0-fedora-specspo.patch (75%) diff --git a/rpm-4.9.90-fedora-specspo.patch b/rpm-4.13.0-fedora-specspo.patch similarity index 75% rename from rpm-4.9.90-fedora-specspo.patch rename to rpm-4.13.0-fedora-specspo.patch index 61394cf..64416c7 100644 --- a/rpm-4.9.90-fedora-specspo.patch +++ b/rpm-4.13.0-fedora-specspo.patch @@ -1,8 +1,24 @@ diff --git a/lib/tagexts.c b/lib/tagexts.c -index dc0e0fb..e0a5d1f 100644 +index f72ff60..2c0b179 100644 --- a/lib/tagexts.c +++ b/lib/tagexts.c -@@ -478,59 +478,29 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}"; +@@ -535,15 +535,6 @@ static int filerequireTag(Header h, rpmtd td, headerGetFlags hgflags) + return filedepTag(h, RPMTAG_REQUIRENAME, td, hgflags); + } + +-/* I18N look aside diversions */ +- +-#if defined(ENABLE_NLS) +-extern int _nl_msg_cat_cntr; /* XXX GNU gettext voodoo */ +-#endif +-static const char * const language = "LANGUAGE"; +- +-static const char * const _macro_i18ndomains = "%{?_i18ndomains}"; +- + /** + * Retrieve i18n text. + * @param h header +@@ -554,59 +545,30 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}"; */ static int i18nTag(Header h, rpmTag tag, rpmtd td, headerGetFlags hgflags) { @@ -20,7 +36,11 @@ index dc0e0fb..e0a5d1f 100644 - const char * langval; - char * msgkey; - const char * msgid; -- ++ if (rc) { ++ static const char * const _macro_i18ndomains = "%{?_i18ndomains}"; ++ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL); ++ const char *domain; + - rasprintf(&msgkey, "%s(%s)", headerGetString(h, RPMTAG_NAME), - rpmTagGetName(tag)); - @@ -28,10 +48,7 @@ index dc0e0fb..e0a5d1f 100644 - langval = getenv(language); - (void) setenv(language, "en_US", 1); - ++_nl_msg_cat_cntr; -+ if (rc) { -+ char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL); -+ const char *domain; - +- - msgid = NULL; for (domain = dstring; domain != NULL; domain = de) { + const char *msgid = td->data; diff --git a/rpm.spec b/rpm.spec index 00331c4..6f12f4a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}1%{?dist} +Release: %{?snapver:0.%{snapver}.}2%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2 @@ -43,7 +43,7 @@ BuildRequires: libdb-devel Patch1: rpm-4.11.x-siteconfig.patch # Fedora specspo is setup differently than what rpm expects, considering # this as Fedora-specific patch for now -Patch2: rpm-4.9.90-fedora-specspo.patch +Patch2: rpm-4.13.0-fedora-specspo.patch # In current Fedora, man-pages pkg owns all the localized man directories Patch3: rpm-4.9.90-no-man-dirs.patch # gnupg2 comes installed by default, avoid need to drag in gnupg too @@ -556,6 +556,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Wed Nov 02 2016 Panu Matilainen - 4.13.0-0.rc2.2 +- Fix harmless unused variable warning from fedora-specspo patch + * Thu Oct 20 2016 Panu Matilainen - 4.13.0-0.rc2.1 - Rebase to rpm 4.13.0-rc2