Angstrom-distribution / angstrom-manifest

Angstrom development environment setup using Android repo tool
MIT License
30 stars 53 forks source link

setup-environment default BUILDDIR is fragile #46

Open fmhess opened 4 years ago

fmhess commented 4 years ago

If I do

MACHINE=mymachine source setup-environment

inside my script, which was passed positional parameters, then setup-environment-internal sees the $* and $1 variables set and thinks the positional parameter was passed to setup-environment. So I have to explicitly do

MACHINE=mymachine source setup-environment "."

which I did not have to do with sumo.

fmhess commented 4 years ago

Perhaps passing BUILDDIR in the same way MACHINE is passed would be more robust?

fmhess commented 4 years ago

It turns out doing

MACHINE=mymachine source setup-environment "."

breaks openembedded-core badly. It seems having a "." in the TMPDIR path in site.conf breaks lots of stuff, like for example "bitbake texinfo-dummy-native". Instead, doing

MACHINE=mymachine source setup-environment ""

works better. The errors from "bitbake texinfo-dummy-native" were:

ERROR: texinfo-dummy-native-1.0-r0 do_patch: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function:
0001:
0002:extend_recipe_sysroot(d)
0003:
File: '/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/conf/../layers/openembedded-core/meta/classes/staging.bbclass', lineno: 557, function: extend_recipe_sysroot
0553: bb.note("Installed into sysroot: %s" % str(msg_adding))
0554: bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists))
0555:
0556: for f in fixme:
0557: staging_processfixme(fixme[f], f, recipesysroot, recipesysrootnative, d)
0558:
0559: for p in postinsts:
0560: subprocess.check_output(p, shell=True, stderr=subprocess.STDOUT)
0561:
File: '/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/conf/../layers/openembedded-core/meta/classes/staging.bbclass', lineno: 175, function: staging_processfixme
0171: for fixmevar in ['PSEUDO_SYSROOT', 'HOSTTOOLS_DIR', 'PKGDATA_DIR', 'PSEUDO_LOCALSTATEDIR', 'LOGFIFO']:
0172: fixmepath = d.getVar(fixmevar)
0173: cmd += " -e 's:FIXME
%s:%s:g'" % (fixmevar, fixme_path)
0174: bb.debug(2, cmd)
0175: subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
0176:
0177: 0178:def staging_populate_sysroot_dir(targetsysroot, nativesysroot, native, d): 0179: import glob File: '/usr/lib/python3.7/subprocess.py', lineno: 395, function: check_output 0391: # empty string. That is maintained here for backwards compatibility. 0392: kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b'' 0393: 0394: return run(
popenargs, stdout=PIPE, timeout=timeout, check=True, 0395: kwargs).stdout 0396: 0397: 0398:class CompletedProcess(object): 0399: """A process that has finished running. File: '/usr/lib/python3.7/subprocess.py', lineno: 487, function: run 0483: raise 0484: retcode = process.poll() 0485: if check and retcode: 0486: raise CalledProcessError(retcode, process.args,
0487: output=stdout, stderr=stderr) 0488: return CompletedProcess(process.args, retcode, stdout, stderr) 0489: 0490: 0491:def list2cmdline(seq): Exception: subprocess.CalledProcessError: Command 'sed -e 's:^[^/]*/:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/:g' /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/sysroots-components/x86_64/quilt-native/fixmepath | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot:g; s:FIXMESTAGINGDIRHOST:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native:g' -e 's:FIXME_PSEUDO_SYSROOT:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/sysroots-components/x86_64/pseudo-native:g' -e 's:FIXME_HOSTTOOLS_DIR:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/hosttools:g' -e 's:FIXME_PKGDATA_DIR:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/pkgdata/fluke-cda-nighthawk:g' -e 's:FIXME_PSEUDO_LOCALSTATEDIR:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/pseudo/:g' -e 's:FIXME_LOGFIFO:/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/temp/fifo.22320:g'' returned non-zero exit status 123.

Subprocess output: sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/bin/quilt: No such file or directory sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/share/quilt/mail: No such file or directory sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/share/quilt/scripts/edmail: No such file or directory sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/share/quilt/scripts/remove-trailing-ws: No such file or directory sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/share/quilt/scripts/patchfns: No such file or directory sed: can't read /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/recipe-sysroot-native/usr/share/quilt/scripts/backup-files: No such file or directory

ERROR: Logfile of failure stored in: /home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/./tmp-angstrom-glibc/work/x86_64-linux/texinfo-dummy-native/1.0-r0/temp/log.do_patch.22320 ERROR: Task (/home/fluke/work/fluke-cda-setup/angstrom-v2019.12-zeus-fluke-cda-manifest/conf/../layers/openembedded-core/meta/recipes-extended/texinfo-dummy-native/texinfo-dummy-native.bb:do_patch) failed with exit code '1'