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 6EAF813829C for ; Sun, 12 Jun 2016 09:49:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4CC66E0A93; Sun, 12 Jun 2016 09:49:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BEF3CE0A92 for ; Sun, 12 Jun 2016 09:49:29 +0000 (UTC) Received: from [192.168.0.20] (ip68-5-185-102.oc.oc.cox.net [68.5.185.102]) (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 768B0340C20; Sun, 12 Jun 2016 09:49:28 +0000 (UTC) Subject: Re: [gentoo-portage-dev] [PATCH v2] Move INSTALL_MASK handling into merging To: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= , gentoo-portage-dev@lists.gentoo.org, Zac Medico References: <20160522065604.10593-3-mgorny@gentoo.org> <20160522082110.31696-1-mgorny@gentoo.org> <575D271F.1040800@gentoo.org> From: Zac Medico Message-ID: <575D3026.5020808@gentoo.org> Date: Sun, 12 Jun 2016 02:49:26 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: c7cf1451-ddc5-42f5-a92b-e53091d9e6cc X-Archives-Hash: 2302822f227b7092b7ada0fc0388bf3c On 06/12/2016 02:28 AM, Michał Górny wrote: > Dnia 12 czerwca 2016 11:10:55 CEST, Zac Medico napisał(a): >> On 05/22/2016 01:21 AM, Michał Górny wrote: >>> Introduce a new logic for INSTALL_MASK handling in merging code, >>> replacing the old code that removed matching files and directories >>> from imagedir in bash. The new code actually ignores matching files >>> on-the-fly while testing for file collisions and merging files. >>> The files are still written to CONTENTS, and output using "###" zing >>> to indicate being masked, yet are not actually merged to the >> filesystem. >> >> Since collision-protect relies on existing files in its collision test, >> install-masked files are no longer going to trigger collisions. Then, >> since the install-masked files are still written to CONTENTS, it's >> possible for the unmerge of one package to unmerge colliding files that >> belong to another package! >> >> There are a number of ways to solve this problem. For example, we could >> have the unmerge code ignore any files in CONTENTS that match the >> INSTALL_MASK value that was used at merge time. > > Hmm, thinking about this more widely (i.e. actually thinking rather than mimicking the old behavior), I think it would be better to actually use the original file set for collision-protect. This will make it possible to detect collisions that would otherwise be hidden via INSTALL_MASK. Even then, we have to carefully consider how the absence of installed files affects the collision test. It's safest for the unmerge code to be aware of the merge time INSTALL_MASK setting, and not try to unmerge the install-masked files. -- Thanks, Zac