From owner-freebsd-pkg@freebsd.org Mon Jul 24 22:12:16 2017 Return-Path: Delivered-To: freebsd-pkg@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEF1FDA9C53 for ; Mon, 24 Jul 2017 22:12:16 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell1.rawbw.com (shell1.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id BE5017EDF8; Mon, 24 Jul 2017 22:12:16 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from yv.noip.me (c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56]) (authenticated bits=0) by shell1.rawbw.com (8.15.1/8.15.1) with ESMTPSA id v6OMCASx023124 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Mon, 24 Jul 2017 15:12:10 -0700 (PDT) (envelope-from yuri@rawbw.com) X-Authentication-Warning: shell1.rawbw.com: Host c-24-6-186-56.hsd1.ca.comcast.net [24.6.186.56] claimed to be yv.noip.me To: freebsd-pkg@freebsd.org From: Yuri Subject: [feature idea] Allow duplicate files with the same content Cc: lifanov@freebsd.org, Kubilay Kocak Message-ID: <96dbc99f-3a21-423d-18b8-6737c5517ff8@rawbw.com> Date: Mon, 24 Jul 2017 15:12:09 -0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 22:12:16 -0000 Problem: Currently several py-backports-* ports install the same __init__.py file into the same location. This is the only conflict between several ports. This was by design, because they didn't think it matters to overwrite the same file installed by another package. [1] I am suggesting to solve this by introducing this feature into pkg: * pkg will ignore duplicate files installed by multiple packages if their content is identical * pkg will maintain the reference count for each installed file, and will silently delete it once the last package using it is uninstalled. This automatically solves the above problem, and can also be useful in some other cases when the same installed file needs to be shared by two or more packages. Opinions? I am equally okay with both thumbs-up and thumbs-down. References: [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219794 [2] https://reviews.freebsd.org/D11095 Yuri