On Saturday 24 February 2007 03:57, Ciaran McCreesh wrote: > On Fri, 23 Feb 2007 22:56:19 +0900 Jason Stubbs <[EMAIL PROTECTED]> > > wrote: > | Disallowing it would be the cleaner in terms of package manager > | responsibilities, but ... > > Well, I looked through the tree. > > There is exactly one package using this construct that doesn't get it > wrong. That package is openoffice, and it uses it to do this: > > java? ( || ( !amd64? ( =virtual/jdk-1.5* ) =virtual/jdk-1.4* ) > dev-java/ant-core )
The openoffice example above shouldn't need the !amd64? condition unless the amd64 port of openoffice itself doesn't work with a jdk-1.5 package. However, if the amd64 port does in fact not work with jdk-1.5, the only way to rewrite without losing functionality would be: amd64? ( =virtual/jdk-1.4 ) !amd64? ( || ( =virtual/jdk-1.5* =virtual/jdk-1.4* ) ) > The other fourteen packages using it are either making the mistake > described in the original email in the thread, or using it where no use > flag is required at all. > > Given that the one legitimate case can easily be rewritten in another > way with no loss of functionality, is there really a justification for > keeping this? The only compelling reason is aesthetic(sp?). Kevin Quinn rewrote the example given in ebuild(5) but in doing so functionality was lost. To rewrite it without any change in behaviour would require something like below. For the 14 cases you mentioned that were making a mistake, they probably can be rewritten so as to force an install of the first matching package, but when that isn't what is wanted it becomes a bit of a headache. || ( sdl? ( media-libs/libsdl ) svga? ( media-libs/svgalib ) opengl? ( virtual/opengl ) ggi? ( media-libs/libggi ) virtual/x ) becomes: sdl? ( svga? ( opengl? ( ggi? ( || ( media-libs/libsdl media-libs/svgalib virtual/opengl media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/libsdl media-libs/svgalib virtual/opengl virtual/x ) ) ) !opengl? ( ggi? ( || ( media-libs/libsdl media-libs/svgalib media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/libsdl media-libs/svgalib virtual/x ) ) ) ) !svga? ( opengl? ( ggi? ( || ( media-libs/libsdl virtual/opengl media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/libsdl virtual/opengl virtual/x ) ) ) !opengl? ( ggi? ( || ( media-libs/libsdl media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/libsdl virtual/x ) ) ) ) ) !sdl? ( svga? ( opengl? ( ggi? ( || ( media-libs/svgalib virtual/opengl media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/svgalib virtual/opengl virtual/x ) ) ) !opengl? ( ggi? ( || ( media-libs/svgalib media-libs/libggi virtual/x ) ) !ggi? ( || ( media-libs/svgalib virtual/x ) ) ) ) !svga? ( opengl? ( ggi? ( || ( virtual/opengl media-libs/libggi virtual/x ) ) !ggi? ( || ( virtual/opengl virtual/x ) ) ) !opengl? ( ggi? ( || ( media-libs/libggi virtual/x ) ) !ggi? ( virtual/x ) ) ) ) -- Jason Stubbs -- gentoo-dev@gentoo.org mailing list