summaryrefslogtreecommitdiff
path: root/target/iso9660
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-04-07 20:30:43 +0000
committerEric Andersen <andersen@codepoet.org>2006-04-07 20:30:43 +0000
commitee66f55213b1fd5a006e8638d524e490c9f65f3b (patch)
tree79a582b6718d15377af224e818304c73f5271c3b /target/iso9660
parentf333602f7309753302b61c8a2aa1e217d95121e4 (diff)
rework fakeroot handling to avoid races during parallel make causing several
fakeroot instances stomping eachother's temp files.
Diffstat (limited to 'target/iso9660')
-rw-r--r--target/iso9660/iso9660.mk20
1 files changed, 14 insertions, 6 deletions
diff --git a/target/iso9660/iso9660.mk b/target/iso9660/iso9660.mk
index a0b074000..1bc415aed 100644
--- a/target/iso9660/iso9660.mk
+++ b/target/iso9660/iso9660.mk
@@ -52,22 +52,30 @@ ifeq ($(strip $(BR2_TARGET_ROOTFS_ISO9660_SQUASH)),y)
ISO9660_OPTS+=-U
endif
-$(ISO9660_TARGET): host-fakeroot $(STAGING_DIR)/fakeroot.env $(EXT2_TARGET) grub mkisofs
+$(ISO9660_TARGET): host-fakeroot $(EXT2_TARGET) grub mkisofs
mkdir -p $(ISO9660_TARGET_DIR)
mkdir -p $(ISO9660_TARGET_DIR)/boot/grub
cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/
cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
cp $(LINUX_KERNEL) $(ISO9660_TARGET_DIR)/kernel
cp $(EXT2_TARGET) $(ISO9660_TARGET_DIR)/initrd
+ # Use fakeroot to pretend all target binaries are owned by root
+ rm -f $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET)
+ cat $(STAGING_DIR)/.fakeroot* > $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET)
-$(STAGING_DIR)/usr/bin/fakeroot \
- -i $(STAGING_DIR)/fakeroot.env \
- -s $(STAGING_DIR)/fakeroot.env -- \
+ -i $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET) \
+ -s $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET) -- \
chown -R root:root $(ISO9660_TARGET_DIR)
- -$(MKISOFS_TARGET) \
- -R \
- -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \
+ # Use fakeroot so mkisofs believes the previous fakery
+ $(STAGING_DIR)/usr/bin/fakeroot \
+ -i $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET) \
+ -s $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET) -- \
+ $(MKISOFS_TARGET) \
+ -R -b boot/grub/stage2_eltorito -no-emul-boot \
+ -boot-load-size 4 -boot-info-table \
-o $(ISO9660_TARGET) \
$(ISO9660_TARGET_DIR)
+ -@rm -f $(STAGING_DIR)/_fakeroot.$(ISO9660_TARGET)
iso9660root: $(ISO9660_TARGET)
echo $(ISO9660_TARGET)