From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Fg5qu-0000r8-PO for garchives@archives.gentoo.org; Tue, 16 May 2006 20:09:09 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.6/8.13.6) with SMTP id k4GK7Fje031316; Tue, 16 May 2006 20:07:15 GMT Received: from mail.spikesource.com (gw1-ss-fe0.spikesource.com [209.10.209.56] (may be forged)) by robin.gentoo.org (8.13.6/8.13.6) with ESMTP id k4GK7DfZ008672 for ; Tue, 16 May 2006 20:07:14 GMT Received: from [172.16.20.228] (amur.spikesource.com [::ffff:172.16.20.228]) (AUTH: PLAIN cchan, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by mail.spikesource.com with esmtp; Tue, 16 May 2006 13:02:12 -0700 id 0017686B.446A2FC4.00006FA7 Message-ID: <446A2F39.80201@spikesource.com> Date: Tue, 16 May 2006 12:59:53 -0700 From: Christopher Chan User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-osx@gentoo.org Reply-to: gentoo-osx@lists.gentoo.org MIME-Version: 1.0 To: gentoo-osx@lists.gentoo.org Subject: [gentoo-osx] [PREFIX] config protect behavior in prefix Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: cec7bd6f-ec5c-4396-be97-73bde23ccef5 X-Archives-Hash: ff51cb06b819b348901e6152fc4fcb54 Hi, I have a question on the config protect funcitonality in a prefixed environment. We typically set the CONFIG_PROTECT and CONFIG_PROTECT_MASK flags in the profile make.defaults, etc/make.globals, etc/make.conf, or environment variable. If my prefix is '/opt/myprefix', I would expect to set my CONFIG_PROTECT to something like: CONFIG_PROTECT="/opt/myprefix/etc /opt/myprefix/var/www/localhost/htdocs/mediawiki" Basically, be explicit on the full path to be protected by portage. But a closer look in the portage.py, it does some path manipulation which, to me, seems to be a bug and out of place. This line defined mergedir as a prefixed directory path self.mergedir = os.path.normpath(myroot+os.path.sep+portage_const.EPREFIX) Then in updateprotect(), we append the contents of CONFIG_PROTECT to the prefixed mergedir. def updateprotect(self): #do some config file management prep self.protect=[] for x in string.split(self.settings["CONFIG_PROTECT"]): ppath=normalize_path(self.mergedir+x)+"/" if os.path.isdir(ppath): self.protect.append(ppath) self.protectmask=[] for x in string.split(self.settings["CONFIG_PROTECT_MASK"]): ppath=normalize_path(self.mergedir+x)+"/" if os.path.isdir(ppath): self.protectmask.append(ppath) #if it doesn't exist, silently skip it So, it ends up with my path looking like '/opt/myprefix/opt/myprefix/etc', basically, double prefixed. I believe the correct functionality would be to have the CONFIG_PROTECT directories be explicit with prefix instead of implicitly prepending to the list. The original portage only appends to 'myroot' and uses the explicit paths in CONFIG_PROTECT. Thought from others on what should be the behavior? -- gentoo-osx@gentoo.org mailing list