Remove some old code & some minor fixes
authorDaniel Abrecht <public@danielabrecht.ch>
Fri, 13 May 2022 23:12:59 +0000 (01:12 +0200)
committerDaniel Abrecht <public@danielabrecht.ch>
Fri, 13 May 2022 23:12:59 +0000 (01:12 +0200)
chroot-build-helper/real-makefile
makefile

index f7b930eef26000cfb0b71c7b16a3eb9916d3a8e5..54f61286c1fa65d5a4cd0ebdac127f5ead44afbc 100644 (file)
@@ -10,32 +10,19 @@ build//%: DONT_BUILD_IF_IN_REPO=no
 build//%: bin/$(BUILDER_PLATFORM)/$(DISTRO)/$(RELEASE)/%/.build
        @true
 
-build-env/$(DISTRO)/$(RELEASE)/deb/%.deb: build-env/$(DISTRO)/$(RELEASE)/deb/.dir
-       getdeb.sh "$@"
-
-build-env/$(DISTRO)/$(RELEASE)/debootstrap/usr/share/debootstrap/scripts/$(RELEASE): build-env/$(DISTRO)/$(RELEASE)/deb/debootstrap.deb
-       set -e; \
-       rm -rf "build-env/$(DISTRO)/$(RELEASE)/debootstrap/"; \
-       mkdir -p "build-env/$(DISTRO)/$(RELEASE)/debootstrap/"; \
-       cd "build-env/$(DISTRO)/$(RELEASE)/debootstrap/"; \
-       ar x ../deb/debootstrap.deb; \
-       tar xzf data.tar.*;
-       [ -e "$@" ]
-       touch "$@"
-
 $(UEXEC):
        make -C .. build/bin/usernsexec
 
 $(DEBOOTSTRAP_SCRIPT):
-       make -C .. "$(DEBOOTSTRAP_SCRIPT)"
+       $(MAKE) -C .. "$(DEBOOTSTRAP_SCRIPT)"
 
 build-env/$(DISTRO)/$(RELEASE)/rootfs: build-env/.dir | $(DEBOOTSTRAP_SCRIPT) $(UEXEC)
        set -ex; \
        mkdir -p "$@.tmp"; \
        exec 8>"$@.lock"; \
        flock 8; \
-       uexec rm -rf "$@.tmp"; \
        if [ -d "$@" ]; then exit 0; fi; \
+       uexec rm -rf "$@.tmp"; \
        debootstrap-base.sh "$@.tmp"; \
        CHROOT_REPO="$$REPO" getrfsfile.sh "rootfs/etc/apt/sources.list" >"$@.tmp/etc/apt/sources.list"; \
        chns "$@.tmp" apt-get -y update; \
index 4e129ca43377ee887168a2f0c6f883d2f847b5c3..93ea49fa2935312f5fd612b19a6ed90789a1081a 100644 (file)
--- a/makefile
+++ b/makefile
@@ -42,7 +42,10 @@ build/$(IMAGE_NAME)/deb/%.deb: | build/$(IMAGE_NAME)/deb/.dir
        getdeb.sh "$@"
 
 $(DEBOOTSTRAP_SCRIPT): build/$(IMAGE_NAME)/deb/debootstrap.deb
-       set -e; \
+       set -ex; \
+       exec 8>"$@.lock"; \
+       flock 8; \
+       if [ -e "$@" ]; then exit 0; fi; \
        rm -rf "build/$(IMAGE_NAME)/debootstrap_script/"; \
        mkdir -p "build/$(IMAGE_NAME)/debootstrap_script/"; \
        cd "build/$(IMAGE_NAME)/debootstrap_script/"; \