From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6515090200378474496 Date: Sat, 3 Feb 2018 01:49:29 -0800 (PST) From: chombourger@gmail.com To: isar-users Message-Id: In-Reply-To: <4dd8dbf0-92b3-891f-4012-f1bb19560ed3@ilbers.de> References: <20180125203655.6894-1-Cedric_Hombourger@mentor.com> <4e857783-a4ae-7649-523c-ae277fef6bab@ilbers.de> <20180129165954.404a1ab8@mmd1pvb1c.ad001.siemens.net> <4dd8dbf0-92b3-891f-4012-f1bb19560ed3@ilbers.de> Subject: Re: [PATCH 0/1] avoid user prompts when mk-build-deps is called MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_12497_294025488.1517651370036" X-Google-Token: EKmL1tMFlrU9YukZIhE0 X-Google-IP: 81.14.33.59 X-TUID: PAL5DksehlX/ ------=_Part_12497_294025488.1517651370036 Content-Type: multipart/alternative; boundary="----=_Part_12498_2136744412.1517651370036" ------=_Part_12498_2136744412.1517651370036 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 >: > > > >> Hello Cedric, > >> > >> On 01/25/2018 11:36 PM, Cedric_H...@mentor.com wrote: > >>> From: Cedric Hombourger > > >>> > >>> 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(-) > >>> > >> > > > ------=_Part_12498_2136744412.1517651370036 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Alex,

A simple test case to demonstrate the issu= e 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-he= llo.bb b/meta-isar/recipes-app/example-hello/example-hello.bb
index 602a= 11e..af87428 100644
--- a/meta-isar/recipes-app/example-hello/example-he= llo.bb
+++ b/meta-isar/recipes-app/example-hello/example-hello.bb
@@ = -10,8 +10,8 @@ LIC_FILES_CHKSUM =3D "file://${LAYERDIR_isar}/licenses/= COPYING.GPLv2;md5=3D751419260
=C2=A0
=C2=A0PV =3D "0.2+7bf716d2&= quot;
=C2=A0
-SRC_URI =3D "git://github.com/ilbers/hello.git;pro= tocol=3Dhttps"
-SRCREV =3D "7bf716d22dbdb5a83edf0fe6134c0500f1= a8b1f0"
+SRC_URI =3D "git://github.com/chombourger/hello.git;p= rotocol=3Dhttps"
+SRCREV =3D "3f05efe8cd471ce0313b5de6ea992c4a= 46e0e647"
=C2=A0
=C2=A0SRC_DIR =3D "git"
=C2=A0
= If I bitbake example-hello, do_build will fail. The log will show:

T= he following NEW packages will be installed:
=C2=A0 libpci-dev libpci3 z= lib1g-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" becau= se we do not have a stdin when building from bitbake.

Hope this help= s

Cedric

On Monday, January 29, 2018 at 5:15:01 PM UTC+1, Ale= xander 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>:
>=20
>> Hello Cedric,
>>
>> On 01/25/2018 11:36 PM, Cedric_H...@mentor.com wrote:
>>> From: Cedric Hombourger <Cedric_H...@mentor.com>
>>>
>>> commit 498b128 caused build dependencies to be installed v= ia
>>> mk-build-deps.
>>>> The tool may ask the user to confirm their installatio= n but
>>>> would
>> fail when
>>
>> Do you know in which circumstances this could happen?
>=20
> Basically whenever apt-get decides to become interactive and wants= to

I do understand what this patch does. My question is exactly when=20
"whenever" really happens. I've noticed such behavior sev= eral times for=20
different Debian tools, but it would be nice eventually to understand= =20
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&quo= t; while the
> "-y" should have stayed.
>=20
> Henning
>=20
>> Alex
>>
>>> called from bitbake (no stdin). Override the default insta= ll
>>> command to add the -y switch (assume yes).
>>>
>>> Cedric Hombourger (1):
>>> =C2=A0 =C2=A0 build.sh: eliminate potential prompts from m= k-build-deps/apt-get
>>>
>>> =C2=A0 =C2=A0meta/recipes-devtools/buildchroot/files/= build.sh | 5 ++++-
>>> =C2=A0 =C2=A01 file changed, 4 insertions(+), 1 deletion(-= )
>>> =C2=A0 =C2=A0
>>
>=20
------=_Part_12498_2136744412.1517651370036-- ------=_Part_12497_294025488.1517651370036--