* [PATCH cygport] Add repro-finish command
@ 2024-03-11 11:41 Christian Franke
2024-04-29 19:34 ` Jon Turney
0 siblings, 1 reply; 2+ messages in thread
From: Christian Franke @ 2024-03-11 11:41 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Thanks for accepting the repro-check patch. A minor enhancement is attached.
The function is in pkg_pkg.cygpart instead of pkg_cleanup.cygpart
because then it is easier to keep it in sync with the other __repro_*
functions.
PS: I have a local script which checks SPDX Identifiers and expressions.
Any interest to add this to cygport and then check LICENSE settings?
--
Regards,
Christian
[-- Attachment #2: 0001-Add-repro-finish-command.patch --]
[-- Type: text/plain, Size: 3043 bytes --]
From b08796262308cf1b3a2c063349d024a5ccfd2455 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Mon, 11 Mar 2024 12:12:32 +0100
Subject: [PATCH] Add repro-finish command
This command removes the temporary directory used by repro-check.
---
README | 7 ++++---
bin/cygport.in | 4 ++++
lib/help.cygpart | 1 +
lib/pkg_pkg.cygpart | 24 +++++++++++++++++++++++-
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/README b/README
index 3c9e4d4a..a0897a4f 100644
--- a/README
+++ b/README
@@ -163,9 +163,10 @@ Other COMMANDs are meant primarily for maintainers:
diff - write a patch file capturing changes to source in the working directory
stage - as upload, but don't request processing of uploaded packages
announce - compose and send a package announcement
- repro-build - rebuild from created source package to temp directory
- repro-diff - check whether packages from original and rebuild differ
- repro-check - run repro-build and repro-diff
+ repro-build - rebuild from created source package to temp directory
+ repro-diff - check whether packages from original and rebuild differ
+ repro-check - run repro-build and repro-diff
+ repro-finish - delete the temp directory used for rebuild
The standard arguments --help or --version may also be passed to cygport.
diff --git a/bin/cygport.in b/bin/cygport.in
index df38a8b5..15bd559e 100755
--- a/bin/cygport.in
+++ b/bin/cygport.in
@@ -801,6 +801,10 @@ do
__pkg_repro_diff
_status=$?
;;
+ repro-finish)
+ __pkg_repro_finish
+ _status=$?
+ ;;
help)
__show_help;
exit 0;
diff --git a/lib/help.cygpart b/lib/help.cygpart
index d28fd7bb..ff03fb5f 100644
--- a/lib/help.cygpart
+++ b/lib/help.cygpart
@@ -59,6 +59,7 @@ __show_help() {
repro-build rebuild from created source package to temp directory
repro-diff check whether packages from original and rebuild differ
repro-check run repro-build and repro-diff
+ repro-finish delete the temp directory used for rebuild
See the included README file for further documentation.
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 25b80906..07313c66 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -1048,6 +1048,28 @@ __pkg_repro_diff() {
inform "Rebuild produced identical packages"
}
+__pkg_repro_finish() {
+ local t_spkgdir=${T}/${spkgdir##*/}
+
+ cd ${top}
+
+ __step "Removing rebuild directory in 2 seconds..."
+ inform "Rebuild dir: ${t_spkgdir}"
+ if ! [ -d ${t_spkgdir} ]
+ then
+ inform "Rebuild directory does not exist"
+ return 0
+ fi
+
+ sleep 2 || exit $?
+
+ __step "Removing rebuild directory NOW."
+ rm -rf ${t_spkgdir}
+
+ __step "Finished."
+}
+
# protect functions
readonly -f __pkg_binpkg __pkg_diff __gpg_sign __pkg_srcpkg __pkg_dist \
- __pkg_repro_build __pkg_repro_diff __squeeze_whitespace __tar
+ __pkg_repro_build __pkg_repro_diff __pkg_repro_finish \
+ __squeeze_whitespace __tar
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH cygport] Add repro-finish command
2024-03-11 11:41 [PATCH cygport] Add repro-finish command Christian Franke
@ 2024-04-29 19:34 ` Jon Turney
0 siblings, 0 replies; 2+ messages in thread
From: Jon Turney @ 2024-04-29 19:34 UTC (permalink / raw)
To: Christian Franke; +Cc: cygwin-apps
On 11/03/2024 11:41, Christian Franke via Cygwin-apps wrote:
> Thanks for accepting the repro-check patch. A minor enhancement is
> attached.
Applied. Thanks!
> The function is in pkg_pkg.cygpart instead of pkg_cleanup.cygpart
> because then it is easier to keep it in sync with the other __repro_*
> functions.
>
> PS: I have a local script which checks SPDX Identifiers and expressions.
> Any interest to add this to cygport and then check LICENSE settings?
Oh, yes please. That sounds like a good idea.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-29 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 11:41 [PATCH cygport] Add repro-finish command Christian Franke
2024-04-29 19:34 ` Jon Turney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).