If the ptxdist project is build from a Source Control Management tool
that makes files read-only, then ptxdist fails when it wants to
overwrite the kernel-config after the kernel-old-config step.

It is not a real error, the oldconfig has succeed, so just print
a warning about the read-only file instead of fail completely.

Signed-off-by: Remy Bohmer <[email protected]>
---
 rules/kernel.make |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/rules/kernel.make b/rules/kernel.make
index 9477502..2bca568 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -125,7 +125,11 @@ ifdef KERNEL_INITRAMFS_SOURCE_y
 endif
 
        @$(call ptx/oldconfig, KERNEL)
-       @cp "$(KERNEL_DIR)/.config" "$(<)"
+       @if [ -w $(KERNEL_CONFIG) ]; then \
+               cp "$(KERNEL_DIR)/.config" "$(<)"; \
+        else \
+               echo "WARNING: $(KERNEL_CONFIG) is Read-only, not updating it!" 
1>&2; \
+        fi
 
 #
 # Don't keep the expanded path to INITRAMS_SOURCE in $(KERNEL_CONFIG),
-- 
1.7.0.4


-- 
ptxdist mailing list
[email protected]

Reply via email to