Upcoming changes (in 1.4.1)

Anders F Björklund afb at algonet.se
Mon Aug 15 06:09:03 PDT 2011


Jeff Johnson wrote:

>> Here's a list of the upcoming changes in Smart 1.4.1:
>> 
>> - Changes to RPM version comparison, @arch and :distepoch
>> 
>> Some distributions, like Unity 2011 and Mandriva 2011,
>> now append a "Distepoch" component to the traditional
>> Epoch, Version, Release (EVR) tuple. This needs to be
>> handled in the parsing code, even if not used by smart.
>> 
>> All version comparisons now need to use "vercmp" rather
>> than "strcmp", so that they account for these tuples.
>> There is a new helper function added called "checkver",
>> which compares two version strings for equality (bool).
>> 
> 
> Should some of this be pushed into rpm-python?

I believe proyvind pushed some of it into python/,
as a replacement for the old (tuple) labelCompare ?

It is called evrSplit and evrCompare, apparently...
For accessing rpmEVRparse and rpmEVRcompare, that is.

Here is "checkver", it doesn't really add much:

def checkver(v1, v2):
    if v1 == v2:
        return True
    cmp = vercmp(v1, v2)
    return cmp == 0

Where the "vercmp" would be parse-and-compare.

> Could you also try to populate the repository origin
> of the package? This should be pretty simple:
> 	A call to headerSetOrigin() somewhere.

Sure, that could be done (with the package URL)...

The "problem" is that the original URL is "lost"
between the calls in smart, so it would have the
local URL to the cache directory which is probably
not what you want (as it is deleted after install)

So it would need to "save" the URL somewhere first.

> There's also (used by rpmrepo but otherwise mostly *shrug*)
> in diminishing priority:
> 	headerSetDigest()
> 	headerSetStatbuf()
> 	headerSetStartOff()
> 	headerSetEndOff()
> 	headerSetBaseURL()
> that would make it easier to re-generate repo-md spewage directly
> from whatever is installed by smart in an rpmdb.

Hmm, wonder what digest to use or what base URL ?
But I suppose those could be set, before addInstall.

None of them seem to exported to python, it seems.
Could be done from C, using a extension callback...

Like the rpmvercmp vector:
https://bugs.launchpad.net/smart/+bug/777125

Or the arm_eabi() helper:
https://bugs.launchpad.net/smart/+bug/351823

>> - Recommends will now be installed by default, like apt
>> 
>> There are two settings: "install-recommends" (true) and
>> "install-suggests" (false) that can be used to change the
>> behaviour, if needed. These values affect the *parsing*,
>> so any change requires updating the cache - from files.
>> 
>> Everything still uses Requires, there are no "weak"
>> dependencies in the depsolving code that Smart uses.
>> The same goes for "Requires(missingok):" in RPM, but
>> those are already loaded so there's no big difference.
>> 
> 
> Is this apt-only? There is no differentiated Recommends: <-> Suggests:
> in *.rpm I'm aware of.

Right, this was for dpkg packages (apt-deb) mostly...
https://bugs.launchpad.net/smart/+bug/268143

Even if also available in openSUSE RPM and their tags.
The RPMTAG_SUGGESTS* tags, and <rpm:recommends> meta ?

--anders




More information about the Smart mailing list