On Sat, May 29, 2010 at 11:08:30PM +0200, Remy Bohmer wrote:
> 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]>
> Acked-by: Marc Kleine-Budde <[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..f8c2c09 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 $(<) ]; then \
> + cp "$(KERNEL_DIR)/.config" "$(<)"; \
> + else \
> + echo "WARNING: $(<) is Read-only, not updating it!" 1>&2; \
> + fi
I don't like this. $(KERNEL_CONFIG) may not be readonly on purpose and
changes get lost. What about:
if diff -q "$(KERNEL_DIR)/.config" "$(<)" > /dev/null; then
cp "$(KERNEL_DIR)/.config" "$(<)"
fi
Then it only fails if there are changes.
>
> #
> # Don't keep the expanded path to INITRAMS_SOURCE in $(KERNEL_CONFIG),
> --
> 1.7.0.4
>
>
> --
> ptxdist mailing list
> [email protected]
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
[email protected]