[neon/qt6/qt6-webengine/Neon/unstable] debian: use a oneshell to clobber the bashism's through

Carlos De Maine null at kde.org
Wed Sep 6 01:49:36 BST 2023


Git commit 05e90129e434cbd5584254a428d02d27ebf43fce by Carlos De Maine.
Committed on 06/09/2023 at 02:49.
Pushed by carlosdem into branch 'Neon/unstable'.

use a oneshell to clobber the bashism's through

M  +13   -5    debian/rules

https://invent.kde.org/neon/qt6/qt6-webengine/-/commit/05e90129e434cbd5584254a428d02d27ebf43fce

diff --git a/debian/rules b/debian/rules
index bab3e75..92e948c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,6 +3,7 @@
 include /usr/share/dpkg/architecture.mk
 
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DH_VERBOSE = 1
 
 PARALLEL_OPTION = $(filter parallel=%,$(DEB_BUILD_OPTIONS))
 ifneq (,$(PARALLEL_OPTION))
@@ -41,12 +42,19 @@ override_dh_auto_clean:
 		rm -f $(CURDIR)/$${fname}; \
 	done
 
-	# this init's nvm and installs the required node deps with npm in one continous go as 
-	# Makefile sh doesn't add bashism's and executes each line in a new shell thus losing all the env variables
-	. /root/.nvm/nvm.sh && \ 
-	npm install pako && \
-	npm install rollup-plugin-terser && \
+# this oneshell bash snippet  init's nvm and installs the required node deps with npm. Makefile's sh doesn't
+# know bashism's and executes each line in a new shell thus losing all the env variables
+
+.ONESHELL:
+nvm_init_please:
+	@nvm_init_please=defined
+	source /etc/profile.d/nvm-profile.sh
+	npm install pako
+	npm install rollup-plugin-terser
 	npm install yargs
+	echo $${nvm_init_please:-undefined}
+
+.PHONY: nvm_init_please
 
 # Turn on system FFmpeg libraries for 6.3
 override_dh_auto_configure:


More information about the Neon-commits mailing list