Bug 5824

Summary: source tarball is not recreated
Product: [Build System, Metadata & Runtime] BitBake Reporter: Adrian Dudau <adrian.dudau>
Component: bitbakeAssignee: Richard Purdie <richard.purdie>
Status: VERIFIED FIXED QA Contact: Andra Necula <andrax.g.necula>
Severity: normal    
Priority: Medium+ CC: alexandru.c.georgescu, andrax.g.necula, poky.bs.watcher, poky.watcher
Version: 1.6   
Target Milestone: 1.6 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Adrian Dudau 2014-02-14 09:24:15 UTC
When the BB_GENERATE_MIRROR_TARBALLS is enabled, bitbake creates the source tarball only once at the first pass and it never updates it.

This is a problem when the package version changes, as bitbake doesn't recreate the tarball from the new git repo so we end up with the old version in the tarball.


Steps to reproduce:

Fetch a package with the BB_GENERATE_MIRROR_TARBALLS enabled in local.conf:
bitbake -c fetch lttng-modules

Edit the lttng-modules recipe by specifying a different git commit in SRCREV.

bitbake -c clean lttng-modules
bitbake -c fetch lttng-modules

The tarball will not be updated and contain the old version of the package.
Comment 1 Richard Purdie 2014-02-17 17:15:52 UTC
The mirror tarball is a copy of the git metadata, not the source at any particular version. It is recreated as and when any new update from upstream is pulled in (such as new revisions).

Can you be more specific about the case where the tarball isn't being updated and you believe that it should be?
Comment 2 Adrian Dudau 2014-02-21 10:53:15 UTC
The issue is reproducible on the master branch of poky following the next steps:

1 Create a new build fodler
2 mkdir downloads inside the build folder
3 cd downloads
4 wget http://downloads.yoctoproject.org/mirror/sources/git2_git.lttng.org.lttng-modules.git.tar.gz
This is an older version of lttng-modules released with Dora; the lttng-modules version has been updated in the recipe in the meantime.
5 Add the BB_GENERATE_MIRROR_TARBALLS = "1" flag to local.conf
6 bitbake -c fetch lttng-modules
7 ll downloads 
The date on the file git2_git.lttng.org.lttng-modules.git.tar.gz wasn't updated, it's still 27 Aug.
8. To confirm the tarball is outdated, remove everything BUT the tarball from the downloads folder, add the flag BB_NO_NETWORK = "1" in the local.conf and then run again bitbake -c fetch lttng-modules. An error will occurr.
Comment 3 Richard Purdie 2014-02-24 13:01:46 UTC
Thanks for the test case, that helps immensely. I tracked down the issue to a typo:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=a1faa7df2a0972fa631d3aee98c59f6b0e8eb43c
Comment 4 Adrian Dudau 2014-02-24 14:26:54 UTC
Fix confirmed. Can be closed.
Comment 5 Andra Necula 2014-09-16 12:25:36 UTC
Hi,
I followed the steps given by Adrian Dudau and the bug didn't reproduced. 
I used Ubuntu 14.04
poky a44006262cf3b810ec78b4cccd8076102a7a0f3e
I'll put this bug on verified.
Cheers! Andra N.