2012/4/28 Jeffrey Johnson <n3...@me.com>: > > On Apr 26, 2012, at 10:48 PM, Per Øyvind Karlsen wrote: > >>> >>>> But set:versions looks quite useful, and far more effective at reducing >>>> the number >>>> of dependencies than attempting a "pin-hole" optimizations with boolean >>>> expressions, discarding inequalities which are implied by other >>>> dependencies, >>>> as Per Oyvind has been attempting in Mandriva. >>> >>> Where can I find more information about this work? >> http://svn.mandriva.com/viewvc/packages/cooker/rpm/current/ >> >> Notice that pretty much all of the work related on this has been done outside >> of upstream, with much regard for it in the more experimental patches adding >> new functionality like this, hence the code certainly would need to be >> cleaned >> up, refactorized and sanitized before even being considered being pushed >> anywhere else than > > Well your overlapping dependencies removal checked in upstream is about > to get ripped out for lack of generality and bugginess. > > Here's one failure case: > > ]$ Xrpm -ba probes-test.spec > warning: R diskspace(/tmp) > 1 overlaps R diskspace(/tmp) >= 1Kb, removing R > diskspace(/tmp) > 1 > warning: R diskspace(/tmp) > 1 overlaps R diskspace(/tmp) >= 1Kb, removing R > diskspace(/tmp) > 1 > warning: R diskspace(/tmp) > 1 overlaps R diskspace(/tmp) >= 1Kb, removing R > diskspace(/tmp) > 1 > error: Failed build dependencies: > gnupg(/X/probes-test/test1.asc) = > 4E23E878D41A0A88EDFCFA5A6E744ACBA9C09E30 is needed by probes-test-1-0.src > gnupg(/X/probes-test/test2.asc) = > 7D121A8FC05DC18A4329E9EF67042EC961B7AE34 is needed by probes-test-1-0.src > gnupg(/X/probes-test/test3.asc) = > 7D121A8FC05DC18A4329E9EF67042EC961B7AE34 is needed by probes-test-1-0.src > > That's a probe, not a string, dependency. The EVR field cannot be simply > compared > because {K,M,G}b suffixes are permitted and your overlap has just removed a > necessary > and useful dependency. There are going to be many such failures with probe > dependencies > because the EVR string and flags are arguments to a probe function, not > strings to > be compared by rpmvercmp and its ilk. > > The overlap removal is also going to have issues with set:versions because > the dependcies are sorted using strcmp(1), and there is no guarantee that > you will find an overlap in adjacent items in the dependency set, or even find > *with binary search) what you wish to find. There are even deeper issues > with %_use_internal_dependency_generator 0, where the order of the > dependencies is UNSPECIFIED and not even de facto "mostly works". > > A linear search will not scale either. Don't even bother hacking that in. Perfectly understood, I didn't even think that I had commited it upstream? If so, it must've been done under a #ifdef or something?
As I don't consider any of it ready for upstream or general enough, it's no problem, I'll be continuing my work on and improving these things gradually outside of upstream, then I'll start address these issues you bring up as well when I get to your latest code. :) -- Regards, Per Øyvind ______________________________________________________________________ RPM Package Manager http://rpm5.org Developer Communication List rpm-devel@rpm5.org