<?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>13685</bug_id>
          
          <creation_ts>2019-12-05 21:16:21 +0000</creation_ts>
          <short_desc>image.bblcass systemd_preset_all preprocess command fails</short_desc>
          <delta_ts>2020-02-03 16:35:22 +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>configuration</component>
          <version>3.0.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>critical</bug_severity>
          <target_milestone>3.0.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Slavic Brutalik">sky.captin</reporter>
          <assigned_to name="Slavic Brutalik">sky.captin</assigned_to>
          <cc>akuster808</cc>
    
    <cc>akuster</cc>
          
          
          <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>85748</commentid>
    <comment_count>0</comment_count>
    <who name="Slavic Brutalik">sky.captin</who>
    <bug_when>2019-12-05 21:16:21 +0000</bug_when>
    <thetext>zeus contains a new IMAGE_PREPROCESS_COMMAND called systemd_preset_all which uses recipes-core/systemd/systemd-systemctl/sytemctl to scan for units to symlink in /etc/systemd/system

That code uses path.exists() to test for units instead of path.isFile because in . This causes preset_all to fail because rootfs-postcommands.bbclass calls set_systemd_default_target that creates a symlink. path.exists() fails with symlinks of the file being linked is not currently available. (which it will not be when constructing rootfs)

This is a critical issue. 

W</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85760</commentid>
    <comment_count>1</comment_count>
    <who name="Slavic Brutalik">sky.captin</who>
    <bug_when>2019-12-06 15:25:45 +0000</bug_when>
    <thetext>isfile does not work.

that line needs to change to:

if path.exists() or os.path.islink(path):</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85800</commentid>
    <comment_count>2</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-12-12 15:33:40 +0000</bug_when>
    <thetext>Can you send a patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85801</commentid>
    <comment_count>3</comment_count>
    <who name="Slavic Brutalik">sky.captin</who>
    <bug_when>2019-12-12 15:35:09 +0000</bug_when>
    <thetext>Will do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85829</commentid>
    <comment_count>4</comment_count>
    <who name="Slavic Brutalik">sky.captin</who>
    <bug_when>2019-12-13 18:17:57 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; Can you send a patch.

Sent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86280</commentid>
    <comment_count>5</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-02-03 16:35:07 +0000</bug_when>
    <thetext>in zeus

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=zeus&amp;id=07ae996d849e5edf91e2fb6712c801d10c148222</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86281</commentid>
    <comment_count>6</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-02-03 16:35:22 +0000</bug_when>
    <thetext>closing</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>