Bug 14012

Summary: Archiver fails for recipe linux-ti-staging in meta-ti, beaglebone.
Product: [Build System, Metadata & Runtime] BSPs Reporter: Andreas Hansson <pahansson73>
Component: bsps-meta-tiAssignee: Denys Dmytriyenko <denis>
Status: RESOLVED OBSOLETE QA Contact:
Severity: normal    
Priority: Undecided    
Version: 3.0.4   
Target Milestone: ---   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Andreas Hansson 2020-08-16 22:34:24 UTC
Build of archive fail for thud(2.6.4) and zeus(3.0.3) (  although with differnt error messages) for the beaglebone machine. Dunfell seems to work fine!

Reproduce for zeus:

git clone -b zeus http://git.yoctoproject.org/cgit/cgit.cgi/poky
git clone -b zeus https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/

. ./poky/oe-init-build-env
echo 'INHERIT += "archiver" ' >> conf/local.conf
echo 'ARCHIVER_MODE[src] = "patched" ' >> conf/local.conf
echo 'MACHINE = "beaglebone" ' >> conf/local.conf

bitbake-layers add-layer ../meta-ti
bitbake core-image-minimal

Result:


Build Configuration:
BB_VERSION           = "1.44.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "beaglebone"
DISTRO               = "poky"
DISTRO_VERSION       = "3.0.3"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky
meta-yocto-bsp       = "HEAD:fb9a4d23c3de9b0140c999322034f8c969e8b1c7"
meta-ti              = "HEAD:f6e024415b42adaa0d6ca04da83c86dcf92dfd87"

Error msg:

DEBUG: Executing python function do_ar_patched
NOTE: Archiving the patched source...
NOTE: Creating /mnt/scratch/work/andreash/test_archiver_zeus/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/5.4.28+gitAUTOINC+6f3bf13d53-r22a/deploy-sources/arm-poky-linux-gnueabi/linux-ti-staging-5.4.28+gitAUTOINC+6f3bf13d53-r22a/linux-ti-staging-5.4.28+gitAUTOINC+6f3bf13d53-r22a-patched.tar.gz
ERROR: 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: <module>
     0001:
 *** 0002:do_ar_patched(d)
     0003:
File: '/mnt/scratch/work/andreash/test_archiver_zeus/poky/meta/classes/archiver.bbclass', lineno: 228, function: do_ar_patched
     0224:    if not is_work_shared(d):
     0225:        ar_workdir = d.getVar('ARCHIVER_WORKDIR')
     0226:        d.setVar('WORKDIR', ar_workdir)
     0227:    bb.note('Archiving the patched source...')
 *** 0228:    create_tarball(d, d.getVar('S'), 'patched', ar_outdir)
     0229:}
     0230:
     0231:python do_ar_configured() {
     0232:    import shutil
File: '/mnt/scratch/work/andreash/test_archiver_zeus/poky/meta/classes/archiver.bbclass', lineno: 316, function: create_tarball
     0312:    tarname = os.path.join(ar_outdir, filename)
     0313:
     0314:    bb.note('Creating %s' % tarname)
     0315:    tar = tarfile.open(tarname, 'w:gz')
 *** 0316:    tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
     0317:    tar.close()
     0318:
     0319:# creating .diff.gz between source.orig and source
     0320:def create_diff_gz(d, src_orig, src, ar_outdir):
File: '/usr/lib/python3.5/tarfile.py', lineno: 1947, function: add
     1943:            self.addfile(tarinfo)
     1944:            if recursive:
     1945:                for f in os.listdir(name):
     1946:                    self.add(os.path.join(name, f), os.path.join(arcname, f),
 *** 1947:                            recursive, exclude, filter=filter)
     1948:
     1949:        else:
     1950:            self.addfile(tarinfo)
     1951:
File: '/usr/lib/python3.5/tarfile.py', lineno: 1924, function: add
     1920:
     1921:        self._dbg(1, name)
     1922:
     1923:        # Create a TarInfo object from the file.
 *** 1924:        tarinfo = self.gettarinfo(name, arcname)
     1925:
     1926:        if tarinfo is None:
     1927:            self._dbg(1, "tarfile: Unsupported type %r" % name)
     1928:            return
File: '/usr/lib/python3.5/tarfile.py', lineno: 1793, function: gettarinfo
     1789:        # Use os.stat or os.lstat, depending on platform
     1790:        # and if symlinks shall be resolved.
     1791:        if fileobj is None:
     1792:            if hasattr(os, "lstat") and not self.dereference:
 *** 1793:                statres = os.lstat(name)
     1794:            else:
     1795:                statres = os.stat(name)
     1796:        else:
     1797:            statres = os.fstat(fileobj.fileno())
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/scratch/work/andreash/test_archiver_zeus/build/tmp/work-shared/beaglebone/kernel-source/.tmp.config.g4PPkPSRcF'

DEBUG: Python function do_ar_patched finished


------------------------------------------------------------------------------------------


Reproduce for thud:

git clone -b thud http://git.yoctoproject.org/cgit/cgit.cgi/poky
git clone -b thud https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/

. ./poky/oe-init-build-env
echo 'INHERIT += "archiver" ' >> conf/local.conf
echo 'ARCHIVER_MODE[src] = "patched" ' >> conf/local.conf
echo 'MACHINE = "beaglebone" ' >> conf/local.conf
bitbake-layers add-layer ../meta-ti

bitbake core-image-minimal

Result:
Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "arm-poky-linux-gnueabi"
MACHINE              = "beaglebone"
DISTRO               = "poky"
DISTRO_VERSION       = "2.6.4"
TUNE_FEATURES        = "arm armv7a vfp thumb neon callconvention-hard"
TARGET_FPU           = "hard"
meta                 
meta-poky            
meta-yocto-bsp       = "thud:3315b9f4a55c7f9ded954fe990174e9382827739"
meta-ti              = "thud:b27317ab4f9be931a66344ca502c7e3f4ec780e5"



Error msg:

DEBUG: Executing python function do_ar_patched
NOTE: Archiving the patched source...
NOTE: Creating /mnt/scratch/work/andreash/test_archiver/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.19.94+gitAUTOINC+5a23bc00e0-r22a/deploy-sources/arm-poky-linux-gnueabi/linux-ti-staging-4.19.94+gitAUTOINC+5a23bc00e0-r22a/linux-ti-staging-4.19.94+gitAUTOINC+5a23bc00e0-r22a-patched.tar.gz
ERROR: 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: <module>
     0001:
 *** 0002:do_ar_patched(d)
     0003:
File: '/mnt/scratch/work/andreash/test_archiver/poky/meta/classes/archiver.bbclass', lineno: 219, function: do_ar_patched
     0215:    ar_outdir = d.getVar('ARCHIVER_OUTDIR')
     0216:    ar_workdir = d.getVar('ARCHIVER_WORKDIR')
     0217:    bb.note('Archiving the patched source...')
     0218:    d.setVar('WORKDIR', ar_workdir)
 *** 0219:    create_tarball(d, d.getVar('S'), 'patched', ar_outdir)
     0220:}
     0221:
     0222:python do_ar_configured() {
     0223:    import shutil
File: '/mnt/scratch/work/andreash/test_archiver/poky/meta/classes/archiver.bbclass', lineno: 307, function: create_tarball
     0303:    tarname = os.path.join(ar_outdir, filename)
     0304:
     0305:    bb.note('Creating %s' % tarname)
     0306:    tar = tarfile.open(tarname, 'w:gz')
 *** 0307:    tar.add(srcdir, arcname=os.path.basename(srcdir), filter=exclude_useless_paths)
     0308:    tar.close()
     0309:
     0310:# creating .diff.gz between source.orig and source
     0311:def create_diff_gz(d, src_orig, src, ar_outdir):
File: '/usr/lib/python3.5/tarfile.py', lineno: 1924, function: add
     1920:
     1921:        self._dbg(1, name)
     1922:
     1923:        # Create a TarInfo object from the file.
 *** 1924:        tarinfo = self.gettarinfo(name, arcname)
     1925:
     1926:        if tarinfo is None:
     1927:            self._dbg(1, "tarfile: Unsupported type %r" % name)
     1928:            return
File: '/usr/lib/python3.5/tarfile.py', lineno: 1793, function: gettarinfo
     1789:        # Use os.stat or os.lstat, depending on platform
     1790:        # and if symlinks shall be resolved.
     1791:        if fileobj is None:
     1792:            if hasattr(os, "lstat") and not self.dereference:
 *** 1793:                statres = os.lstat(name)
     1794:            else:
     1795:                statres = os.stat(name)
     1796:        else:
     1797:            statres = os.fstat(fileobj.fileno())
Exception: FileNotFoundError: [Errno 2] No such file or directory: '/mnt/scratch/work/andreash/test_archiver/build/tmp/work/beaglebone-poky-linux-gnueabi/linux-ti-staging/4.19.94+gitAUTOINC+5a23bc00e0-r22a/archiver-work/git'

DEBUG: Python function do_ar_patched finished
ERROR: Function failed: do_ar_patched
Comment 1 Denys Dmytriyenko 2021-01-26 21:44:00 UTC
Works in dunfell and master. thud and zeus are obsolete now.