[Rpm-maint] Minor bug in python/rpm/__init__.py (RPM 4.11.1)

Panu Matilainen pmatilai at laiskiainen.org
Fri Oct 11 09:15:15 UTC 2013

On 09/26/2013 05:52 PM, ISE Development wrote:
> I hope this is the right place to post this information. If not, I apologise
> in advance and hopefully somebody can point me in the right direction.

Hi and apologies for late reply... yes this is the right place for rpm 
bug reports and the like.

> In python/rpmds_py.c, the ds object constructor expects the first argument
> to be a (name,flags,EVR) tuple:
>          /* TODO: if flags are specified, evr should be required too */
>          if (PyArg_ParseTuple(obj, "s|O&s", &name, depflags, &flags, &evr)) {
> However, the dsSingle function in python/rpm/__init__.py reads:
> def dsSingle(TagN, N, EVR = "", Flags = RPMSENSE_ANY):
>      return ds((N, EVR, Flags), TagN)
> EVR and Flags are swapped around in the call to ds().
> Hope this helps.

Ugh, what an embarrasing bug, thanks for reporting! It's fixed in git 
master now, just wondering whether a better fix would be just removing 
the thing entirely: its been broken for four years before anybody noticed...

	- Panu -

More information about the Rpm-maint mailing list