<?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>1465</bug_id>
          
          <creation_ts>2011-09-09 01:21:49 +0000</creation_ts>
          <short_desc>bitbake cannot fetch local files from SRC_URI when -b is used</short_desc>
          <delta_ts>2012-06-22 08:34:39 +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>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</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>(P1) Patches sent for some issues, adding a sanity test remains.</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Jansa">Martin.Jansa</reporter>
          <assigned_to name="Laurentiu Palcu">laurentiu.palcu</assigned_to>
          <cc>andrei</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>scott.a.garman</cc>
    
    <cc>sgw</cc>
    
    <cc>song.liu</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>16112</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2011-09-09 01:21:49 +0000</bug_when>
    <thetext>$ bitbake -c unpack -b openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb
WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.

OE Build Configuration:
BB_VERSION        = &quot;1.13.3&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;om-gta02&quot;
DISTRO            = &quot;shr&quot;
DISTRO_VERSION    = &quot;20110811&quot;
TUNE_FEATURES     = &quot;armv4 thumb arm920t&quot;
TARGET_FPU        = &quot;soft&quot;
meta-jama         = &quot;master:c9300f537bab3cf7a6400e9a0f799f8a54559784&quot;
meta-shr
meta-fso
meta-nokia
meta-htc
meta-palm
meta-openmoko
meta-zaurus       = &quot;master:b287197790ec4ac9ddbed185d4df1205a55531ac&quot;
meta-oe
meta-efl
meta-gnome        = &quot;shr:c5ba433b740fdb88f1a7631fa884ea39c03df35a&quot;
meta              = &quot;shr:fe056d9f1ebdf1b4ec5d423e2a6ea8cb7737d66c&quot;

NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 2 (ID: 1, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch)
NOTE: package base-files-3.0.14-r69: task do_fetch: Started
ERROR: Function &apos;Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL file://rotation from any source.&apos; failed
ERROR: Logfile of failure stored in: /OE/shr-core/tmp/work/om_gta02-oe-linux-gnueabi/base-files-3.0.14-r69/temp/log.do_fetch.28071
Log data follows:
| ERROR: Function &apos;Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL file://rotation from any source.&apos; failed
NOTE: package base-files-3.0.14-r69: task do_fetch: Failed
ERROR: Task 1 (openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch) failed with exit code &apos;1&apos;
ERROR: &apos;openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb&apos; failed

but the rotation file is where it should be:
openembedded-core/meta/recipes-core/base-files/base-files/rotation

and without -b it fetches rotation file fine.

More details were on oe-core ML
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-August/008097.html
and
http://lists.linuxtogo.org/pipermail/openembedded-core/2011-May/003431.html
where is also reported which bitbake commit broke this behavior
http://git.openembedded.org/cgit.cgi/bitbake/commit/?id=6e9119c42d3f4cb3dab3d25856eee8b4bf4ad94f</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17242</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-17 06:17:18 +0000</bug_when>
    <thetext>This bug doesn&apos;t seem to be as simple as states here as bitbake -b base-files -c unpack works fine for me :(

It is likely therefore some kind of complication in the layering but its making it harder to reproduce.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17259</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-11-18 06:40:43 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=9d4f95587424c9e2d3ef7891c8ac7007f8db1f00 is a valid fix and seems to resolve the problem for Martin even if I can&apos;t reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20839</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-04-24 16:04:15 +0000</bug_when>
    <thetext>Part of original fix was reverted in
http://git.yoctoproject.org/cgit.cgi/poky/commit/bitbake/lib/bb/parse/parse_py/BBHandler.py?id=9d4f95587424c9e2d3ef7891c8ac7007f8db1f00

so it&apos;s broken again</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>20840</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-04-24 16:07:36 +0000</bug_when>
    <thetext>Ah :/ not this commit but something else.. but still it&apos;s broken (and only broken when relative path is used in -b)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21500</commentid>
    <comment_count>5</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-21 16:24:14 +0000</bug_when>
    <thetext>I think the working directories are not getting consistently set for some reason.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21506</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-21 22:51:42 +0000</bug_when>
    <thetext>Martin, can you please provide a test case to reproduce this? I was hunting for a different problem today and came back to looking at this for various reasons but I can&apos;t replicate the bug :(.

I suspect it depends on some particular directory layout, some particular environment script or combination of things which I don&apos;t have...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21511</commentid>
    <comment_count>7</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-22 07:27:23 +0000</bug_when>
    <thetext>I wasn&apos;t able to reproduce it today with oe-core only (but IIRC it was failing with oe-core only too), so I&apos;ve tried to narrow it with default SHR setup


NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 3 (ID: 2, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_rm_old_works)
NOTE: Running task 2 of 3 (ID: 1, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch)
NOTE: package base-files-3.0.14-r77: task do_rm_old_works: Started
NOTE: package base-files-3.0.14-r77: task do_rm_old_works: Succeeded
NOTE: package base-files-3.0.14-r77: task do_fetch: Started
ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/base-files/base-files-3.0.14-r77/temp/log.do_fetch.5922
Log data follows:
| DEBUG: Trying PREMIRRORS
| DEBUG: For url [&apos;file&apos;, &apos;&apos;, &apos;rotation&apos;, &apos;&apos;, &apos;&apos;, {}] comparing [&apos;cvs&apos;, &apos;.*&apos;, &apos;/.*&apos;, &apos;&apos;, &apos;&apos;, {}] to [&apos;http&apos;, &apos;build.shr-project.org&apos;, &apos;/sources/&apos;, &apos;&apos;, &apos;&apos;, {}]
| DEBUG: For url [&apos;file&apos;, &apos;&apos;, &apos;rotation&apos;, &apos;&apos;, &apos;&apos;, {}] comparing [&apos;svn&apos;, &apos;.*&apos;, &apos;/.*&apos;, &apos;&apos;, &apos;&apos;, {}] to [&apos;http&apos;, &apos;build.shr-project.org&apos;, &apos;/sources/&apos;, &apos;&apos;, &apos;&apos;, {}]
| DEBUG: For url [&apos;file&apos;, &apos;&apos;, &apos;rotation&apos;, &apos;&apos;, &apos;&apos;, {}] comparing [&apos;git&apos;, &apos;.*&apos;, &apos;/.*&apos;, &apos;&apos;, &apos;&apos;, {}] to [&apos;http&apos;, &apos;build.shr-project.org&apos;, &apos;/sources/&apos;, &apos;&apos;, &apos;&apos;, {}]
| DEBUG: For url [&apos;file&apos;, &apos;&apos;, &apos;rotation&apos;, &apos;&apos;, &apos;&apos;, {}] comparing [&apos;hg&apos;, &apos;.*&apos;, &apos;/.*&apos;, &apos;&apos;, &apos;&apos;, {}] to [&apos;http&apos;, &apos;build.shr-project.org&apos;, &apos;/sources/&apos;, &apos;&apos;, &apos;&apos;, {}]
| DEBUG: For url [&apos;file&apos;, &apos;&apos;, &apos;rotation&apos;, &apos;&apos;, &apos;&apos;, {}] comparing [&apos;bzr&apos;, &apos;.*&apos;, &apos;/.*&apos;, &apos;&apos;, &apos;&apos;, {}] to [&apos;http&apos;, &apos;build.shr-project.org&apos;, &apos;/sources/&apos;, &apos;&apos;, &apos;&apos;, {}]
| DEBUG: Trying Upstream
| ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
NOTE: package base-files-3.0.14-r77: task do_fetch: Failed
ERROR: Task 1 (openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&apos;t need to be rerun and 1 failed.

Tried to disable distro PREMIRRORS:

NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 2 of 3 (ID: 1, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch)
NOTE: package base-files-3.0.14-r77: task do_fetch: Started
ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/base-files/base-files-3.0.14-r77/temp/log.do_fetch.6078
Log data follows:
| DEBUG: Trying PREMIRRORS
| DEBUG: Trying Upstream
| ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
NOTE: package base-files-3.0.14-r77: task do_fetch: Failed
ERROR: Task 1 (openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 2 tasks of which 1 didn&apos;t need to be rerun and 1 failed.

Removed all .bbappends for base-files:
OE om-gta02@shr ~/shr-core $ rm -f meta-smartphone/meta-nokia/recipes-core/base-files/base-files_3.0.14.bbappend meta-smartphone/meta-shr/recipes-core/base-files/base-files_3.0.14.bbappend meta-smartphone/meta-openmoko/recipes-core/base-files/base-files_3.0.14.bbappend meta-smartphone/meta-samsung/recipes-core/base-files/base-files_3.0.14.bbappend

NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 3 (ID: 2, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_rm_old_works)
NOTE: Running task 2 of 3 (ID: 1, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch)
NOTE: package base-files-3.0.14-r71: task do_rm_old_works: Started
NOTE: package base-files-3.0.14-r71: task do_rm_old_works: Succeeded
NOTE: package base-files-3.0.14-r71: task do_fetch: Started
ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/base-files/base-files-3.0.14-r71/temp/log.do_fetch.6241
Log data follows:
| DEBUG: Trying PREMIRRORS
| DEBUG: Trying Upstream
| ERROR: Function failed: Fetcher failure for URL: &apos;file://rotation&apos;. Unable to fetch URL from any source.
NOTE: package base-files-3.0.14-r71: task do_fetch: Failed
ERROR: Task 1 (openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn&apos;t need to be rerun and 1 failed.

Still the same, tried without -b to reparse (interestingly nothing was used from cache)

OE om-gta02@shr ~/shr-core $ bitbake -c unpack -f base-files
WARNING: /OE/shr-core/meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager_0.9.2.0.bb: it is recommended to set SYSTEMD_PACKAGES as &lt;existing-package&gt;-systemd                                        | ETA:  0:00:16
NOTE: shr DOES NOT support libiconv because libiconv is provided by LIBC########################################################################################################                                              | ETA:  0:00:09
NOTE: shr DOES NOT support libiconv because libiconv is provided by LIBC##########################################################################################################################                            | ETA:  0:00:05
WARNING: /OE/shr-core/openembedded-core/meta/recipes-extended/lighttpd/lighttpd_1.4.30.bb: it is recommended to set SYSTEMD_PACKAGES as &lt;existing-package&gt;-systemd
NOTE: shr DOES NOT support initscripts because use service file for systemd now
NOTE: shr DOES NOT support external-csl-toolchain because use internal toolchain
NOTE: shr DOES NOT support sysvinit because use systemd now###############################################################################################################################################                    | ETA:  0:00:04
Parsing recipes: 100% |#######################################################################################################################################################################################################| Time: 0:00:42
Parsing of 1718 .bb files complete (0 cached, 1718 parsed). 2157 targets, 70 skipped, 0 masked, 0 errors.
WARNING: No bb files matched BBFILE_PATTERN_systemd-layer &apos;^/OE/shr-core/meta-openembedded/meta-systemd/&apos;

Build Configuration:
BB_VERSION        = &quot;1.15.2&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;om-gta02&quot;
DISTRO            = &quot;shr&quot;
DISTRO_VERSION    = &quot;20120522&quot;
TUNE_FEATURES     = &quot;armv4 thumb arm920t&quot;
TARGET_FPU        = &quot;soft&quot;
meta-jama         = &quot;master:aa61d65a0a21be6eab0619c1ad3a5bef6c912f92&quot;
meta-shr
meta-aurora
meta-fso          = &quot;jansa/test:a4b5b9c2e987dc87cf0a4f890428443a9cea3733&quot;
meta-oe
toolchain-layer
meta-efl
meta-gnome
meta-gpe
meta-initramfs
meta-systemd      = &quot;jansa/test:7b64162e153c3538ddc98e804cc0208d5f50212a&quot;
meta-osmocombb
meta-nokia
meta-htc
meta-palm
meta-openmoko
meta-samsung      = &quot;jansa/test:a4b5b9c2e987dc87cf0a4f890428443a9cea3733&quot;
meta-handheld     = &quot;jansa/spitz:f2169618f96b14491911a2361bf04f1b8c5f65a2&quot;
meta-browser      = &quot;master:c47f59df2e723495679c751cbdf6a8c6adec4b6a&quot;
meta              = &quot;jansa/test:89f4092b93452f77d0d30b394629a928341a01d0&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 2 of 3 (ID: 1, /OE/shr-core/openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_fetch)
NOTE: package base-files-3.0.14-r71: task do_fetch: Started
NOTE: package base-files-3.0.14-r71: task do_fetch: Succeeded
NOTE: Running task 3 of 3 (ID: 0, /OE/shr-core/openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_unpack)
NOTE: package base-files-3.0.14-r71: task do_unpack: Started
NOTE: package base-files-3.0.14-r71: task do_unpack: Succeeded
NOTE: Tasks Summary: Attempted 3 tasks of which 1 didn&apos;t need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.

And with -b just after it:
OE om-gta02@shr ~/shr-core $ bitbake -f -c unpack -b openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb
WARNING: Buildfile specified, dependencies will not be handled. If this is not what you want, do not use -b / --buildfile.

Build Configuration:
BB_VERSION        = &quot;1.15.2&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;om-gta02&quot;
DISTRO            = &quot;shr&quot;
DISTRO_VERSION    = &quot;20120522&quot;
TUNE_FEATURES     = &quot;armv4 thumb arm920t&quot;
TARGET_FPU        = &quot;soft&quot;
meta-jama         = &quot;master:aa61d65a0a21be6eab0619c1ad3a5bef6c912f92&quot;
meta-shr
meta-aurora
meta-fso          = &quot;jansa/test:a4b5b9c2e987dc87cf0a4f890428443a9cea3733&quot;
meta-oe
toolchain-layer
meta-efl
meta-gnome
meta-gpe
meta-initramfs
meta-systemd      = &quot;jansa/test:7b64162e153c3538ddc98e804cc0208d5f50212a&quot;
meta-osmocombb
meta-nokia
meta-htc
meta-palm
meta-openmoko
meta-samsung      = &quot;jansa/test:a4b5b9c2e987dc87cf0a4f890428443a9cea3733&quot;
meta-handheld     = &quot;jansa/spitz:f2169618f96b14491911a2361bf04f1b8c5f65a2&quot;
meta-browser      = &quot;master:c47f59df2e723495679c751cbdf6a8c6adec4b6a&quot;
meta              = &quot;jansa/test:89f4092b93452f77d0d30b394629a928341a01d0&quot;

NOTE: Preparing runqueue
NOTE: Executing RunQueue Tasks
NOTE: Running task 3 of 3 (ID: 0, openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_unpack)
NOTE: package base-files-3.0.14-r71: task do_unpack: Started
ERROR: Error executing a python function in openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb:
OSError: [Errno 2] No such file or directory: &apos;/OE/shr-core/downloads/rotation&apos;

ERROR: The stack trace of python calls that resulted in this exception/failure was:
ERROR:   File &quot;base_do_unpack&quot;, line 19, in &lt;module&gt;
ERROR:
ERROR:   File &quot;base_do_unpack&quot;, line 14, in base_do_unpack
ERROR:
ERROR:   File &quot;/usr/lib64/python2.7/site-packages/bb/fetch2/__init__.py&quot;, line 1075, in unpack
ERROR:     ud.method.unpack(ud, root, self.d)
ERROR:
ERROR:   File &quot;/usr/lib64/python2.7/site-packages/bb/fetch2/__init__.py&quot;, line 775, in unpack
ERROR:     if (file != dest) and not (os.path.exists(dest) and os.path.samefile(file, dest)):
ERROR:
ERROR:   File &quot;/usr/lib64/python2.7/posixpath.py&quot;, line 153, in samefile
ERROR:     s1 = os.stat(f1)
ERROR:
ERROR: The code that was being executed was:
ERROR:      0015:        except bb.fetch2.BBFetchException, e:
ERROR:      0016:            raise bb.build.FuncFailed(e)
ERROR:      0017:
ERROR:      0018:
ERROR:  *** 0019:base_do_unpack(d)
ERROR:      0020:
ERROR: (file: &apos;base_do_unpack&apos;, lineno: 19, function: &lt;module&gt;)
ERROR:      0010:       rootdir = localdata.getVar(&apos;WORKDIR&apos;, True)
ERROR:      0011:
ERROR:      0012:        try:
ERROR:      0013:            fetcher = bb.fetch2.Fetch(src_uri, localdata)
ERROR:  *** 0014:            fetcher.unpack(rootdir)
ERROR:      0015:        except bb.fetch2.BBFetchException, e:
ERROR:      0016:            raise bb.build.FuncFailed(e)
ERROR:      0017:
ERROR:      0018:
ERROR: (file: &apos;base_do_unpack&apos;, lineno: 14, function: base_do_unpack)
ERROR: Function failed: base_do_unpack
ERROR: Logfile of failure stored in: /OE/shr-core/tmp-eglibc/work/om_gta02-oe-linux-gnueabi/base-files/base-files-3.0.14-r71/temp/log.do_unpack.10111
NOTE: package base-files-3.0.14-r71: task do_unpack: Failed
ERROR: Task 0 (openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_unpack) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 3 tasks of which 2 didn&apos;t need to be rerun and 1 failed.

Summary: 1 task failed:
  openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb, do_unpack
Summary: There was 1 WARNING message shown.
Summary: There were 34 ERROR messages shown, returning a non-zero exit code.


OE om-gta02@shr ~/shr-core $ ls /OE/shr-core/downloads/rotation*
/OE/shr-core/downloads/rotation.done  /OE/shr-core/downloads/rotation.lock

OE om-gta02@shr ~/shr-core $ rm -f /OE/shr-core/downloads/rotation*
OE om-gta02@shr ~/shr-core $ bitbake -f -c unpack -b openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb

fails the same, but this time only .lock is created
OE om-gta02@shr ~/shr-core $ ls /OE/shr-core/downloads/rotation*
/OE/shr-core/downloads/rotation.lock

And now I&apos;m sort of stuck here, -f -c unpack with -b always fails like this (even after another reparse and cleansstate, without -b still works) and if I do -c cleansstate and then -c unpack _without_ -f then I&apos;m back to first error.

Layout is like this:
OE om-gta02@shr ~/shr-core $ which bitbake
/OE/shr-core/openembedded-core/scripts/bitbake

OE om-gta02@shr ~/shr-core $ ls -ld meta* open*
lrwxrwxrwx 1 bitbake bitbake 16 Nov 29 12:41 meta-angstrom -&gt; ../meta-angstrom
lrwxrwxrwx 1 bitbake bitbake 16 May 17 13:15 meta-browser -&gt; ../meta-browser/
lrwxrwxrwx 1 bitbake bitbake 17 Apr 20 10:50 meta-chromium -&gt; ../meta-chromium/
lrwxrwxrwx 1 bitbake bitbake 16 Nov 29 12:41 meta-handheld -&gt; ../meta-handheld
lrwxrwxrwx 1 bitbake bitbake 12 Nov 29 12:41 meta-jama -&gt; ../meta-jama
lrwxrwxrwx 1 bitbake bitbake 16 Jan 16 16:15 meta-mozilla -&gt; ../meta-mozilla/
lrwxrwxrwx 1 bitbake bitbake 20 Nov 29 12:41 meta-openembedded -&gt; ../meta-openembedded
lrwxrwxrwx 1 bitbake bitbake 18 Nov 29 12:41 meta-smartphone -&gt; ../meta-smartphone
lrwxrwxrwx 1 bitbake bitbake 21 Nov 29 12:41 openembedded-core -&gt; ../openembedded-core/

OE om-gta02@shr ~/shr-core $ pwd
/OE/shr-core

OE om-gta02@shr ~/shr-core $ env | grep BB
BBFETCH2=True
BB_ENV_EXTRAWHITE=MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD

OE om-gta02@shr ~/shr-core $ cat conf/bblayers.conf
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = &quot;4&quot;

BBFILES ?= &quot;&quot;

# Add your overlay location to BBLAYERS
# Make sure to have a conf/layers.conf in there
BBLAYERS = &quot; \
  ${TOPDIR}/meta-jama \
  ${TOPDIR}/meta-smartphone/meta-shr \
  ${TOPDIR}/meta-smartphone/meta-aurora \
  ${TOPDIR}/meta-smartphone/meta-fso \
  ${TOPDIR}/meta-openembedded/meta-oe \
  ${TOPDIR}/meta-openembedded/toolchain-layer \
  ${TOPDIR}/meta-openembedded/meta-efl \
  ${TOPDIR}/meta-openembedded/meta-gnome \
  ${TOPDIR}/meta-openembedded/meta-gpe \
  ${TOPDIR}/meta-openembedded/meta-initramfs \
  ${TOPDIR}/meta-openembedded/meta-systemd \
  ${TOPDIR}/meta-smartphone/meta-osmocombb \
  ${TOPDIR}/meta-smartphone/meta-nokia \
  ${TOPDIR}/meta-smartphone/meta-htc \
  ${TOPDIR}/meta-smartphone/meta-palm \
  ${TOPDIR}/meta-smartphone/meta-openmoko \
  ${TOPDIR}/meta-smartphone/meta-samsung \
  ${TOPDIR}/meta-handheld \
  ${TOPDIR}/meta-browser \
  ${TOPDIR}/openembedded-core/meta \
&quot;

OE om-gta02@shr ~/shr-core $ cat setup-env
# setup up the environment for a bitbake build.  This is used
# by the makefile and may also be directly sourced from an
# interactive shell.  The makefile uses &apos;env -i&apos; to ensure
# no variables are inherited apart from CCACHE_DISABLE and
# CCACHE_DIR
#
# topdir must exist in the directory and define TOPDIR to
# the full path name of the working directory
. ./conf/topdir.conf
test -e ./setup-local || echo &quot;setup-local does not exist, please update your conf/auto.conf and copy setup-local from common directory&quot;
. ./setup-local
test -n &quot;$TOPDIR&quot; -a -d &quot;$TOPDIR&quot; || {
        echo &quot;environment: TOPDIR not defined&quot; &gt;&amp;2
        return
}

#
# the following must match the definitions in common/conf/site.conf
test ! -d &quot;${TOPDIR}/bitbake/bin&quot; || export PATH=&quot;${TOPDIR}/bitbake/bin:${PATH}&quot;
test ! -d &quot;${TOPDIR}/openembedded-core/scripts&quot; || export PATH=&quot;${TOPDIR}/openembedded-core/scripts:${PATH}&quot;

# used in bitbake wrapper for pseudodone location
export BUILDDIR=&quot;${TOPDIR}&quot;

#export BBPATH=&quot;${TOPDIR}:${TOPDIR}/openembedded-core/meta&quot;
export BB_ENV_EXTRAWHITE=&quot;MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD&quot;
#export BB_ENV_EXTRAWHITE=&quot;MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD LD_LIBRARY_PATH&quot;
#export LD_LIBRARY_PATH=&quot;/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.2/&quot;
export LANG=C
export MACHINE
export DISTRO
#NOTE: if you add export definitions here add them below too!
#
# unset the following (unnecessary for the makefile, but safe)
unset LC_CTYPE
unset CC
unset CXX
unset MFLAGS
unset MAKEFLAGS
unset MAKE_TARGET
#
# make bb into a &apos;safe&apos; bitbake
alias bb-safe=&quot;env -i \
        HOME=&apos;${HOME}&apos; \
        PYTHONPATH=&apos;${PYTHONPATH}&apos; \
        BBPATH=&apos;${BBPATH}&apos; \
        PATH=&apos;${PATH}&apos; \
        LD_LIBRARY_PATH=&apos;${LD_LIBRARY_PATH}&apos; \
        LANG=&apos;${LANG}&apos; \
        &apos;${TOPDIR}/bitbake/bin/bitbake&apos;&quot;
alias bb=&quot;bitbake&quot;
#
# remove TOPDIR - not required
unset TOPDIR

if [ ${TERM:-dumb} = dumb ]; then
   export PS1=&apos;OE $MACHINE@$DISTRO \w \$ &apos;
else
   export PS1=&apos;\[\033[01;32m\]OE $MACHINE@$DISTRO\[\033[01;34m\] \w \$\[\033[00m\] &apos;
fi
echo &quot;Altered environment for ${MACHINE}@${DISTRO} development&quot;


What else could be usefull?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21543</commentid>
    <comment_count>8</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-23 10:49:05 +0000</bug_when>
    <thetext>I think I have a handle on this now. Could you run:

bitbake -e | grep BBPATH and share the value of BBPATH that is being used?

I have a suspicion that something in your layer config is injecting a &quot;::&quot; or other empty entry in there, before the meta layer is included.

For example, if locally I have:

BBPATH=&quot;/media/data1/build1/poky/build/meta-yocto::/media/data1/build1/poky/meta-qt3:/media/data1/build1/poky/build/meta&quot;

I can reproduce this error. I effecitvely stumbled upon this by accident trying to recreate your error. If you run &quot;bitbake base-files -e&quot; and look at the value of FILE, it will also likely not have an asbolute path which will corrupt FILE_DIRNAME and FILESPATH in turn.

Simplistically, we can do something like:

diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index 7a73419..fc389a3 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -721,6 +721,8 @@ def which(path, item, direction = 0):
     for p in paths:
         next = os.path.join(p, item)
         if os.path.exists(next):
+            if not os.path.isabs(next):
+                next = os.path.abspath(next)
             return next
 
     return &quot;&quot;

to work around this. I&apos;m wondering if we should error about empty directories in that variable though.

If you could see if the above guesses are correct for your environment I&apos;d appreciate it. It looks like it comes down to the exact layer config you&apos;re using.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21544</commentid>
    <comment_count>9</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 12:22:44 +0000</bug_when>
    <thetext>I don&apos;t have :: in BBPATH but there is non-existent dir &quot;/OE/shr-core/openembedded&quot;

from initial BBPATH defined setup-env
export BBPATH=&quot;${TOPDIR}:${TOPDIR}/openembedded&quot;


BBPATH=&quot;/OE/shr-core:/OE/shr-core/openembedded:/OE/shr-core/meta-smartphone/meta-shr:/OE/shr-core/meta-smartphone/meta-aurora:/OE/shr-core/meta-smartphone/meta-fso:/OE/shr-core/meta-openembedded/meta-oe:/OE/shr-core/meta-openembedded/toolchain-layer:/OE/shr-core/meta-openembedded/meta-efl:/OE/shr-core/meta-openembedded/meta-gnome:/OE/shr-core/meta-openembedded/meta-gpe:/OE/shr-core/meta-openembedded/meta-systemd:/OE/shr-core/meta-smartphone/meta-osmocombb:/OE/shr-core/meta-smartphone/meta-nokia:/OE/shr-core/meta-smartphone/meta-htc:/OE/shr-core/meta-smartphone/meta-palm:/OE/shr-core/meta-smartphone/meta-openmoko:/OE/shr-core/meta-smartphone/meta-samsung:/OE/shr-core/meta-browser:/OE/shr-core/openembedded-core/meta&quot;

Later today or tomorrow I&apos;ll try to remove it and then your patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21547</commentid>
    <comment_count>10</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-23 12:51:09 +0000</bug_when>
    <thetext>Do you have the value of the FILE variable handy in the failing cases (bitbake -e vase-files | grep ^FILE). I&apos;m pretty sure the value of FILE is wrong, the question is how/why...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21548</commentid>
    <comment_count>11</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 13:19:05 +0000</bug_when>
    <thetext>OE om-gta02@shr ~/shr-core $ bitbake -e -b openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb | grep ^FILE=
FILE=&quot;openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb&quot;
OE om-gta02@shr ~/shr-core $ bitbake -e base-files | grep ^FILE=
FILE=&quot;/OE/shr-core/openembedded-core/meta/recipes-core/base-files/base-files_3.0.14.bb&quot;

Now I&apos;ve found what could cause &apos;::&apos; in BBPATH

meta-openembedded/meta-initramfs/conf/layer.conf
and meta-handheld/conf/layer.conf are using
BBPATH := &quot;${LAYERDIR}:${BBPATH}&quot;

while all other layers are I&apos;m using have
BBPATH .= &quot;:${LAYERDIR}&quot;

And with meta-initramfs/meta-handheld layers included I get &apos;::&apos;

base-files.b.env:BBPATH=&quot;/OE/shr-core/meta-handheld:/OE/shr-core/meta-openembedded/meta-initramfs::/OE/shr-core/meta-jama:/OE/shr-core/meta-smartphone/meta-shr:/OE/shr-core/meta-smartphone/meta-aurora:/OE/shr-core/meta-smartphone/meta-fso:/OE/shr-core/meta-openembedded/meta-oe:/OE/shr-core/meta-openembedded/toolchain-layer:/OE/shr-core/meta-openembedded/meta-efl:/OE/shr-core/meta-openembedded/meta-gnome:/OE/shr-core/meta-openembedded/meta-gpe:/OE/shr-core/meta-openembedded/meta-systemd:/OE/shr-core/meta-smartphone/meta-osmocombb:/OE/shr-core/meta-smartphone/meta-nokia:/OE/shr-core/meta-smartphone/meta-htc:/OE/shr-core/meta-smartphone/meta-palm:/OE/shr-core/meta-smartphone/meta-openmoko:/OE/shr-core/meta-smartphone/meta-samsung:/OE/shr-core/meta-browser:/OE/shr-core/openembedded-core/meta&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21549</commentid>
    <comment_count>12</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 13:26:24 +0000</bug_when>
    <thetext>I can also reproduce it with BBPATH starting with &apos;:&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21550</commentid>
    <comment_count>13</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-23 13:42:59 +0000</bug_when>
    <thetext>Thanks Martin, that helps a lot.

So to summarise, we have several issues:

a) bb.utils.which() can sometimes not return absolute paths, My patch fixes that.
b) :: can make it into BBPATH accidentally for whatever reason. We should detect and warn about that as it doesn&apos;t make sense.
c) buildFile() in cooker should always be resolving paths into absolute paths anyway. The code in matchFiles therefore also needs fixing so non-absolute paths don&apos;t get passed any further within bitbake.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21551</commentid>
    <comment_count>14</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 13:57:59 +0000</bug_when>
    <thetext>b)
Can we somehow not only warn about leading/trailing &apos;:&apos; and &apos;::&apos;, but also ignore /remove them in runtime?

I&apos;m thinking about scenario when someone is using layers maintained by someone else or from some older release and cannot update/fix their layer.conf immediately.

Well if this &quot;-c unpack -b&quot; is only case when &apos;:&apos; matter then it&apos;s not important, but if there are some other hidden issues with such BBPATH..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21555</commentid>
    <comment_count>15</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 17:13:17 +0000</bug_when>
    <thetext>I&apos;ve sent patches for layer.conf in
meta-handheld:
http://patchwork.openembedded.org/patch/28485/
meta-initramfs:
http://patchwork.openembedded.org/patch/28487/

but there are at least 2 more in oe-core repository with the same BBPATH append:
meta-hob/conf/layer.conf:BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot;
meta-skeleton/conf/layer.conf:BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21556</commentid>
    <comment_count>16</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-23 17:18:59 +0000</bug_when>
    <thetext>(In reply to comment #15)
&gt; I&apos;ve sent patches for layer.conf in
&gt; meta-handheld:
&gt; http://patchwork.openembedded.org/patch/28485/
&gt; meta-initramfs:
&gt; http://patchwork.openembedded.org/patch/28487/
&gt; 
&gt; but there are at least 2 more in oe-core repository with the same BBPATH
&gt; append:
&gt; meta-hob/conf/layer.conf:BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot;
&gt; meta-skeleton/conf/layer.conf:BBPATH := &quot;${BBPATH}:${LAYERDIR}&quot;


These aren&apos;t wrong as such, they just assume they&apos;re being included after the oe-core layer...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21558</commentid>
    <comment_count>17</comment_count>
    <who name="Martin Jansa">Martin.Jansa</who>
    <bug_when>2012-05-23 18:27:15 +0000</bug_when>
    <thetext>Well, yes, they work, but order of layers in BBLAYERS together with BBFILE_PRIORITY in each layer.conf is confusing enough already for many people.. 

so IMHO it&apos;s better when layers respect BBLAYERS order not introduce another &quot;variable&quot; to priority mix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21619</commentid>
    <comment_count>18</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-05-25 13:00:36 +0000</bug_when>
    <thetext>Patches for issues a) and c) have merged:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=0b14db452413df414fbadf14d6dae287bc5ae9ca
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=2d3ff5e6e17c3c8e0ba000c696da54e51167f15d

I&apos;m going to leave b) to Laurentiu. I don&apos;t think fixing this up dynamically makes sense, we need to tell the user there is a problem and let them fix it. We need to detect any empty path variable, so &quot;.&quot; and &quot;&quot; at any point of BBPATH are an issue. There is already a PATH check in sanity.bbclass which could easily be used as a reference for this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22122</commentid>
    <comment_count>19</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2012-06-13 13:24:06 +0000</bug_when>
    <thetext>Patch for b) has been also merged. For a while, we will only show a warning message and ask the user to fix the BBPATH issue, but the build process will continue. After all BBPATH issues in the tree will be fixed(let&apos;s give it a month), the warning will become a fatal error and the build will not continue unless the problem is fixed.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d8d95d10bd6945047b4bab9ff9a4e948c73db205</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>