pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56586: Support keeping worklog of succeeded packages in pbulk



>Number:         56586
>Category:       pkg
>Synopsis:       Support keeping worklog in succeeded packages in pbulk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 28 11:50:00 +0000 2021
>Originator:     manphiz%gmail.com@localhost
>Release:        NetBSD 8.2
>Organization:
>Environment:
System: NetBSD yeeloong-netbsd 8.2 NetBSD 8.2 (LOONGSON) #0: Tue Mar 31 05:08:40 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/evbmips/compile/LOONGSON evbmips
Architecture: mips64el
Machine: evbmips
>Description:

	Currently in pbulk only the logs of failed packages will be
	kept by default, but here is no way to keep the logs of
	successfully built packages, which may be useful for debugging
	packages that experience runtime issues by inspecting build
	logs such as CFLAGS/LDFLAGAS, or possible issues that didn't
	fail the build process.

>How-To-Repeat:
	N/A.  This is a feature suggestion with patch.
>Fix:

	The attached patch added this support by adding a
	"keep_wrklog" option in pbulk.conf.  When this option is set
	to "yes" the pkg-build script will not remove the build log.
	This is tested locally to be working.


Index: files/pbulk/pbulk.conf
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf,v
retrieving revision 1.26
diff -u -p -r1.26 pbulk.conf
--- files/pbulk/pbulk.conf	20 Aug 2021 06:38:31 -0000	1.26
+++ files/pbulk/pbulk.conf	28 Dec 2021 11:31:13 -0000
@@ -110,9 +110,11 @@ presolve=@PREFIX@/bin/pbulk-resolve
 pscan=@PREFIX@/bin/pbulk-scan
 
 # When a package build fails, it is often necessary to have a look at
-# the working directory or the installed files. When these options are
-# set to "yes", they will be archived in the log directory.
+# the build log, working directory, or the installed files. When these
+# options are set to "yes", they will be archived in the log
+# directory.
 #
+keep_wrklog=no
 keep_wrkdir=no
 keep_prefix=no
 
Index: files/pbulk/scripts/pkg-build
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pbulk/files/pbulk/scripts/pkg-build,v
retrieving revision 1.31
diff -u -p -r1.31 pkg-build
--- files/pbulk/scripts/pkg-build	18 Dec 2016 09:36:38 -0000	1.31
+++ files/pbulk/scripts/pkg-build	28 Dec 2021 11:31:13 -0000
@@ -220,4 +220,6 @@ ${sync_package} ${pkgfile} ${pkgname} "$
 ${make} clean > ${bulklog}/${pkgname}/clean.log 2>&1 || true
 
 # Cleanup build logs on success
-rm -R ${bulklog}/${pkgname}
+if [ "$keep_wrklog" = yes ]; then
+	rm -R ${bulklog}/${pkgname}
+fi


Home | Main Index | Thread Index | Old Index