From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from re-prd-fep-042.btinternet.com (mailomta5-re.btinternet.com [213.120.69.98]) by sourceware.org (Postfix) with ESMTPS id F2D9938582AA for ; Wed, 29 Jun 2022 13:13:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F2D9938582AA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from re-prd-rgout-001.btmx-prd.synchronoss.net ([10.2.54.4]) by re-prd-fep-042.btinternet.com with ESMTP id <20220629131322.GRHH3291.re-prd-fep-042.btinternet.com@re-prd-rgout-001.btmx-prd.synchronoss.net>; Wed, 29 Jun 2022 14:13:22 +0100 Authentication-Results: btinternet.com; auth=pass (PLAIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613A8CC32C1826B5 X-Originating-IP: [86.139.167.41] X-OWM-Source-IP: 86.139.167.41 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrudegledgieduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeuveejtdfgfffggfekjeeuueevvefggefgjefhudeugfduhfejffeufeehhffgleenucffohhmrghinhepsghrrghntghhrggslhgvrdgtohhmpdhprhgvqdhinhhsthgrlhhlrdhshhdptgihghifihhnrdgtohhmnecukfhppeekiedrudefledrudeijedrgedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplgduledvrdduieekrddurddutdehngdpihhnvghtpeekiedrudefledrudeijedrgedupdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeevhhhrihhsthhirghnrdfhrhgrnhhkvgesthdqohhnlhhinhgvrdguvgdprhgtphhtthhopegthihgfihinhdqrghpphhssegthihgfihinhdrtghomh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from [192.168.1.105] (86.139.167.41) by re-prd-rgout-001.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613A8CC32C1826B5; Wed, 29 Jun 2022 14:13:22 +0100 Message-ID: Date: Wed, 29 Jun 2022 14:13:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH setup] Add perpetual support for preremove scripts Content-Language: en-GB To: Christian Franke , "cygwin-apps@cygwin.com" References: From: Jon Turney In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3570.5 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, 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 X-BeenThere: cygwin-apps@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin package maintainer discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Jun 2022 13:13:25 -0000 On 26/06/2022 17:33, Christian Franke wrote: > Use case: I ITP etckeeper (https://etckeeper.branchable.com/) which I > frequently use on Debian. For fully automatic operation, it requires > pre-install and post-install hooks, e.g: > > /etc/preremove/0p_000_etckeeper_pre-install.sh > /etc/postinstall/zp_zzz_etckeeper_post-install.sh > > This patch adds the missing functionality to run the pre-install hook. > It is limited to /etc/preremove/0p_* because there is possibly no use > case for /etc/preremove/zp_*. Thanks. I'm not sure what you mean by 'there is possibly no use case': That you don't have one currently, or that you've reasoned that there can't be one? > 'class Perpetual0RemoveFindVisitor' is borrowed from postinstall.cc and > modified. It still uses the ugly pre-C++11 hack to disable copy-ctor and > operator=. Possible refactoring like merging all 3 mostly similar > visitors into one (or if C++11 is now allowed, use lambda functions > instead) are left for later. Yeah, some refactoring would make this simpler and easier to understand. :) I applied this patch. Can you please also write a patch for [1] (source in [2]) to document this? [1] https://cygwin.com/packaging-package-files.html#postinstall [2] https://cygwin.com/git/?p=cygwin-htdocs.git;a=blob;f=packaging-package-files.html