From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 17908138CCC for ; Wed, 6 May 2015 20:30:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3A5D9E087B; Wed, 6 May 2015 20:30:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9486BE0879 for ; Wed, 6 May 2015 20:30:16 +0000 (UTC) Received: from [10.0.31.145] (unknown [100.42.98.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zmedico) by smtp.gentoo.org (Postfix) with ESMTPSA id 89D16340A67 for ; Wed, 6 May 2015 20:30:15 +0000 (UTC) Message-ID: <554A79D3.1040001@gentoo.org> Date: Wed, 06 May 2015 13:30:11 -0700 From: Zac Medico User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-portage-dev@lists.gentoo.org Reply-to: gentoo-portage-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-portage-dev@lists.gentoo.org Subject: Re: [gentoo-portage-dev] repos.conf location w.r.t PORTAGE_CONFIGROOT References: <1430931268.27859.102.camel@transmode.se> <554A5F6D.5030807@gentoo.org> <1430939630.27859.113.camel@transmode.se> <1430941307.27859.116.camel@transmode.se> <554A7189.30503@gentoo.org> <1430943756.27859.126.camel@transmode.se> In-Reply-To: <1430943756.27859.126.camel@transmode.se> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit X-Archives-Salt: 2c540afd-55bb-489d-957d-37ccb223c108 X-Archives-Hash: 97d95cd3419bdbd344025549867bcc94 On 05/06/15 13:22, Joakim Tjernlund wrote: > On Wed, 2015-05-06 at 12:54 -0700, Zac Medico wrote: >> On 05/06/15 12:41, Joakim Tjernlund wrote: >>> On Wed, 2015-05-06 at 19:13 +0000, Joakim Tjernlund wrote: >>>> On Wed, 2015-05-06 at 11:37 -0700, Zac Medico wrote: >>>>> On 05/06/15 09:54, Joakim Tjernlund wrote: >>>>>> I am trying to rebuild an old cross sysroot and I got problems. >>>>>> I cannot make emerge to select my old ebuilds in an overlay over those >>>>>> in /usr/portage. >>>>>> >>>>>> What new is since last time I did this is /etc/portage/repos.conf/ >>>>>> I suspect emerge always reads /etc/portage/repos.conf/ no matter >>>>>> what I set PORTAGE_CONFIGROOT / ROOT to ? >>>>>> >>>>>> Jocke >>>>>> >>>>> >>>>> It instantiates 2 config instances, one using /etc/portage/repos.conf >>>>> (for build time DEPEND) and another one using >>>>> $PORTAGE_CONFIGROOT/etc/portage/repos.conf (for run time {P,R}DEPEND). >>>>> You can see that it's joined with PORTAGE_CONFIGROOT in the >>>>> load_repository_config function: >>>>> >>>>> https://gitweb.gentoo.org/proj/portage.git/tree/pym/portage/repository/config.py?id=0f191113cccd049e11 >>>>> fdbe >>>>> 73 >>>>> 493eb1efbf4bf89e#n971 >>>> >>>> I see, doesn't this prevent exactly what I want to do? >>>> >>>> I can't see why this should be needed, it only creates a mess, another example: >>>> I tried to specify exact version of my old binutils and while that worked, portage wanted >>>> to pull in a newer binutils-config from the hosts master gentoo repo and >>>> thus the build failed. >>>> >>>> If a someone really wants this behaviour, he can just add the hosts master repo >>>> in his PORTAGE_CONFIGROOT IMHO >>>> >> >> Maybe emerge --root-deps=rdeps is what you are looking for. This will >> cause it to ignore DEPEND. > > That is not the same is it? if I "emerge ncurses" it will build ncurses but still > take the ebuild from the hosts master since it is newer version. > > I realize now that I can change what repos are searched by using PORTAGE_REPOSITORIES=/my/own/repos.conf/ > but I still find the default behaviour very confusing and I don't see that it is useful. The idea is that you have separate repositories configured for each ROOT. If it's satisfying a build-time DEPEND that will be installed into ROOT=/, then it's supposed to use the repositories configured for ROOT=/. > What is 'extra_files' in load_repository_config()? Can I as a user add those or does portage > add some of its own? Currently, that argument is only used by repoman, since it uses a StringIO instance to adjust the config there. Unless you are using the python API directly, this functionality is currently not exposed to the user. >> >>> >>> Is there a way to make portage to prefer ebuilds from an overlay/other repo even if the master >>> repo has newer versions? >>> >>> Jocke >>> >> >> You can use repo atoms in /etc/portage/package.mask. For example, >> 'sys-devel/binutils-config::gentoo', or '*/*::gentoo'. > > Nice! Can I also mask everything '*/*::gentoo' and then only unmask sys-devel/binutils-config::gentoo ? Yes. -- Thanks, Zac