<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10982</bug_id>
          
          <creation_ts>2017-01-27 16:14:32 +0000</creation_ts>
          <short_desc>building eSDK fails after switching from sysinitv to systemd</short_desc>
          <delta_ts>2017-04-20 17:04:05 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrea Galbusera">gizero</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70226</commentid>
    <comment_count>0</comment_count>
    <who name="Andrea Galbusera">gizero</who>
    <bug_when>2017-01-27 16:14:32 +0000</bug_when>
    <thetext>Observed on poky commit (default configuration):
478644aedf04ba4d861e27e2955a6afecd1bc311

Steps to Repeat
================
$ git clone git://git.yoctoproject.org/poky
$ cd poky
$ git checkout master
$ source oe-init-build-env
$ bitbake core-image-minimal
$ bitbake core-image-minimal -c populate_sdk_ext

(both the image and eSDK build fine)

* enable systemd by adding the following to local.conf (no backfilling of sysinitv)

DISTRO_FEATURES_append = &quot; systemd&quot;
VIRTUAL-RUNTIME_init_manager = &quot;systemd&quot;

$ bitbake core-image-minimal (raise some wornings but succeeds)
$ bitbake core-image-minimal -c populate_sdk_ext


Observed Behavior
==================
Fails with...

BB_VERSION        = &quot;1.32.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;universal&quot;
TARGET_SYS        = &quot;i586-poky-linux&quot;
MACHINE           = &quot;qemux86&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.2+snapshot-20170127&quot;
TUNE_FEATURES     = &quot;m32 i586&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-poky
meta-yocto-bsp    = &quot;master:478644aedf04ba4d861e27e2955a6afecd1bc311&quot;
 
Initialising tasks: 100% |#################################################################################################################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: core-image-minimal-1.0-r0 do_sdk_depends: Error executing a python function in exec_python_func() autogenerated:
 
The stack trace of python calls that resulted in this exception/failure was:
File: &apos;exec_python_func() autogenerated&apos;, lineno: 2, function: &lt;module&gt;
     0001:
 *** 0002:extend_recipe_sysroot(d)
     0003:
File: &apos;/home/gizero/work/upstreaming/poky/meta/classes/staging.bbclass&apos;, lineno: 560, function: extend_recipe_sysroot
     0556:                        continue
     0557:                    if native:
     0558:                        dest = staging_copyfile(l, recipesysrootnative, fixme[&apos;native&apos;], postinsts, stagingdir)
     0559:                    else:
 *** 0560:                        dest = staging_copyfile(l, destsysroot, fixme[&apos;&apos;], postinsts, stagingdir)
     0561:                    if dest:
     0562:                        m.write(dest + &quot;\n&quot;)
     0563:
     0564:    for f in fixme:
File: &apos;/home/gizero/work/upstreaming/poky/meta/classes/staging.bbclass&apos;, lineno: 272, function: staging_copyfile
     0268:        os.symlink(linkto, dest)
     0269:        #bb.warn(c)
     0270:    else:
     0271:        try:
 *** 0272:            os.link(c, dest)
     0273:        except OSError as err:
     0274:            if err.errno == errno.EXDEV:
     0275:                bb.utils.copyfile(c, dest)
     0276:            else:
Exception: FileExistsError: [Errno 17] File exists: &apos;/scratch/gizero/poky-master-build/tmp/sysroots-components/i586/systemd/usr/include/libudev.h&apos; -&gt; &apos;/scratch/gizero/poky-master-build/tmp/work/qemux86-
poky-linux/core-image-minimal/1.0-r0/recipe-sysroot/usr/include/libudev.h&apos;
 
ERROR: core-image-minimal-1.0-r0 do_sdk_depends: Function failed: extend_recipe_sysroot
ERROR: Logfile of failure stored in: /scratch/gizero/poky-master-build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_sdk_depends.21053
ERROR: Task (/home/gizero/work/upstreaming/poky/meta/recipes-core/images/core-image-minimal.bb:do_sdk_depends) failed with exit code &apos;1&apos;

Expected Behavior
==================
Should build the eSDK successfully</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70388</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-02-02 16:34:39 +0000</bug_when>
    <thetext>Looks like Richard&apos;s recent changes have fixed this as I can&apos;t replicate with current oe-core master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70532</commentid>
    <comment_count>2</comment_count>
    <who name="Andrea Galbusera">gizero</who>
    <bug_when>2017-02-08 09:15:25 +0000</bug_when>
    <thetext>Confirmed! My original test that builds eSDK for core-image-minimal while switching back and forth between sysinitv and systemd is now working for me with current master (a624cf7f95c8cf4ff764cc997fd1db4601b97dcc).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72737</commentid>
    <comment_count>3</comment_count>
    <who name="David Lopez Barriba">davidx.lopez.barriba</who>
    <bug_when>2017-04-20 17:04:05 +0000</bug_when>
    <thetext>Verified on master:1423508b29fc557d8a1305f39c33de33e28d9003</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>