rpms/rpm/F-10 rpm-4.6.0-fedora-specspo.patch, NONE, 1.1 rpm.spec, 1.309, 1.310 sources, 1.136, 1.137 rpm-4.5.90-posttrans.patch, 1.1, NONE

Panu Matilainen pmatilai at fedoraproject.org
Sat Feb 7 07:42:22 UTC 2009


Author: pmatilai

Update of /cvs/pkgs/rpms/rpm/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18569

Modified Files:
	rpm.spec sources 
Added Files:
	rpm-4.6.0-fedora-specspo.patch 
Removed Files:
	rpm-4.5.90-posttrans.patch 
Log Message:
- update to 4.6.0 final, fixing #475582, #478907, #476737, #479869, #476201
- fixup rpm translation lookup to match Fedora specspo (#436941)
- drop unused patch


rpm-4.6.0-fedora-specspo.patch:

--- NEW FILE rpm-4.6.0-fedora-specspo.patch ---
diff --git a/lib/tagexts.c b/lib/tagexts.c
index 501d8ac..cf71639 100644
--- a/lib/tagexts.c
+++ b/lib/tagexts.c
@@ -460,12 +460,6 @@ static int filerequireTag(Header h, rpmtd td)
 }
 
 /* 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}";
 
 /**
@@ -477,63 +471,27 @@ static const char * const _macro_i18ndomains = "%{?_i18ndomains}";
  */
 static int i18nTag(Header h, rpmTag tag, rpmtd td)
 {
-    char * dstring = rpmExpand(_macro_i18ndomains, NULL);
-    int rc;
+    int rc = headerGet(h, tag, td, HEADERGET_ALLOC);
+    if (rc) {
+    	char *de, *dstring = rpmExpand(_macro_i18ndomains, NULL);
+	const char *domain;
 
-    td->type = RPM_STRING_TYPE;
-    td->data = NULL;
-    td->count = 0;
-
-    if (dstring && *dstring) {
-	char *domain, *de;
-	const char * langval;
-	char * msgkey;
-	const char * msgid;
-	const char * n;
-	int xx;
-
-	xx = headerNVR(h, &n, NULL, NULL);
-	rasprintf(&msgkey, "%s(%s)", n, rpmTagGetName(tag));
-
-	/* change to en_US for msgkey -> msgid resolution */
-	langval = getenv(language);
-	(void) setenv(language, "en_US", 1);
-#if defined(ENABLE_NLS)
-        ++_nl_msg_cat_cntr;
-#endif
-
-	msgid = NULL;
 	for (domain = dstring; domain != NULL; domain = de) {
+	    const char *msgid = td->data;
+	    const char *msg = NULL;
+
 	    de = strchr(domain, ':');
 	    if (de) *de++ = '\0';
-	    msgid = dgettext(domain, msgkey);
-	    if (msgid != msgkey) break;
-	}
-
-	/* restore previous environment for msgid -> msgstr resolution */
-	if (langval)
-	    (void) setenv(language, langval, 1);
-	else
-	    unsetenv(language);
-#if defined(ENABLE_NLS)
-        ++_nl_msg_cat_cntr;
-#endif
-
-	if (domain && msgid) {
-	    td->data = dgettext(domain, msgid);
-	    td->data = xstrdup(td->data); /* XXX xstrdup has side effects. */
-	    td->count = 1;
-	    td->flags = RPMTD_ALLOCED;
+	    msg = dgettext(domain, td->data);
+	    if (msg != msgid) {
+		free(td->data);
+		td->data = xstrdup(msg);
+		break;
+	    }
 	}
-	dstring = _free(dstring);
-	free(msgkey);
-	if (td->data)
-	    return 1;
+	free(dstring);
     }
-
-    dstring = _free(dstring);
-
-    rc = headerGet(h, tag, td, HEADERGET_DEFAULT);
+	
     return rc;
 }
 


Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/rpm.spec,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -r1.309 -r1.310
--- rpm.spec	7 Feb 2009 07:25:44 -0000	1.309
+++ rpm.spec	7 Feb 2009 07:41:52 -0000	1.310
@@ -10,15 +10,14 @@
 %define rpmhome /usr/lib/rpm
 
 %define rpmver 4.6.0
-%define snapver rc3
-%define srcver %{rpmver}-%{snapver}
+%define srcver %{rpmver}
 
 %define bdbver 4.5.20
 
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 0.%{snapver}.1%{?dist}
+Release: 1%{?dist}
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -29,15 +28,16 @@
 Patch0: rpm-4.5.90-devel-autodep.patch
 Patch1: rpm-4.5.90-pkgconfig-path.patch
 Patch2: rpm-4.5.90-gstreamer-provides.patch
+# Fedora specspo is setup differently than what rpm expects, considering
+# this as Fedora-specific patch for now
+Patch3: rpm-4.6.0-fedora-specspo.patch
+
 # XXX only create provides for pkgconfig and libtool initially
 Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
 
 # Patches already in upstream
 Patch200: rpm-4.6.0-rc1-defaultdocdir.patch
 
-# These are not yet upstream
-Patch300: rpm-4.5.90-posttrans.patch
-
 # Partially GPL/LGPL dual-licensed and some bits with BSD
 # SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD 
 License: GPLv2+
@@ -166,13 +166,11 @@
 %patch0 -p1 -b .devel-autodep
 %patch1 -p1 -b .pkgconfig-path
 %patch2 -p1 -b .gstreamer-prov
+%patch3 -p1 -b .fedora.specspo
 %patch100 -p1 -b .pkgconfig-deps
 
 %patch200 -p1 -b .defaultdocdir
 
-# needs a bit of upstream love first...
-#%patch300 -p1 -b .posttrans
-
 %if %{with int_bdb}
 ln -s db-%{bdbver} db
 %endif
@@ -368,6 +366,13 @@
 %doc doc/librpm/html/*
 
 %changelog
+* Sat Feb 07 2009 Panu Matilainen <pmatilai at redhat.com>
+- update to 4.6.0 final: http://rpm.org/wiki/Releases/4.6.0, fixing
+  #475582, #478907, #476737, #479869, #476201
+- change platform sharedstatedir to something more sensible (#185862)
+- fixup rpm translation lookup to match Fedora specspo (#436941)
+- add rpmdb_foo links to db utils for documentation compatibility
+
 * Fri Dec 12 2008 Panu Matilainen <pmatilai at redhat.com>
 - update to 4.6.0-rc3
 - fixes segfault on oddball, legacy packages (#475214)


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/F-10/sources,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -r1.136 -r1.137
--- sources	12 Dec 2008 19:01:47 -0000	1.136
+++ sources	7 Feb 2009 07:41:52 -0000	1.137
@@ -1 +1 @@
-8f4f5f8a05fa4f4dfe34119d1059d3ce  rpm-4.6.0-rc3.tar.bz2
+77bf389f87f61ff53b068a9870aa91ca  rpm-4.6.0.tar.bz2


--- rpm-4.5.90-posttrans.patch DELETED ---




More information about the fedora-extras-commits mailing list