Hello,

I've already replied on another thread of this patch series, however, I
have discovered this is the patch that is causing the problem.

On Fri, 23 Jun 2023 at 03:31, Jörg Sommer via lists.openembedded.org
<[email protected]> wrote:

> On 22 June 2023 19:01, [email protected] wrote:
> > ip tuntap does not need the uid, it was an unused variable/parameter.
> > Backward compatibility should be fine.
> >
> > Signed-off-by: Adrian Freihofer <[email protected]>
> > ---
> > scripts/runqemu-ifup | 13 ++++++++-----
> > 1 file changed, 8 insertions(+), 5 deletions(-)
> >
> > diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
> > index 5dc765dee82..26714518020 100755
> > --- a/scripts/runqemu-ifup
> > +++ b/scripts/runqemu-ifup
> > @@ -21,7 +21,7 @@
> > #
> >
> > usage() {
> > -       echo "sudo $(basename $0) <uid> <gid>"
> > +       echo "sudo $(basename $0) <gid>"
> > }
> >
> > if [ $EUID -ne 0 ]; then
> > @@ -29,17 +29,20 @@ if [ $EUID -ne 0 ]; then
> > exit 1
> > fi
> >
>

Specifically, the following change is the one that breaks backwards
compatibility,
since it echoes to stdout a warning, at first sight this seems harmless,
however,
there is an expectation from scripts for the output to be in a certain
format, e.g.:
https://git.yoctoproject.org/poky/tree/scripts/runqemu#n1207

Where the output of:
cmd = ('sudo', self.qemuifup, str(uid), str(gid))
            try:
tap = subprocess.check_output(cmd).decode('utf-8').strip()

Is parsed and then used, but the "tap" variable now contains the warning
from below,
after this, we try to convert such variable to int() which obviously
becomes an issue.
Now, we can certainly remove the uid argument from the call, which would
provide a
workaround, but, I think we should still change this to avoid changing the
expected
output from a script that is used in automated calls.

I'm also a bit concerned that this slipped the AB automated testing.

Sending a patch to fix this soon

Alejandro


> -if [ $# -ne 2 ]; then
> > +if [ $# -eq 2 ]; then
> > +       echo "Warning: uid parameter is ignored. It is no longer needed."
>
> Would it be better to send this message to stderr (use `>&2`)?
>
> Regards
>
> Jörg Sommer
>
> Software Developer / Programmierer
> --
>
> Navimatix GmbH
>
> Tatzendpromenade 2
>
> 07745 Jena
>
>
> T: 03641 - 327 99 0
>
> F: 03641 - 526 306
>
> M: [email protected]
>
> www.navimatix.de
>
>
>
>
> Geschäftsführer: Steffen Späthe, Jan Rommeley
>
> Registergericht: Amtsgericht Jena, HRB 501480
>
>
>
> 
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#183365): 
https://lists.openembedded.org/g/openembedded-core/message/183365
Mute This Topic: https://lists.openembedded.org/mt/99702214/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to