From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PTcCD-0000Oy-3Y for garchives@archives.gentoo.org; Fri, 17 Dec 2010 15:26:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9BE6FE06EE; Fri, 17 Dec 2010 15:26:02 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id BB06CE059B for ; Fri, 17 Dec 2010 15:25:13 +0000 (UTC) Received: by wyf22 with SMTP id 22so891164wyf.40 for ; Fri, 17 Dec 2010 07:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:x-mailer:mime-version:content-type; bh=n4uQFE7wHnbHrUIeyl1p6sBW2rQ0cQxLLjcjUjwfmf4=; b=vH6ijw30uh7BYcIlmyFUTyaUpvVmHEF1YABsGX1VaYz3lwkRTooNmwN5z68/ZCNLhB 2/fwI7uZv9Fci1qwM+NfD5JZptEEQFOqd5Glxf2YgUVN1/4G9Yf1fIsb+N7kfQA2FI0f JwlGLphAFV0QJhRUE4IoaFjqd27ThWc9z2GyI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type; b=RQaVG7yIeDxtCu8BL8vtliXAA5/EBnTDfZswkp6X9ueaNXU+ai9F19o3uvNYfO1PdA PT9xGcb0XUvHmA1BxS4XXcS5S2YomogckB/gurR95TIQn355pyPe4tL+4wFoDlzmNhJR N8cAuoN3Ps4elUki5TFs/Avc5GuRGcSxZTFbY= Received: by 10.216.141.16 with SMTP id f16mr1195166wej.80.1292599512769; Fri, 17 Dec 2010 07:25:12 -0800 (PST) Received: from snowcone (cpc1-broo3-0-0-cust98.14-2.cable.virginmedia.com [86.4.208.99]) by mx.google.com with ESMTPS id n3sm259874wer.30.2010.12.17.07.25.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Dec 2010 07:25:12 -0800 (PST) Date: Fri, 17 Dec 2010 15:25:04 +0000 From: Ciaran McCreesh To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] What are || ( ) dependencies? Message-ID: <20101217152504.30ab8f1c@snowcone> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/=s9Tx.EVBQIORhsLM71.Bk="; protocol="application/pgp-signature" X-Archives-Salt: b6169cb5-5125-4db6-ae65-d74beb6c67cf X-Archives-Hash: 6977c4c839e3ff3356d159cbe0c173cd --Sig_/=s9Tx.EVBQIORhsLM71.Bk= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable How should a dependency like || ( a b c ) be interpreted? Traditionally, it's been described as something like: * if a matches an installed package, a * otherwise, if b matches an installed package, b * otherwise, if c matches an installed package, c * otherwise, if a is installable, a * otherwise, if b is installable, b * otherwise, if c is installable, c * otherwise, error Things get messier when you've got || ( a >b-2.1 ) and b-2.0 is installed and a is not. Should b be upgraded to 2.1, or should a be selected? What about if you decide upon a early on, and then later on something hard-depends upon b? What about if you've got || ( a[foo] b ) and a[-foo] is installed? As a result of things like this, Portage has had various different sets of heuristics over time, and Paludis has had a different set. This is causing problems. Specifically, consider a dependency like the following, which is present in quite a few ebuilds: || (=20 =3Dx11-libs/libX11-1.3.99.901 ) Paludis currently interprets this as "I prefer <1.3.99.901, but will also accept >=3D1.3.99.901". In particular, if <1.3.99.901[xcb] is already installed, libX11 won't be upgraded. Some Portage versions also do this, and others don't. There's one easy fix, which solves this and every other possible convoluted case (and some of those can be fairly horrible...): require ebuild developers to always list 'best' things leftmost. So if you're doing || ( >=3Da-2 =3D dep first (even if the >=3D version is masked -- that's guaranteed to work). If the dependency is rewritten like this then all the ambiguity goes away: || (=20 >=3Dx11-libs/libX11-1.3.99.901 =3D / < case)? --=20 Ciaran McCreesh --Sig_/=s9Tx.EVBQIORhsLM71.Bk= Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iEYEARECAAYFAk0LgNMACgkQ96zL6DUtXhHsOgCeJpVw6/1S6c9VlejgaTLk487S m48An3k+JcU5xfi/k0Pcj6OmDYHNVQq1 =c9un -----END PGP SIGNATURE----- --Sig_/=s9Tx.EVBQIORhsLM71.Bk=--