public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/1] avoid user prompts when mk-build-deps is called
@ 2018-01-25 20:36 Cedric_Hombourger
  2018-01-25 20:36 ` [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps Cedric_Hombourger
  2018-01-29 13:49 ` [PATCH 0/1] avoid user prompts when mk-build-deps is called Alexander Smirnov
  0 siblings, 2 replies; 15+ messages in thread
From: Cedric_Hombourger @ 2018-01-25 20:36 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

From: Cedric Hombourger <Cedric_Hombourger@mentor.com>

commit 498b128 caused build dependencies to be installed via mk-build-deps.

The tool may ask the user to confirm their installation but would fail when
called from bitbake (no stdin). Override the default install command to add
the -y switch (assume yes).

Cedric Hombourger (1):
  build.sh: eliminate potential prompts from mk-build-deps/apt-get

 meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.11.0


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

* [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
  2018-01-25 20:36 [PATCH 0/1] avoid user prompts when mk-build-deps is called Cedric_Hombourger
@ 2018-01-25 20:36 ` Cedric_Hombourger
  2018-01-26  7:42   ` Jan Kiszka
  2018-01-29 10:25   ` Henning Schild
  2018-01-29 13:49 ` [PATCH 0/1] avoid user prompts when mk-build-deps is called Alexander Smirnov
  1 sibling, 2 replies; 15+ messages in thread
From: Cedric_Hombourger @ 2018-01-25 20:36 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

From: Cedric Hombourger <Cedric_Hombourger@mentor.com>

commit 498b128 caused build dependencies to be installed via mk-build-deps.

The tool may ask the user to confirm installation of the dependencies but
would fail when called from bitbake (no stdin). Override the default install
command to add the -y switch to the apt-get command it uses.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index 975252e..760ebc8 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -6,8 +6,11 @@
 # Go to build directory
 cd $1
 
+# Install command to be used by mk-build-deps (use -y for non-interactive)
+install_cmd="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
+
 # Install all build deps
-mk-build-deps -i -r debian/control
+mk-build-deps -t "${install_cmd}" -i -r debian/control
 
 # If autotools files have been created, update their timestamp to
 # prevent them from being regenerated
-- 
2.11.0


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

* Re: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
  2018-01-25 20:36 ` [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps Cedric_Hombourger
@ 2018-01-26  7:42   ` Jan Kiszka
  2018-01-26  7:47     ` Hombourger, Cedric
  2018-01-29 10:25   ` Henning Schild
  1 sibling, 1 reply; 15+ messages in thread
From: Jan Kiszka @ 2018-01-26  7:42 UTC (permalink / raw)
  To: Cedric_Hombourger, isar-users

On 2018-01-25 21:36, Cedric_Hombourger@mentor.com wrote:
> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> 
> commit 498b128 caused build dependencies to be installed via mk-build-deps.
> 
> The tool may ask the user to confirm installation of the dependencies but
> would fail when called from bitbake (no stdin). Override the default install
> command to add the -y switch to the apt-get command it uses.
> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>  meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
> index 975252e..760ebc8 100644
> --- a/meta/recipes-devtools/buildchroot/files/build.sh
> +++ b/meta/recipes-devtools/buildchroot/files/build.sh
> @@ -6,8 +6,11 @@
>  # Go to build directory
>  cd $1
>  
> +# Install command to be used by mk-build-deps (use -y for non-interactive)
> +install_cmd="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"

This sneaks in --no-install-recommends, which has a value, but it should
be separated out or at least mentioned.

Also, Debug::pkgProblemResolver=yes is worth mentioning, even when it
doesn't change the outcome of the installation.

Jan

> +
>  # Install all build deps
> -mk-build-deps -i -r debian/control
> +mk-build-deps -t "${install_cmd}" -i -r debian/control
>  
>  # If autotools files have been created, update their timestamp to
>  # prevent them from being regenerated
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* RE: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
  2018-01-26  7:42   ` Jan Kiszka
@ 2018-01-26  7:47     ` Hombourger, Cedric
  2018-01-26  7:48       ` Jan Kiszka
  0 siblings, 1 reply; 15+ messages in thread
From: Hombourger, Cedric @ 2018-01-26  7:47 UTC (permalink / raw)
  To: Jan Kiszka, isar-users

Hi Jan,

If I am not mistaken these args were already passed before according to mk-build-deps (1); more specifically:

-t, --tool
    When installing the generated package use the specified tool. (default: apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends)

I have carried them over to make sure we only add -y.

Cedric


-----Original Message-----
From: Jan Kiszka [mailto:jan.kiszka@siemens.com] 
Sent: Friday, January 26, 2018 8:42 AM
To: Hombourger, Cedric <Cedric_Hombourger@mentor.com>; isar-users@googlegroups.com
Subject: Re: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps

On 2018-01-25 21:36, Cedric_Hombourger@mentor.com wrote:
> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> 
> commit 498b128 caused build dependencies to be installed via mk-build-deps.
> 
> The tool may ask the user to confirm installation of the dependencies 
> but would fail when called from bitbake (no stdin). Override the 
> default install command to add the -y switch to the apt-get command it uses.
> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>  meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh 
> b/meta/recipes-devtools/buildchroot/files/build.sh
> index 975252e..760ebc8 100644
> --- a/meta/recipes-devtools/buildchroot/files/build.sh
> +++ b/meta/recipes-devtools/buildchroot/files/build.sh
> @@ -6,8 +6,11 @@
>  # Go to build directory
>  cd $1
>  
> +# Install command to be used by mk-build-deps (use -y for 
> +non-interactive) install_cmd="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"

This sneaks in --no-install-recommends, which has a value, but it should be separated out or at least mentioned.

Also, Debug::pkgProblemResolver=yes is worth mentioning, even when it doesn't change the outcome of the installation.

Jan

> +
>  # Install all build deps
> -mk-build-deps -i -r debian/control
> +mk-build-deps -t "${install_cmd}" -i -r debian/control
>  
>  # If autotools files have been created, update their timestamp to  # 
> prevent them from being regenerated
> 

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux

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

* Re: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
  2018-01-26  7:47     ` Hombourger, Cedric
@ 2018-01-26  7:48       ` Jan Kiszka
  0 siblings, 0 replies; 15+ messages in thread
From: Jan Kiszka @ 2018-01-26  7:48 UTC (permalink / raw)
  To: Hombourger, Cedric, isar-users

On 2018-01-26 08:47, Hombourger, Cedric wrote:
> Hi Jan,
> 
> If I am not mistaken these args were already passed before according to mk-build-deps (1); more specifically:
> 
> -t, --tool
>     When installing the generated package use the specified tool. (default: apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends)
> 
> I have carried them over to make sure we only add -y.

Ah, sorry, then it's fine.

Jan

> 
> Cedric
> 
> 
> -----Original Message-----
> From: Jan Kiszka [mailto:jan.kiszka@siemens.com] 
> Sent: Friday, January 26, 2018 8:42 AM
> To: Hombourger, Cedric <Cedric_Hombourger@mentor.com>; isar-users@googlegroups.com
> Subject: Re: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
> 
> On 2018-01-25 21:36, Cedric_Hombourger@mentor.com wrote:
>> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>>
>> commit 498b128 caused build dependencies to be installed via mk-build-deps.
>>
>> The tool may ask the user to confirm installation of the dependencies 
>> but would fail when called from bitbake (no stdin). Override the 
>> default install command to add the -y switch to the apt-get command it uses.
>>
>> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>> ---
>>  meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh 
>> b/meta/recipes-devtools/buildchroot/files/build.sh
>> index 975252e..760ebc8 100644
>> --- a/meta/recipes-devtools/buildchroot/files/build.sh
>> +++ b/meta/recipes-devtools/buildchroot/files/build.sh
>> @@ -6,8 +6,11 @@
>>  # Go to build directory
>>  cd $1
>>  
>> +# Install command to be used by mk-build-deps (use -y for 
>> +non-interactive) install_cmd="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
> 
> This sneaks in --no-install-recommends, which has a value, but it should be separated out or at least mentioned.
> 
> Also, Debug::pkgProblemResolver=yes is worth mentioning, even when it doesn't change the outcome of the installation.
> 
> Jan
> 
>> +
>>  # Install all build deps
>> -mk-build-deps -i -r debian/control
>> +mk-build-deps -t "${install_cmd}" -i -r debian/control
>>  
>>  # If autotools files have been created, update their timestamp to  # 
>> prevent them from being regenerated
>>
> 
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux
> 


-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

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

* Re: [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps
  2018-01-25 20:36 ` [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps Cedric_Hombourger
  2018-01-26  7:42   ` Jan Kiszka
@ 2018-01-29 10:25   ` Henning Schild
  2018-01-29 16:31     ` [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get Cedric_Hombourger
  1 sibling, 1 reply; 15+ messages in thread
From: Henning Schild @ 2018-01-29 10:25 UTC (permalink / raw)
  To: Cedric_Hombourger; +Cc: isar-users

Am Thu, 25 Jan 2018 21:36:55 +0100
schrieb <Cedric_Hombourger@mentor.com>:

> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> 
> commit 498b128 caused build dependencies to be installed via
> mk-build-deps.
> 
> The tool may ask the user to confirm installation of the dependencies
> but would fail when called from bitbake (no stdin). Override the
> default install command to add the -y switch to the apt-get command
> it uses.
> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>  meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> b/meta/recipes-devtools/buildchroot/files/build.sh index
> 975252e..760ebc8 100644 ---
> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -6,8 +6,11 @@
>  # Go to build directory
>  cd $1

Looks good to me.

> +# Install command to be used by mk-build-deps (use -y for
> non-interactive) +install_cmd="apt-get -o
> Debug::pkgProblemResolver=yes --no-install-recommends -y" +

The comment could indicate that everything before the "-y" is the
default. i.e.
# append "-y" to the default tool of mk-build-deps

That is where Jan was wondering and without having read the manpage it
is not clear.

>  # Install all build deps
> -mk-build-deps -i -r debian/control
> +mk-build-deps -t "${install_cmd}" -i -r debian/control

Or we could drop the "-i" and explicitely call apt-get. But in the end
we would still have to carry the default tool options.
So i guess there is no point in doing that.

Henning

>  # If autotools files have been created, update their timestamp to
>  # prevent them from being regenerated


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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-01-25 20:36 [PATCH 0/1] avoid user prompts when mk-build-deps is called Cedric_Hombourger
  2018-01-25 20:36 ` [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps Cedric_Hombourger
@ 2018-01-29 13:49 ` Alexander Smirnov
  2018-01-29 15:59   ` Henning Schild
  1 sibling, 1 reply; 15+ messages in thread
From: Alexander Smirnov @ 2018-01-29 13:49 UTC (permalink / raw)
  To: Cedric_Hombourger; +Cc: isar-users

Hello Cedric,

On 01/25/2018 11:36 PM, Cedric_Hombourger@mentor.com wrote:
> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> 
> commit 498b128 caused build dependencies to be installed via mk-build-deps.
> > The tool may ask the user to confirm their installation but would 
fail when

Do you know in which circumstances this could happen?

Alex

> called from bitbake (no stdin). Override the default install command to add
> the -y switch (assume yes).
> 
> Cedric Hombourger (1):
>    build.sh: eliminate potential prompts from mk-build-deps/apt-get
> 
>   meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>   1 file changed, 4 insertions(+), 1 deletion(-)
> 

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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-01-29 13:49 ` [PATCH 0/1] avoid user prompts when mk-build-deps is called Alexander Smirnov
@ 2018-01-29 15:59   ` Henning Schild
  2018-01-29 16:14     ` Alexander Smirnov
  0 siblings, 1 reply; 15+ messages in thread
From: Henning Schild @ 2018-01-29 15:59 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: Cedric_Hombourger, isar-users

Am Mon, 29 Jan 2018 16:49:51 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:

> Hello Cedric,
> 
> On 01/25/2018 11:36 PM, Cedric_Hombourger@mentor.com wrote:
> > From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > 
> > commit 498b128 caused build dependencies to be installed via
> > mk-build-deps.  
> > > The tool may ask the user to confirm their installation but
> > > would   
> fail when
> 
> Do you know in which circumstances this could happen?

Basically whenever apt-get decides to become interactive and wants to
ask for confirmation. My patch removed an "apt-get ... -y" while the
"-y" should have stayed.

Henning

> Alex
> 
> > called from bitbake (no stdin). Override the default install
> > command to add the -y switch (assume yes).
> > 
> > Cedric Hombourger (1):
> >    build.sh: eliminate potential prompts from mk-build-deps/apt-get
> > 
> >   meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
> >   1 file changed, 4 insertions(+), 1 deletion(-)
> >   
> 


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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-01-29 15:59   ` Henning Schild
@ 2018-01-29 16:14     ` Alexander Smirnov
  2018-02-03  9:49       ` chombourger
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Smirnov @ 2018-01-29 16:14 UTC (permalink / raw)
  To: Henning Schild; +Cc: isar-users

On 01/29/2018 06:59 PM, Henning Schild wrote:
> Am Mon, 29 Jan 2018 16:49:51 +0300
> schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> 
>> Hello Cedric,
>>
>> On 01/25/2018 11:36 PM, Cedric_Hombourger@mentor.com wrote:
>>> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
>>>
>>> commit 498b128 caused build dependencies to be installed via
>>> mk-build-deps.
>>>> The tool may ask the user to confirm their installation but
>>>> would
>> fail when
>>
>> Do you know in which circumstances this could happen?
> 
> Basically whenever apt-get decides to become interactive and wants to

I do understand what this patch does. My question is exactly when 
"whenever" really happens. I've noticed such behavior several times for 
different Debian tools, but it would be nice eventually to understand 
this kind of magic.

BTW: for me it's not the point to block this patch.

Alex

> ask for confirmation. My patch removed an "apt-get ... -y" while the
> "-y" should have stayed.
> 
> Henning
> 
>> Alex
>>
>>> called from bitbake (no stdin). Override the default install
>>> command to add the -y switch (assume yes).
>>>
>>> Cedric Hombourger (1):
>>>     build.sh: eliminate potential prompts from mk-build-deps/apt-get
>>>
>>>    meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>>>    1 file changed, 4 insertions(+), 1 deletion(-)
>>>    
>>
> 

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

* [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get
  2018-01-29 10:25   ` Henning Schild
@ 2018-01-29 16:31     ` Cedric_Hombourger
  2018-01-29 18:17       ` Henning Schild
  0 siblings, 1 reply; 15+ messages in thread
From: Cedric_Hombourger @ 2018-01-29 16:31 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

From: Cedric Hombourger <Cedric_Hombourger@mentor.com>

commit 498b128 caused build dependencies to be installed via mk-build-deps.

The tool may ask the user to confirm installation of the dependencies but
would fail when called from bitbake (no stdin). Override the default install
command to add the -y switch to the apt-get command it uses.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/recipes-devtools/buildchroot/files/build.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/buildchroot/files/build.sh b/meta/recipes-devtools/buildchroot/files/build.sh
index 975252e..77e0fdd 100644
--- a/meta/recipes-devtools/buildchroot/files/build.sh
+++ b/meta/recipes-devtools/buildchroot/files/build.sh
@@ -6,8 +6,14 @@
 # Go to build directory
 cd $1
 
+# Install command to be used by mk-build-deps
+# Notes:
+#   1) everything before the -y switch is unchanged from the defaults
+#   2) we add -y to go non-interactive
+install_cmd="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y"
+
 # Install all build deps
-mk-build-deps -i -r debian/control
+mk-build-deps -t "${install_cmd}" -i -r debian/control
 
 # If autotools files have been created, update their timestamp to
 # prevent them from being regenerated
-- 
2.11.0


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

* Re: [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get
  2018-01-29 16:31     ` [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get Cedric_Hombourger
@ 2018-01-29 18:17       ` Henning Schild
  2018-01-30 20:51         ` Henning Schild
  0 siblings, 1 reply; 15+ messages in thread
From: Henning Schild @ 2018-01-29 18:17 UTC (permalink / raw)
  To: Cedric_Hombourger; +Cc: isar-users

Thanks!

Henning

Am Mon, 29 Jan 2018 17:31:05 +0100
schrieb <Cedric_Hombourger@mentor.com>:

> From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> 
> commit 498b128 caused build dependencies to be installed via
> mk-build-deps.
> 
> The tool may ask the user to confirm installation of the dependencies
> but would fail when called from bitbake (no stdin). Override the
> default install command to add the -y switch to the apt-get command
> it uses.
> 
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>  meta/recipes-devtools/buildchroot/files/build.sh | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> b/meta/recipes-devtools/buildchroot/files/build.sh index
> 975252e..77e0fdd 100644 ---
> a/meta/recipes-devtools/buildchroot/files/build.sh +++
> b/meta/recipes-devtools/buildchroot/files/build.sh @@ -6,8 +6,14 @@
>  # Go to build directory
>  cd $1
>  
> +# Install command to be used by mk-build-deps
> +# Notes:
> +#   1) everything before the -y switch is unchanged from the defaults
> +#   2) we add -y to go non-interactive
> +install_cmd="apt-get -o Debug::pkgProblemResolver=yes
> --no-install-recommends -y" +
>  # Install all build deps
> -mk-build-deps -i -r debian/control
> +mk-build-deps -t "${install_cmd}" -i -r debian/control
>  
>  # If autotools files have been created, update their timestamp to
>  # prevent them from being regenerated


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

* Re: [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get
  2018-01-29 18:17       ` Henning Schild
@ 2018-01-30 20:51         ` Henning Schild
  0 siblings, 0 replies; 15+ messages in thread
From: Henning Schild @ 2018-01-30 20:51 UTC (permalink / raw)
  To: Alexander Smirnov; +Cc: Cedric_Hombourger, isar-users

498b128 is still in next and could be fixed before hitting master. I am
all for keeping history, even if it contains mistakes so we just not
squash them.
Alex make sure to update the comment, should the hash change.

Henning

Am Mon, 29 Jan 2018 19:17:46 +0100
schrieb "[ext] Henning Schild" <henning.schild@siemens.com>:

> Thanks!
> 
> Henning
> 
> Am Mon, 29 Jan 2018 17:31:05 +0100
> schrieb <Cedric_Hombourger@mentor.com>:
> 
> > From: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > 
> > commit 498b128 caused build dependencies to be installed via
> > mk-build-deps.
> > 
> > The tool may ask the user to confirm installation of the
> > dependencies but would fail when called from bitbake (no stdin).
> > Override the default install command to add the -y switch to the
> > apt-get command it uses.
> > 
> > Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> > ---
> >  meta/recipes-devtools/buildchroot/files/build.sh | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/meta/recipes-devtools/buildchroot/files/build.sh
> > b/meta/recipes-devtools/buildchroot/files/build.sh index
> > 975252e..77e0fdd 100644 ---
> > a/meta/recipes-devtools/buildchroot/files/build.sh +++
> > b/meta/recipes-devtools/buildchroot/files/build.sh @@ -6,8 +6,14 @@
> >  # Go to build directory
> >  cd $1
> >  
> > +# Install command to be used by mk-build-deps
> > +# Notes:
> > +#   1) everything before the -y switch is unchanged from the
> > defaults +#   2) we add -y to go non-interactive
> > +install_cmd="apt-get -o Debug::pkgProblemResolver=yes
> > --no-install-recommends -y" +
> >  # Install all build deps
> > -mk-build-deps -i -r debian/control
> > +mk-build-deps -t "${install_cmd}" -i -r debian/control
> >  
> >  # If autotools files have been created, update their timestamp to
> >  # prevent them from being regenerated  
> 


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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-01-29 16:14     ` Alexander Smirnov
@ 2018-02-03  9:49       ` chombourger
  2018-02-03 17:37         ` Alexander Smirnov
  0 siblings, 1 reply; 15+ messages in thread
From: chombourger @ 2018-02-03  9:49 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 2937 bytes --]

Hi Alex,

A simple test case to demonstrate the issue consists in adding libpci-dev 
as a build dependency to example-hello
I have forked and modified hello for this purpose and modifed the recipe as 
follows:

diff --git a/meta-isar/recipes-app/example-hello/example-hello.bb 
b/meta-isar/recipes-app/example-hello/example-hello.bb
index 602a11e..af87428 100644
--- a/meta-isar/recipes-app/example-hello/example-hello.bb
+++ b/meta-isar/recipes-app/example-hello/example-hello.bb
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = 
"file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260
 
 PV = "0.2+7bf716d2"
 
-SRC_URI = "git://github.com/ilbers/hello.git;protocol=https"
-SRCREV = "7bf716d22dbdb5a83edf0fe6134c0500f1a8b1f0"
+SRC_URI = "git://github.com/chombourger/hello.git;protocol=https"
+SRCREV = "3f05efe8cd471ce0313b5de6ea992c4a46e0e647"
 
 SRC_DIR = "git"
 
If I bitbake example-hello, do_build will fail. The log will show:

The following NEW packages will be installed:
  libpci-dev libpci3 zlib1g-dev
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 317 kB of archives.
After this operation, 703 kB of additional disk space will be used.
Do you want to continue? [Y/n] Abort.

We get an "Abort" because we do not have a stdin when building from bitbake.

Hope this helps

Cedric

On Monday, January 29, 2018 at 5:15:01 PM UTC+1, Alexander Smirnov wrote:
>
> On 01/29/2018 06:59 PM, Henning Schild wrote: 
> > Am Mon, 29 Jan 2018 16:49:51 +0300 
> > schrieb Alexander Smirnov <asmi...@ilbers.de <javascript:>>: 
> > 
> >> Hello Cedric, 
> >> 
> >> On 01/25/2018 11:36 PM, Cedric_H...@mentor.com <javascript:> wrote: 
> >>> From: Cedric Hombourger <Cedric_H...@mentor.com <javascript:>> 
> >>> 
> >>> commit 498b128 caused build dependencies to be installed via 
> >>> mk-build-deps. 
> >>>> The tool may ask the user to confirm their installation but 
> >>>> would 
> >> fail when 
> >> 
> >> Do you know in which circumstances this could happen? 
> > 
> > Basically whenever apt-get decides to become interactive and wants to 
>
> I do understand what this patch does. My question is exactly when 
> "whenever" really happens. I've noticed such behavior several times for 
> different Debian tools, but it would be nice eventually to understand 
> this kind of magic. 
>
> BTW: for me it's not the point to block this patch. 
>
> Alex 
>
> > ask for confirmation. My patch removed an "apt-get ... -y" while the 
> > "-y" should have stayed. 
> > 
> > Henning 
> > 
> >> Alex 
> >> 
> >>> called from bitbake (no stdin). Override the default install 
> >>> command to add the -y switch (assume yes). 
> >>> 
> >>> Cedric Hombourger (1): 
> >>>     build.sh: eliminate potential prompts from mk-build-deps/apt-get 
> >>> 
> >>>    meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++- 
> >>>    1 file changed, 4 insertions(+), 1 deletion(-) 
> >>>     
> >> 
> > 
>

[-- Attachment #1.2: Type: text/html, Size: 4249 bytes --]

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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-02-03  9:49       ` chombourger
@ 2018-02-03 17:37         ` Alexander Smirnov
  2018-02-04  8:08           ` chombourger
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Smirnov @ 2018-02-03 17:37 UTC (permalink / raw)
  To: chombourger, isar-users

Hi,

chombourger@gmail.com 3 февраля 2018 г. 12:49:41 написал:

> Hi Alex,
>
> A simple test case to demonstrate the issue consists in adding libpci-dev
> as a build dependency to example-hello
> I have forked and modified hello for this purpose and modifed the recipe as
> follows:
>
> diff --git a/meta-isar/recipes-app/example-hello/example-hello.bb
> b/meta-isar/recipes-app/example-hello/example-hello.bb
> index 602a11e..af87428 100644
> --- a/meta-isar/recipes-app/example-hello/example-hello.bb
> +++ b/meta-isar/recipes-app/example-hello/example-hello.bb
> @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM =
> "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260
>
>  PV = "0.2+7bf716d2"
>
> -SRC_URI = "git://github.com/ilbers/hello.git;protocol=https"
> -SRCREV = "7bf716d22dbdb5a83edf0fe6134c0500f1a8b1f0"
> +SRC_URI = "git://github.com/chombourger/hello.git;protocol=https"
> +SRCREV = "3f05efe8cd471ce0313b5de6ea992c4a46e0e647"
>
>  SRC_DIR = "git"
>
> If I bitbake example-hello, do_build will fail. The log will show:
>
> The following NEW packages will be installed:
>   libpci-dev libpci3 zlib1g-dev
> 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> Need to get 317 kB of archives.
> After this operation, 703 kB of additional disk space will be used.
> Do you want to continue? [Y/n] Abort.
>
> We get an "Abort" because we do not have a stdin when building from bitbake.
>
> Hope this helps

Sure, thank you for the explanation!

BTW: applied to next.

>
> Cedric
>
> On Monday, January 29, 2018 at 5:15:01 PM UTC+1, Alexander Smirnov wrote:
>>
>> On 01/29/2018 06:59 PM, Henning Schild wrote:
>> > Am Mon, 29 Jan 2018 16:49:51 +0300
>> > schrieb Alexander Smirnov <asmi...@ilbers.de <javascript:>>:
>> >
>> >> Hello Cedric,
>> >>
>> >> On 01/25/2018 11:36 PM, Cedric_H...@mentor.com <javascript:> wrote:
>> >>> From: Cedric Hombourger <Cedric_H...@mentor.com <javascript:>>
>> >>>
>> >>> commit 498b128 caused build dependencies to be installed via
>> >>> mk-build-deps.
>> >>>> The tool may ask the user to confirm their installation but
>> >>>> would
>> >> fail when
>> >>
>> >> Do you know in which circumstances this could happen?
>> >
>> > Basically whenever apt-get decides to become interactive and wants to
>>
>> I do understand what this patch does. My question is exactly when
>> "whenever" really happens. I've noticed such behavior several times for
>> different Debian tools, but it would be nice eventually to understand
>> this kind of magic.
>>
>> BTW: for me it's not the point to block this patch.
>>
>> Alex
>>
>> > ask for confirmation. My patch removed an "apt-get ... -y" while the
>> > "-y" should have stayed.
>> >
>> > Henning
>> >
>> >> Alex
>> >>
>> >>> called from bitbake (no stdin). Override the default install
>> >>> command to add the -y switch (assume yes).
>> >>>
>> >>> Cedric Hombourger (1):
>> >>>     build.sh: eliminate potential prompts from mk-build-deps/apt-get
>> >>>
>> >>>    meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++-
>> >>>    1 file changed, 4 insertions(+), 1 deletion(-)
>> >>>
>> >>
>> >
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to isar-users+unsubscribe@googlegroups.com.
> To post to this group, send email to isar-users@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/isar-users/d7821b41-5b3e-4b7a-b5cb-08938945ac8a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
-



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

* Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called
  2018-02-03 17:37         ` Alexander Smirnov
@ 2018-02-04  8:08           ` chombourger
  0 siblings, 0 replies; 15+ messages in thread
From: chombourger @ 2018-02-04  8:08 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 4382 bytes --]

You're welcome and thank you!
(BTW: it does not look like you have pushed your updated "next" branch to 
GitHub -- no rush though)

Cedric

On Saturday, February 3, 2018 at 6:37:47 PM UTC+1, Alexander Smirnov wrote:
>
> Hi, 
>
> chomb...@gmail.com <javascript:> 3 февраля 2018 г. 12:49:41 написал: 
>
> > Hi Alex, 
> > 
> > A simple test case to demonstrate the issue consists in adding 
> libpci-dev 
> > as a build dependency to example-hello 
> > I have forked and modified hello for this purpose and modifed the recipe 
> as 
> > follows: 
> > 
> > diff --git a/meta-isar/recipes-app/example-hello/example-hello.bb 
> > b/meta-isar/recipes-app/example-hello/example-hello.bb 
> > index 602a11e..af87428 100644 
> > --- a/meta-isar/recipes-app/example-hello/example-hello.bb 
> > +++ b/meta-isar/recipes-app/example-hello/example-hello.bb 
> > @@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = 
> > "file://${LAYERDIR_isar}/licenses/COPYING.GPLv2;md5=751419260 
> > 
> >  PV = "0.2+7bf716d2" 
> > 
> > -SRC_URI = "git://github.com/ilbers/hello.git;protocol=https" 
> > -SRCREV = "7bf716d22dbdb5a83edf0fe6134c0500f1a8b1f0" 
> > +SRC_URI = "git://github.com/chombourger/hello.git;protocol=https" 
> > +SRCREV = "3f05efe8cd471ce0313b5de6ea992c4a46e0e647" 
> > 
> >  SRC_DIR = "git" 
> > 
> > If I bitbake example-hello, do_build will fail. The log will show: 
> > 
> > The following NEW packages will be installed: 
> >   libpci-dev libpci3 zlib1g-dev 
> > 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. 
> > 1 not fully installed or removed. 
> > Need to get 317 kB of archives. 
> > After this operation, 703 kB of additional disk space will be used. 
> > Do you want to continue? [Y/n] Abort. 
> > 
> > We get an "Abort" because we do not have a stdin when building from 
> bitbake. 
> > 
> > Hope this helps 
>
> Sure, thank you for the explanation! 
>
> BTW: applied to next. 
>
> > 
> > Cedric 
> > 
> > On Monday, January 29, 2018 at 5:15:01 PM UTC+1, Alexander Smirnov 
> wrote: 
> >> 
> >> On 01/29/2018 06:59 PM, Henning Schild wrote: 
> >> > Am Mon, 29 Jan 2018 16:49:51 +0300 
> >> > schrieb Alexander Smirnov <asmi...@ilbers.de <javascript:>>: 
> >> > 
> >> >> Hello Cedric, 
> >> >> 
> >> >> On 01/25/2018 11:36 PM, Cedric_H...@mentor.com <javascript:> wrote: 
> >> >>> From: Cedric Hombourger <Cedric_H...@mentor.com <javascript:>> 
> >> >>> 
> >> >>> commit 498b128 caused build dependencies to be installed via 
> >> >>> mk-build-deps. 
> >> >>>> The tool may ask the user to confirm their installation but 
> >> >>>> would 
> >> >> fail when 
> >> >> 
> >> >> Do you know in which circumstances this could happen? 
> >> > 
> >> > Basically whenever apt-get decides to become interactive and wants to 
> >> 
> >> I do understand what this patch does. My question is exactly when 
> >> "whenever" really happens. I've noticed such behavior several times for 
> >> different Debian tools, but it would be nice eventually to understand 
> >> this kind of magic. 
> >> 
> >> BTW: for me it's not the point to block this patch. 
> >> 
> >> Alex 
> >> 
> >> > ask for confirmation. My patch removed an "apt-get ... -y" while the 
> >> > "-y" should have stayed. 
> >> > 
> >> > Henning 
> >> > 
> >> >> Alex 
> >> >> 
> >> >>> called from bitbake (no stdin). Override the default install 
> >> >>> command to add the -y switch (assume yes). 
> >> >>> 
> >> >>> Cedric Hombourger (1): 
> >> >>>     build.sh: eliminate potential prompts from 
> mk-build-deps/apt-get 
> >> >>> 
> >> >>>    meta/recipes-devtools/buildchroot/files/build.sh | 5 ++++- 
> >> >>>    1 file changed, 4 insertions(+), 1 deletion(-) 
> >> >>> 
> >> >> 
> >> > 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "isar-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to isar-users+...@googlegroups.com <javascript:>. 
> > To post to this group, send email to isar-...@googlegroups.com 
> <javascript:>. 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/isar-users/d7821b41-5b3e-4b7a-b5cb-08938945ac8a%40googlegroups.com. 
>
> > For more options, visit https://groups.google.com/d/optout. 
> - 
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 9556 bytes --]

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

end of thread, other threads:[~2018-02-04  8:08 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25 20:36 [PATCH 0/1] avoid user prompts when mk-build-deps is called Cedric_Hombourger
2018-01-25 20:36 ` [PATCH 1/1] build.sh: eliminate user prompts from mk-build-deps Cedric_Hombourger
2018-01-26  7:42   ` Jan Kiszka
2018-01-26  7:47     ` Hombourger, Cedric
2018-01-26  7:48       ` Jan Kiszka
2018-01-29 10:25   ` Henning Schild
2018-01-29 16:31     ` [PATCH v2] build.sh: eliminate potential prompts from mk-build-deps/apt-get Cedric_Hombourger
2018-01-29 18:17       ` Henning Schild
2018-01-30 20:51         ` Henning Schild
2018-01-29 13:49 ` [PATCH 0/1] avoid user prompts when mk-build-deps is called Alexander Smirnov
2018-01-29 15:59   ` Henning Schild
2018-01-29 16:14     ` Alexander Smirnov
2018-02-03  9:49       ` chombourger
2018-02-03 17:37         ` Alexander Smirnov
2018-02-04  8:08           ` chombourger

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