On Mar 6, 2011, at 12:13 PM, Per Øyvind Karlsen wrote: > 2011/3/6 Jeff Johnson <n3...@mac.com>: >> Under #ifdef RPM_VENDOR_MANDRIVA please. >>
*please* (or I will). >> The problem you are trying to solve is with aliasing >> for a package identifier, which sometimes has >> Distepoch: and sometimes does not? > Yes, primarily to treat EVR as being duplicate independent of distepoch > or not. > The second purpose is to remove duplicates of NEVR so that they get > removed in stead, ensuring NEVR to always be the last item of > %{provide{name,flags,version}}. This patch isn't close to being "correct" and could/should be simplified. E.g. if you are gonna call headerSprintf() anyways, there's no need to call headerGet() for RPMTAG_NAME, just write the --queryformat including "%{NAME}". >> >> If so the patch is mostly in the right place, but a "real" >> solution will be to decide on convention(s) for >> RPMTAG_NAME this is used solely for identification >> RPMTAG_PROVIDENAME this is used solely for assertions >> What is confusing is that those two usage cases have exactly the same string >> values, and adding Distepoch: has confused matters a bit (not in an >> important way). >> >> The convention(s) (that need to be finalized) are implemented >> when RPMTAG_PROVIDENAME is added to a header, not here, where >> you are essentially substituting one alias for the other >> where the real need (imho) is to split "identification" <-> "assertion" >> name spaces cleanly. > But distepoch is for both identification and assertion though.. Not true. The PRCO assertions need to return a T/F, the strings used as input are entirely arbitrary (as long is ordering is preferred so that inequalities can be formed with T == "ranges overlap" F == "ranges do not overlap" Ther's no "identification" function there whatsoever. (aside) There's an example of a different encoding for dependencies that memoizes all strings in a table, sorts the table, then masks the entire triple into a 64bit integer that SHOULD have exactly the same T/F results as the original srings (regradless of Distepoch presence or not). Code is in lib/tevr.c if interested. 73 de Jeff ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org