From: Alexey Tourbin <at@altlinux.ru> To: ALT Devel discussion list <devel@lists.altlinux.org> Subject: Re: [devel] gcc-common Date: Sun, 23 Mar 2008 23:39:07 +0300 Message-ID: <20080323203907.GU31135@solemn.turbinal> (raw) In-Reply-To: <20080322200545.GN31135@solemn.turbinal> [-- Attachment #1: Type: text/plain, Size: 2316 bytes --] On Sat, Mar 22, 2008 at 11:05:45PM +0300, Alexey Tourbin wrote: > Вот buildreq теперь будет путаться. > > $ /usr/share/buildreqs/optimize_package_list gcc-c++-common gcc4.1-c++ > tsort: -: input contains a loop: > tsort: gcc-c++-common > tsort: gcc4.1-c++ > gcc-c++-common > $ Урро! Я реализовал разрыв циклов, типичных для -common пакетов, в пользу не-common пакета. commit c43c3bc22120846b84560aa83bb18fb8276037ae Author: Alexey Tourbin <at@altlinux> Date: Sun Mar 23 23:30:16 2008 +0300 optimize_package_list: detect simple RV-loops, select the package with non-virtual dependency $ ./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_list 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' <nRn-amb fi >&2 +# 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==$3{print$1,$3}' <nRn |sort -u >nn-real +awk '$2!=$3{print$1,$3}' <nRn |sort -u >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}' <nn-virt |sort -u >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-real-virt-loop + awk '{print$2,$1}' <nn-real-virt-loop |sort -u >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 <nRn |sort -u >nn +sort -u nn-real nn-virt >nn # tsort this list of pairs tsort <nn >t || [ -s t ] [-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]
prev parent reply other threads:[~2008-03-23 20:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-03-22 5:21 Alexey Tourbin 2008-03-22 13:08 ` Dmitry V. Levin 2008-03-22 20:05 ` Alexey Tourbin 2008-03-23 20:39 ` Alexey Tourbin [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080323203907.GU31135@solemn.turbinal \ --to=at@altlinux.ru \ --cc=devel@lists.altlinux.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Team development discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \ devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru public-inbox-index devel Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git