[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] update_jdn: install the conf files before installing the packages

Mattia Rizzolo gitlab at salsa.debian.org
Wed Mar 3 18:12:02 GMT 2021



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
c43fad84 by Mattia Rizzolo at 2021-03-03T19:11:51+01:00
update_jdn: install the conf files before installing the packages

we are also installing conf for apt, which is needed before actually running apt

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


1 changed file:

- update_jdn.sh


Changes:

=====================================
update_jdn.sh
=====================================
@@ -265,11 +265,37 @@ if ! test -h /chroots; then
 	fi
 fi
 
+#
+# deploy package configuration in /etc and /usr
+#
+cd $BASEDIR
+for h in common common-amd64 common-i386 common-arm64 common-armhf "$HOSTNAME" ; do
+	# $HOSTNAME has precedence over common-$DPKG_ARCH over common
+	case $h in
+		common-amd64) [ $DPKG_ARCH = "amd64" ] || continue ;;
+		common-i386)  [ $DPKG_ARCH = "i386" ] || continue ;;
+		common-arm64) [ $DPKG_ARCH = "arm64" ] || continue ;;
+		common-armhf) [ $DPKG_ARCH = "armhf" ] || continue ;;
+		*) ;;
+	esac
+	if [ -d "hosts/$h/etc/sudoers.d/" ]; then
+		for f in "hosts/$h/etc/sudoers.d/"* ; do
+			/usr/sbin/visudo -c -f "$f" > /dev/null
+		done
+	fi
+	for d in etc usr ; do
+		if [ -d "hosts/$h/$d" ]; then
+			sudo cp --preserve=mode,timestamps -r "hosts/$h/$d/"* "/$d"
+		fi
+	done
+done
+
+
+#
+# install packages we need
+#
 # only on Debian systems
 if [ -f /etc/debian_version ] ; then
-	#
-	# install packages we need
-	#
 	if [ $BASEDIR/$0 -nt $STAMP ] || [ ! -f $STAMP ] ; then
 		DEBS="
 			apt-utils
@@ -637,30 +663,6 @@ fi
 # harmless but has a service which can fail and thus can make maintenance jobs unstable
 ( dpkg -l munin-async 2>/dev/null && sudo apt-get remove munin-async ) || true
 
-#
-# deploy package configuration in /etc and /usr
-#
-cd $BASEDIR
-for h in common common-amd64 common-i386 common-arm64 common-armhf "$HOSTNAME" ; do
-	# $HOSTNAME has precedence over common-$DPKG_ARCH over common
-	case $h in
-		common-amd64) [ $DPKG_ARCH = "amd64" ] || continue ;;
-		common-i386)  [ $DPKG_ARCH = "i386" ] || continue ;;
-		common-arm64) [ $DPKG_ARCH = "arm64" ] || continue ;;
-		common-armhf) [ $DPKG_ARCH = "armhf" ] || continue ;;
-		*) ;;
-	esac
-	if [ -d "hosts/$h/etc/sudoers.d/" ]; then
-		for f in "hosts/$h/etc/sudoers.d/"* ; do
-			/usr/sbin/visudo -c -f "$f" > /dev/null
-		done
-	fi
-	for d in etc usr ; do
-		if [ -d "hosts/$h/$d" ]; then
-			sudo cp --preserve=mode,timestamps -r "hosts/$h/$d/"* "/$d"
-		fi
-	done
-done
 # we ship one or two service files…
 sudo systemctl daemon-reload
 



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/c43fad84a5cc23cd9f3c48f9918ff54ec9e332dc

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/c43fad84a5cc23cd9f3c48f9918ff54ec9e332dc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20210303/c62e54a9/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list