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
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to