From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 23 Mar 2008 23:39:07 +0300 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20080323203907.GU31135@solemn.turbinal> Mail-Followup-To: ALT Devel discussion list References: <20080322052142.GM31135@solemn.turbinal> <20080322130808.GE9304@wo.int.altlinux.org> <20080322200545.GN31135@solemn.turbinal> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4fNq9Po2wJlmxAaR" Content-Disposition: inline In-Reply-To: <20080322200545.GN31135@solemn.turbinal> Subject: Re: [devel] gcc-common X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.10b3 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Mar 2008 20:39:08 -0000 Archived-At: List-Archive: List-Post: --4fNq9Po2wJlmxAaR Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 22, 2008 at 11:05:45PM +0300, Alexey Tourbin wrote: > =F7=CF=D4 buildreq =D4=C5=D0=C5=D2=D8 =C2=D5=C4=C5=D4 =D0=D5=D4=C1=D4=D8= =D3=D1. >=20 > $ /usr/share/buildreqs/optimize_package_list gcc-c++-common gcc4.1-c++ = =20 > tsort: -: input contains a loop: > tsort: gcc-c++-common > tsort: gcc4.1-c++ > gcc-c++-common > $ =F5=D2=D2=CF! =F1 =D2=C5=C1=CC=C9=DA=CF=D7=C1=CC =D2=C1=DA=D2=D9=D7 =C3=C9= =CB=CC=CF=D7, =D4=C9=D0=C9=DE=CE=D9=C8 =C4=CC=D1 -common =D0=C1=CB=C5=D4=CF= =D7, =D7 =D0=CF=CC=D8=DA=D5 =CE=C5-common =D0=C1=CB=C5=D4=C1. commit c43c3bc22120846b84560aa83bb18fb8276037ae Author: Alexey Tourbin Date: Sun Mar 23 23:30:16 2008 +0300 optimize_package_list: detect simple RV-loops, select the package with = non-virtual dependency =20 $ ./rpm-utils/optimize_package_list gcc-common gcc4.1 optimize_package_list: simple RV-loop (first package takes precedence): gcc4.1 <-> gcc-common gcc4.1 $ ./rpm-utils/optimize_package_list sendmail-common postfix optimize_package_list: simple RV-loop (first package takes precedence): postfix <-> sendmail-common postfix $ diff --git a/rpm-utils/optimize_package_list b/rpm-utils/optimize_package_l= ist index cdf6b99..3311e77 100755 --- a/rpm-utils/optimize_package_list +++ b/rpm-utils/optimize_package_list @@ -66,8 +66,29 @@ if [ -s R-amb ]; then sed -e 's/ / -> /g' &2 =20 +# Assist loop breaks. Consider this: +# gcc-common /usr/bin/i586-alt-linux-gcc gcc4.1 +# gcc4.1 gcc-common gcc-common +# We would like gcc4.1 to take precedence, because gcc4.1 explicitly +# requires gcc-common. +awk '$2=3D=3D$3{print$1,$3}' nn-real +awk '$2!=3D$3{print$1,$3}' nn-virt +comm -23 nn-virt nn-real >nn-virt-only +mv -f nn-virt-only nn-virt +# nn-real: gcc4.1 gcc-common +# nn-virt: gcc-common gcc4.1 +awk '{print$2,$1}' reverse-nn-virt +comm -12 reverse-nn-virt nn-real >nn-real-virt-loop +if [ -s nn-real-virt-loop ]; then + echo "$PROG: simple RV-loop (first package takes precedence):" + sed -e 's/ / <-> /g' nn-virt-bad + comm -23 nn-virt nn-virt-bad >nn-virt-good + mv -f nn-virt-good nn-virt +fi >&2 + # make list of package pairs where first depends on second -cut -d' ' -f1,3 nn +sort -u nn-real nn-virt >nn =20 # tsort this list of pairs tsort t || [ -s t ] --4fNq9Po2wJlmxAaR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEARECAAYFAkfmv+sACgkQfBKgtDjnu0aDlgCeLfI5/LmCLwI0C27GcdPKZeWZ HrEAoNZYeH6D6RSUOaTuAxPzNrZQVVal =rUmx -----END PGP SIGNATURE----- --4fNq9Po2wJlmxAaR--