Get rid of cycle iso rebuild

Change-Id: I0c628ae1d02c1ccc572d299190d05b3b00faaad7
This commit is contained in:
Dmitry Pyzhov 2014-04-25 19:24:12 +04:00
parent 9f1fde1238
commit 88b749d554
2 changed files with 4 additions and 2 deletions

View File

@ -18,7 +18,7 @@ $(BUILD_DIR)/mirror/ubuntu/createchroot.done:
fi
sed -i -e "s/@@UBUNTU_RELEASE@@/$(UBUNTU_RELEASE)/g" $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/multistrap.conf
sed -i -e "s]@@MIRROR_UBUNTU@@]$(MIRROR_UBUNTU)]g" $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/multistrap.conf
sudo mount -t proc none $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot/proc
mount | grep -q $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot/proc || sudo mount -t proc none $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot/proc
sudo multistrap -a amd64 -f $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/multistrap.conf -d $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot
sudo chroot $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot /bin/bash -c "dpkg --configure -a || exit 0"
sudo chroot $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot /bin/bash -c "rm -rf /var/run/*"

View File

@ -3,10 +3,12 @@
include $(SOURCE_DIR)/mirror/ubuntu/boot.mk
include $(SOURCE_DIR)/mirror/ubuntu/createchroot.mk
clean: clean-ubuntu
clean-ubuntu:
(mount -l | grep -q $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot/proc && sudo umount $(LOCAL_MIRROR_UBUNTU_OS_BASEURL)/chroot/proc) || exit 0
$(BUILD_DIR)/mirror/ubuntu/build.done: clean-ubuntu \
$(BUILD_DIR)/mirror/ubuntu/build.done: \
$(BUILD_DIR)/mirror/ubuntu/boot.done \
$(BUILD_DIR)/mirror/ubuntu/createchroot.done
$(ACTION.TOUCH)