<?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>4795</bug_id>
          
          <creation_ts>2013-07-01 17:31:31 +0000</creation_ts>
          <short_desc>PSEUDO_LOCALSTATEDIR _sometimes_ points to WORKDIR with wrong TARGET_OS</short_desc>
          <delta_ts>2013-09-07 08:48:19 +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>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</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>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</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>34260</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2013-07-01 17:31:31 +0000</bug_when>
    <thetext>allarch recipes leave behind pseudo directory even with rm_work
It&apos;s not bug in rm_work.bbclass but PSEUDO_LOCALSTATEDIR points to wrong WORKDIR (sometimes), but when I tried to reproduce it I failed:

bitbake.conf:
PSEUDO_LOCALSTATEDIR ?= &quot;${WORKDIR}/pseudo/&quot;

allarch.bbclass:
        # Set these to a common set of values, we shouldn&apos;t be using them other that for WORKDIR directory
        # naming anyway
        d.setVar(&quot;TARGET_ARCH&quot;, &quot;allarch&quot;)
        d.setVar(&quot;TARGET_OS&quot;, &quot;linux&quot;)

$ grep ^WORKDIR= packagegroup-core-ssh-dropbear.env
WORKDIR=&quot;/OE/oe-core/tmp-eglibc/work/all-oe-linux/packagegroup-core-ssh-dropbear/1.0-r1&quot;

$ grep ^PSEUDO_LOCALSTATEDIR= packagegroup-core-ssh-dropbear.env
PSEUDO_LOCALSTATEDIR=&quot;/OE/oe-core/tmp-eglibc/work/all-oe-linux/packagegroup-core-ssh-dropbear/1.0-r1/pseudo/&quot;

I was assuming that it happens only when setscene tasks are executed, but it doesn&apos;t look like it too:
$ bitbake -c cleansstate packagegroup-core-ssh-dropbear
$ rm -rf BUILD/work/*/packagegroup-core-ssh-dropbear
$ bitbake -c build packagegroup-core-ssh-dropbear
$ bitbake -c clean packagegroup-core-ssh-dropbear
$ bitbake -c build packagegroup-core-ssh-dropbear

$ ls tmp-eglibc/work/*/packagegroup-core-ssh-dropbear -d
tmp-eglibc/work/all-oe-linux/packagegroup-core-ssh-dropbear

And still when I build whole image, few pseudo directories are left in
tmp-eglibc/work/all-oe-linux-gnueabi/&lt;recipe&gt;/pseudo
and all other files of the same recipe are correctly in
tmp-eglibc/work/all-oe-linux-gnueabi/&lt;recipe&gt;/pseudo

Is anyone else seeing this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36216</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-09-03 23:36:29 +0000</bug_when>
    <thetext>Is there contents in those pseudo directories, when this issue occurs, if in 
which variation of TARGET_OS.  Which Machine was this a build for?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36314</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-09-05 06:49:25 +0000</bug_when>
    <thetext>Ok, this is getting interesting!  I can reproduce this consistently now with a 
clean build.  I am using oe-core not poky, and qemuarm to get the gnueabi set 
in the ABIEXTENSION.

The all-oe-linux-gnueabi is showing up in more places than just the 
PSEUDO_LOCALSTATEDIR, it shows up in the PKGTRIPLETS which causes them to apear 
in the SHLIBDIRS and PKLGMLTRIPLETS, I think this is because of when these 
variables are finalized compared with when the recipe is read and allarch is 
inherited, since allarch is recipe specific. and these others are
more global.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36340</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-05 14:06:12 +0000</bug_when>
    <thetext>Just to clarify this bug, if you take oecore, or poky, and do &quot;MACHINE=qemuarm bitbake update-rc.d&quot; you will see two all* directories in workdir and the pseudo metadata ends up in the wrong place.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36341</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-05 14:16:10 +0000</bug_when>
    <thetext>and the problem is from devshell.bbclass which is playing with the pseudo environment :/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36342</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-05 14:17:19 +0000</bug_when>
    <thetext>from bitbake -e

# $PSEUDO_LOCALSTATEDIR [2 operations]
#   set? conf/bitbake.conf:606
#     &quot;${WORKDIR}/pseudo/&quot;
#   set __anon_27__media_build1_poky_meta_classes_devshell_bbclass:7 [__anon_27__media_build1_poky_meta_classes_devshell_bbclass]
#     &quot;/media/build1/poky/build/tmp/work/all-poky-linux-gnueabi/update-rc.d/0.7-r5/pseudo/&quot;
# computed:
#   &quot;/media/build1/poky/build/tmp/work/all-poky-linux-gnueabi/update-rc.d/0.7-r5/pseudo/&quot;
PSEUDO_LOCALSTATEDIR=&quot;/media/build1/poky/build/tmp/work/all-poky-linux-gnueabi/update-rc.d/0.7-r5/pseudo/&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36345</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-05 15:17:44 +0000</bug_when>
    <thetext>Patch out for review fixing this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>36391</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-09-07 08:48:19 +0000</bug_when>
    <thetext>Resolved in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=5963d24ec5be437717c5ce6ecac291d2e3263a35</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>