fs: ensure $(TARGET_DIR_WARNING_FILE) is writable

If the Buildroot tree is read-only, then $(TARGET_DIR_WARNING_FILE) is
copied read-only into target/ but we may want to remove it during the
build process.

This poses no real problem, since target/ itself is guaranteed to be
writable, but for good measure, force $(TARGET_DIR_WARNING_FILE) to be
writable itself.

Reported-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Yann E. MORIN 2014-01-28 21:11:25 +01:00 committed by Peter Korsgaard
parent bbb1e7ae21
commit 984524fda1
2 changed files with 2 additions and 2 deletions

View File

@ -475,7 +475,7 @@ $(BUILD_DIR)/.root:
rsync -a $(RSYNC_VCS_EXCLUSIONS) \ rsync -a $(RSYNC_VCS_EXCLUSIONS) \
--chmod=Du+w --exclude .empty --exclude '*~' \ --chmod=Du+w --exclude .empty --exclude '*~' \
$(TARGET_SKELETON)/ $(TARGET_DIR)/ $(TARGET_SKELETON)/ $(TARGET_DIR)/
cp support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE) $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
@ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK) @ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
@mkdir -p $(TARGET_DIR)/usr @mkdir -p $(TARGET_DIR)/usr
@ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK) @ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)

View File

@ -83,7 +83,7 @@ endif
echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT) echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
chmod a+x $$(FAKEROOT_SCRIPT) chmod a+x $$(FAKEROOT_SCRIPT)
$$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
cp support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) $(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE)
-@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE)
ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),)
$$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)