mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] Fix ptxdist -q kernelconfig without extracted kernel
@ 2012-03-20 20:18 Bernhard Walle
  2012-03-23  8:00 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Walle @ 2012-03-20 20:18 UTC (permalink / raw)
  To: ptxdist

Normally if the kernel is not extracted when "ptxdist kernelconfig" is
called, ptxdist extracts the kernel first. However, when used in quiet
mode, that fails with an error like

------------------------------------------------------------------------
bash: -c: line 0: syntax error near unexpected token `;'
bash: -c: line 0: `target="/Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/kernel.get"; \
        target="${target##*/}"; dep="/Volumes/Daten/src/linux-3.3.tar.bz2"; dep="${dep##*/}"; \
        echo "${target} : ${dep}" >> /Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/depend.out; \
        echo "started : ${target}" >&; target="target: ${target##*/}"; \
        echo -e "\n${target//?/-}\n${target}\n${target//?/-}\n"; 'o
------------------------------------------------------------------------

The problem is also there when calling "ptxdist kernelconfig" from "ptxdist menu".
This patch attempts to fix the problem.

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/post/function-targetinfo.make |    3 +++
 rules/post/function-touch.make      |    3 +++
 2 files changed, 6 insertions(+)

diff --git a/rules/post/function-targetinfo.make b/rules/post/function-targetinfo.make
index f8bcebe..40e119a 100644
--- a/rules/post/function-targetinfo.make
+++ b/rules/post/function-targetinfo.make
@@ -15,6 +15,9 @@
 # Print out the targetinfo line on the terminal
 #
 ifdef PTXDIST_QUIET
+ifndef PTXDIST_FD_STDOUT
+PTXDIST_FD_STDOUT := 1
+endif
 _targetinfo_opt_output := echo "started : $(PTX_COLOR_BLUE)$${target}$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
 endif
 
diff --git a/rules/post/function-touch.make b/rules/post/function-touch.make
index 0a7919e..4d8fc28 100644
--- a/rules/post/function-touch.make
+++ b/rules/post/function-touch.make
@@ -13,6 +13,9 @@
 # touch
 #
 ifdef PTXDIST_QUIET
+ifndef PTXDIST_FD_STDOUT
+PTXDIST_FD_STDOUT := 1
+endif
 _touch_opt_output := echo "finished: $(PTX_COLOR_GREEN)$${target}$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
 endif
 
-- 
1.7.9.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH] Fix ptxdist -q kernelconfig without extracted kernel
  2012-03-20 20:18 [ptxdist] [PATCH] Fix ptxdist -q kernelconfig without extracted kernel Bernhard Walle
@ 2012-03-23  8:00 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-03-23  8:00 UTC (permalink / raw)
  To: ptxdist

On Tue, Mar 20, 2012 at 09:18:46PM +0100, Bernhard Walle wrote:
> Normally if the kernel is not extracted when "ptxdist kernelconfig" is
> called, ptxdist extracts the kernel first. However, when used in quiet
> mode, that fails with an error like
> 
> ------------------------------------------------------------------------
> bash: -c: line 0: syntax error near unexpected token `;'
> bash: -c: line 0: `target="/Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/kernel.get"; \
>         target="${target##*/}"; dep="/Volumes/Daten/src/linux-3.3.tar.bz2"; dep="${dep##*/}"; \
>         echo "${target} : ${dep}" >> /Users/bwalle/devel/ptxdist-arm-boards/platform-beagle/state/depend.out; \
>         echo "started : ${target}" >&; target="target: ${target##*/}"; \
>         echo -e "\n${target//?/-}\n${target}\n${target//?/-}\n"; 'o
> ------------------------------------------------------------------------
> 
> The problem is also there when calling "ptxdist kernelconfig" from "ptxdist menu".
> This patch attempts to fix the problem.

The basic issue is, that we need to call ptxd_make and not ptxd_make_log
here, for the user interaction. The best solution would be to avoid that,
but I'm not sure if that's even possible. So PTXDIST_FD_STDOUT /
PTXDIST_FD_STDERR should be set in ptxd_make if undefined.

Michael

> Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
> ---
>  rules/post/function-targetinfo.make |    3 +++
>  rules/post/function-touch.make      |    3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/rules/post/function-targetinfo.make b/rules/post/function-targetinfo.make
> index f8bcebe..40e119a 100644
> --- a/rules/post/function-targetinfo.make
> +++ b/rules/post/function-targetinfo.make
> @@ -15,6 +15,9 @@
>  # Print out the targetinfo line on the terminal
>  #
>  ifdef PTXDIST_QUIET
> +ifndef PTXDIST_FD_STDOUT
> +PTXDIST_FD_STDOUT := 1
> +endif
>  _targetinfo_opt_output := echo "started : $(PTX_COLOR_BLUE)$${target}$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
>  endif
>  
> diff --git a/rules/post/function-touch.make b/rules/post/function-touch.make
> index 0a7919e..4d8fc28 100644
> --- a/rules/post/function-touch.make
> +++ b/rules/post/function-touch.make
> @@ -13,6 +13,9 @@
>  # touch
>  #
>  ifdef PTXDIST_QUIET
> +ifndef PTXDIST_FD_STDOUT
> +PTXDIST_FD_STDOUT := 1
> +endif
>  _touch_opt_output := echo "finished: $(PTX_COLOR_GREEN)$${target}$(PTX_COLOR_OFF)" >&$(PTXDIST_FD_STDOUT);
>  endif
>  
> -- 
> 1.7.9.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
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
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-23  8:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-20 20:18 [ptxdist] [PATCH] Fix ptxdist -q kernelconfig without extracted kernel Bernhard Walle
2012-03-23  8:00 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox