2011/4/5 Jeff Johnson <n3...@mac.com>:
>
> On Apr 5, 2011, at 4:13 PM, Per Øyvind Karlsen wrote:
>
>>>
>> Hm, okay, so better obviously needs to be done.
>>
>
> Have a go at fixing if you wish.
Here's the code that breaks things:
    /* Lose the inheirited %description (if present). */
    {   HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
        int xx;
        he->tag = RPMTAG_DESCRIPTION;
        xx = headerGet(pkg->header, he, 0);
        he->p.ptr = _free(he->p.ptr);
        if (xx && he->t == RPM_STRING_TYPE)
            xx = headerDel(pkg->header, he, 0);
    }

I assume that what's intended is that headerGet() should set the following:
he->t = RPM_I18NSTRING_TYPE,
but in stead it will always be
he->t = RPM_STRING_TYPE.

So the result is that the only the last description gets added to the package.

Is there a bug in headerGet(), or something about the logic I fail to comprehend
here?

--
Regards,
Per Øyvind
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to