public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - handle non-existent dependency sets correctly in python (#593553)
Date: Mon, 23 Nov 2026 09:26:37 GMT [thread overview]
Message-ID: <179542599722.1.5051321507690701968.rpms-rpm-5004ac7e2706@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 5004ac7e27060a4ce68dfd5effa338aa8b467ca9
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date : 2010-05-21T13:06:25+00:00
Stats : +75/-1 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/5004ac7e27060a4ce68dfd5effa338aa8b467ca9?branch=pmatilai-v6
Log:
- handle non-existent dependency sets correctly in python (#593553)
- make find-lang look in all locale dirs (#584866)
---
diff --git a/rpm-4.8.0-findlang-localedirs.patch b/rpm-4.8.0-findlang-localedirs.patch
new file mode 100644
index 0000000..df44b4c
--- /dev/null
+++ b/rpm-4.8.0-findlang-localedirs.patch
@@ -0,0 +1,30 @@
+commit 2d468d2cd9d2a5e2f9adcdecdd9f017fe04eb77a
+Author: Till Maas <opensource@till.name>
+Date: Thu May 20 11:35:16 2010 +0300
+
+ Search all locale dirs in find-lang.sh, not just those under share/ (#159)
+
+diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh
+index bb25b31..e33ed0c 100755
+--- a/scripts/find-lang.sh
++++ b/scripts/find-lang.sh
+@@ -1,7 +1,7 @@
+ #!/bin/sh
+ #findlang - automagically generate list of language specific files
+ #for inclusion in an rpm spec file.
+-#This does assume that the *.mo files are under .../share/locale/...
++#This does assume that the *.mo files are under .../locale/...
+ #Run with no arguments gets a usage message.
+
+ #findlang is copyright (c) 1998 by W. L. Estes <wlestes@uncg.edu>
+@@ -99,8 +99,8 @@ done
+
+ find $TOP_DIR -type f -o -type l|sed '
+ s:'"$TOP_DIR"'::
+-'"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
+-'"$NO_ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
++'"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3:
++'"$NO_ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3:
+ s:^\([^%].*\)::
+ s:%lang(C) ::
+ /^$/d' > $MO_NAME
diff --git a/rpm-4.8.0-python-emptyds.patch b/rpm-4.8.0-python-emptyds.patch
new file mode 100644
index 0000000..dc55c5c
--- /dev/null
+++ b/rpm-4.8.0-python-emptyds.patch
@@ -0,0 +1,36 @@
+commit 0e0e332b466a9784620c483faa374067381e96ce
+Author: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed May 19 10:12:43 2010 +0300
+
+ Handle non-existent dependency sets in python (RhBug:593553)
+ - rpmdsNew() returns NULL if the requested dependency type doesn't
+ exist in the header. The C-side API can handle NULL to all rpmds
+ "methods" and this is how librpm deals with non-existent sets rather
+ than waste memory on for empty ds structures. However the python side
+ wasn't expecting NULL for legal requests (but not setting error either)
+ and thus blowing up with SystemError exception.
+ - Raise TypeError on illegal arguments to rpm.ds constructor, and present
+ non-existent dependency sets as empty rpm.ds objects to python. This
+ lets python callers use iteration over ds items regardless of whether
+ the dependency actually exists or not. The alternative of returning
+ None (or raising exceptions) would break existing code for no
+ particularly good reason.
+
+diff --git a/python/rpmds-py.c b/python/rpmds-py.c
+index 771cd06..4587201 100644
+--- a/python/rpmds-py.c
++++ b/python/rpmds-py.c
+@@ -288,10 +288,11 @@ static PyObject * rpmds_new(PyTypeObject * subtype, PyObject *args, PyObject *kw
+ } else {
+ ds = rpmdsNew(h, tagN, 0);
+ }
++ } else {
++ PyErr_SetString(PyExc_TypeError, "header or tuple expected");
++ return NULL;
+ }
+
+- if (ds == NULL) return NULL;
+-
+ return rpmds_Wrap(subtype, ds);
+ }
+
diff --git a/rpm.spec b/rpm.spec
index b75c809..47808c7 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 14%{?dist}
+Release: 15%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -50,6 +50,8 @@ Patch205: rpm-4.8.0-erasure-dsi.patch
Patch206: rpm-4.8.0-prep-keep-empty.patch
Patch207: rpm-4.8.0-python-nocontexts.patch
Patch208: rpm-4.8.0-python-mibool.patch
+Patch209: rpm-4.8.0-python-emptyds.patch
+Patch210: rpm-4.8.0-findlang-localedirs.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -205,6 +207,8 @@ packages on a system.
%patch206 -p1 -b .prep-keep-empty
%patch207 -p1 -b .python-nocontexts
%patch208 -p1 -b .python-mibool
+%patch209 -p1 -b .python-emptyds
+%patch210 -p1 -b .findlang-localedirs
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -420,6 +424,10 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Fri May 21 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-15
+- handle non-existent dependency sets correctly in python (#593553)
+- make find-lang look in all locale dirs (#584866)
+
* Fri Apr 23 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-14
- lose dangling symlink to extinct (and useless) berkeley_db_svc (#585174)
reply other threads:[~2026-11-23 9:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542599722.1.5051321507690701968.rpms-rpm-5004ac7e2706@fedoraproject.org \
--to=pmatilai@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox