Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xbps-src: default XBPS_MAKEJOBS to `nproc`
@ 2022-11-05  6:36 classabbyamp
  2022-11-05  7:03 ` [PR PATCH] [Updated] " classabbyamp
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: classabbyamp @ 2022-11-05  6:36 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 564 bytes --]

There is a new pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages xbps-src/j-auto
https://github.com/void-linux/void-packages/pull/40331

xbps-src: default XBPS_MAKEJOBS to `nproc`
previously this defaulted to 1. In some rare cases, nproc is not desirable, but that can be easily overriden in the standard ways, etc/conf or -jN.


#### Testing the changes
- I tested the changes in this PR: **YES**



A patch file from https://github.com/void-linux/void-packages/pull/40331.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xbps-src/j-auto-40331.patch --]
[-- Type: text/x-diff, Size: 2324 bytes --]

From c59238e760803f1ace5f3952a3045a60807d7f9b Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 5 Nov 2022 02:27:50 -0400
Subject: [PATCH 1/2] xbps-src: default XBPS_MAKEJOBS to `nproc`

previously this defaulted to 1. In some rare cases, nproc is not
desirable, but that can be easily overriden in the standard ways,
etc/conf or -jN.
---
 common/xbps-src/shutils/common.sh | 1 -
 xbps-src                          | 3 +++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh
index a640528f4d6a..d523b97d1e29 100644
--- a/common/xbps-src/shutils/common.sh
+++ b/common/xbps-src/shutils/common.sh
@@ -482,7 +482,6 @@ setup_pkg() {
     DESTDIR=$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${sourcepkg}-${version}
     PKGDESTDIR=$XBPS_DESTDIR/$XBPS_CROSS_TRIPLET/${pkg}-${version}
 
-    : ${XBPS_MAKEJOBS:=1}
     export XBPS_ORIG_MAKEJOBS=${XBPS_ORIG_MAKEJOBS:=$XBPS_MAKEJOBS}
     if [ -n "$disable_parallel_build" ]; then
         XBPS_MAKEJOBS=1
diff --git a/xbps-src b/xbps-src
index 47681826196b..2fc16f56a247 100755
--- a/xbps-src
+++ b/xbps-src
@@ -489,6 +489,9 @@ fi
 [ -n "$XBPS_ARG_CHECK_PKGS" ] && XBPS_CHECK_PKGS="$XBPS_ARG_CHECK_PKGS"
 [ -n "$XBPS_ARG_MAKEJOBS" ] && XBPS_MAKEJOBS="$XBPS_ARG_MAKEJOBS"
 
+# Default to nproc for XBPS_MAKEJOBS if not set
+: ${XBPS_MAKEJOBS:=$(nproc)}
+
 export XBPS_BUILD_ONLY_ONE_PKG XBPS_SKIP_REMOTEREPOS XBPS_BUILD_FORCEMODE \
        XBPS_INFORMATIVE_RUN XBPS_TEMP_MASTERDIR XBPS_BINPKG_EXISTS \
        XBPS_USE_GIT_REVS XBPS_CHECK_PKGS XBPS_DEBUG_PKGS XBPS_SKIP_DEPS \

From 21cee01defd7a05bd076f3e07535ea14346512e0 Mon Sep 17 00:00:00 2001
From: classabbyamp <void@placeviolette.net>
Date: Sat, 5 Nov 2022 02:34:02 -0400
Subject: [PATCH 2/2] etc/defaults.conf: document nproc XBPS_MAKEJOBS default

---
 etc/defaults.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/defaults.conf b/etc/defaults.conf
index d69b4a454087..02399b7f91a6 100644
--- a/etc/defaults.conf
+++ b/etc/defaults.conf
@@ -64,7 +64,7 @@ XBPS_SUCMD="sudo /bin/sh -c"
 
 # [OPTIONAL]
 # Number of parallel jobs to execute when building packages that
-# use make(1) or alike commands.
+# use make(1) or alike commands. Defaults to the result of nproc(1).
 #
 #XBPS_MAKEJOBS=4
 

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-12-23  2:15 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-05  6:36 [PR PATCH] xbps-src: default XBPS_MAKEJOBS to `nproc` classabbyamp
2022-11-05  7:03 ` [PR PATCH] [Updated] " classabbyamp
2022-11-05  7:09 ` abenson
2022-11-05  7:10 ` [PR PATCH] [Updated] " classabbyamp
2022-11-05  9:33 ` dataCobra
2022-11-05 11:16 ` jcgruenhage
2022-11-06  1:39 ` [RFC] " ahesford
2022-11-16 13:52 ` dataCobra
2022-11-16 14:55 ` ahesford
2022-12-22 20:02 ` vincele
2022-12-23  2:15 ` [PR PATCH] [Merged]: " classabbyamp

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 NNTP newsgroup(s).