RPM Community Forums

Mailing List Message of <rpm-devel>

Re: why does RPM 5.1.0 think some fulfilled dependencies are not fulfilled?

From: Jeff Johnson <n3npq@mac.com>
Date: Tue 15 Apr 2008 - 14:47:49 CEST
Message-Id: <649EAAC6-3DC9-47A3-852B-3219DD935B69@mac.com>

On Apr 15, 2008, at 8:21 AM, Ralf S. Engelschall wrote:

> On Tue, Apr 15, 2008, Jeff Johnson wrote:
>
>> On Apr 15, 2008, at 7:29 AM, Ralf S. Engelschall wrote:
>>
>> Here's where perl erasure was added to the transaction:
>>
>>> D:    upgrade erases perl-5.10.0-20080413
>>
>> Does perl-utils attempt a virtual Provide: for perl?
>
> Ah, NO: It "Requires:" perl!
>
> Find the perl-util.spec under:
> http://cvs.openpkg.org/fileview?f=openpkg-src/perl-util/perl-util.spec
>
> As you can see, it's a regular package which just dependends on  
> "perl".
>

Hmmm ... here's the line that retrieves candidates that might be erased:

     mi = rpmtsInitIterator(ts, _upgrade_tag, rpmteN(p), 0);

If rpmteN(p) is returning "perl' rather than "perl-util", that  
explains the erasure.

The logic that splits N-V-R.A to initialize rpmteN() value
has assumptions about '-' as a separator. From lib/rpmte.c

     he->tag = RPMTAG_NVRA;
     xx = headerGet(h, he, 0);
assert(he->p.str != NULL);
     p->NEVR = (xx ? he->p.str : xstrdup("?N-?V-?R.?A"));
     p->name = xstrdup(p->NEVR);
     /* XXX discard ".arch" from NVRA */
     if ((p->release = strrchr(p->name, '.')) != NULL)
         *p->release++ = '\0';
     if ((p->release = strrchr(p->name, '-')) != NULL)
         *p->release++ = '\0';
     if ((p->version = strrchr(p->name, '-')) != NULL)
         *p->version++ = '\0';

The reason for using RPMTA_NVRA rather than individual tags (as before)
was to have one single macro that defines how a package identifier
is displayed everywhere, including in --query, in package file names, in
debugging output, with full control of encoding character set.

But reverting to RPMTAG_NAME et al, or adding assertions to double check
the splitting appear necessary. This is the 2nd bug in 3 days in the  
code above.

73 de Jeff
Received on Tue Apr 15 14:48:40 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.