From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-049.btinternet.com (mailomta28-re.btinternet.com [213.120.69.121]) by sourceware.org (Postfix) with ESMTPS id E4E073858C83 for ; Sun, 23 Apr 2023 14:43:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4E073858C83 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.54.7]) by re-prd-fep-049.btinternet.com with ESMTP id <20230423144351.YTAV13495.re-prd-fep-049.btinternet.com@re-prd-rgout-004.btmx-prd.synchronoss.net>; Sun, 23 Apr 2023 15:43:51 +0100 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 63FE9A2B061F558E X-Originating-IP: [86.140.112.72] X-OWM-Source-IP: 86.140.112.72 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvhedrfedtkedgkedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepheeuuddthefhueetgfeifefgleeitedtiefgtdffhfdvveeggeetjeeffedthefgnecukfhppeekiedrudegtddrudduvddrjedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplhhotggrlhhhohhsthdrlhhotggrlhguohhmrghinhdpihhnvghtpeekiedrudegtddrudduvddrjedvpdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopegthihgfihinhdqrghpphhssegthihgfihinhdrtghomhdprhgtphhtthhopehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhrvghvkffrpehhohhsthekiedqudegtddqudduvddqjedvrdhrrghnghgvkeeiqddugedtrdgsthgtvghnthhrrghlphhluhhsrdgtohhmpdgruhhthhgpuhhsvghrpehjohhnthhurhhnvgihsegsthhinhhtvghrnhgvthdrtghomhdpghgvohfkrfep ifeupdfovfetjfhoshhtpehrvgdqphhrugdqrhhgohhuthdqtddtge X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (86.140.112.72) by re-prd-rgout-004.btmx-prd.synchronoss.net (5.8.814) (authenticated as jonturney@btinternet.com) id 63FE9A2B061F558E; Sun, 23 Apr 2023 15:43:51 +0100 From: Jon Turney To: cygwin-apps@cygwin.com Cc: Jon Turney Subject: [PATCH setup 0/2] Detect filename collisions between packages Date: Sun, 23 Apr 2023 15:43:28 +0100 Message-Id: <20230423144330.3107-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a woefully underoptimized implementation of detecting filename collisions between packages, so it's hidden behind the command line option '--collisions' to enable it. A good implementation probably (i) collects the filenames at the same time as checksumming the archive, or has them attached to it somehow by the packaging process, and (ii) uses a libsolv string pool to hold the filenames (so we only need to compute the intersection and unions of sets of integers, which is hopefully much faster) Nevertheless, this labouriously identifies some obvious collisions which I might bring to the attention of package maintainers when I have some time to do so... Jon Turney (2): Add underlying() method to io_stream class Detect filename collisions between packages compress.h | 13 +++ compress_bz.cc | 2 - compress_bz.h | 2 - compress_gz.h | 2 - compress_xz.cc | 2 - compress_xz.h | 2 - compress_zstd.cc | 2 - compress_zstd.h | 2 - filemanifest.h | 29 ++++++ install.cc | 254 +++++++++++++++++++++++++++++++++++++++-------- io_stream.h | 31 ++---- res/en/res.rc | 3 + resource.h | 3 + 13 files changed, 266 insertions(+), 81 deletions(-) create mode 100644 filemanifest.h -- 2.39.0