Bug 12970 - uninative file should be versionned
Summary: uninative file should be versionned
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 4.0 M1
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-10-24 18:38 UTC by Nicolas Dechesne
Modified: 2021-11-13 16:41 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Dechesne 2018-10-24 18:38:37 UTC
the uninative file by default goes to $DL_DIR/uninative/<CHECKSUM>/x86_64-nativesdk-libc.tar.bz2

so the file name does not include any version information.

when doing offline builds using a local mirror (own-mirror) or when using PREMIRROR, using the instructions from the Yocto manual, such as:

     SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/"
     INHERIT += "own-mirrors"

we will try to fetch the file from the local mirror, but we will try to fetch x86_64-nativesdk-libc.tar.bz2 which does not have any indication about the version.

There are several issues:
1. if the uninative file was not manually copied into the local mirror and if network is disabled, then it won't be fetched from mirror nor from the internet.

2. if the uninative is manually imported into the local mirror, then we can't have more than 1 file (name collision), and if/when the uninative tarball is updated, we won't be able to make any build with uninative. 

why is the uninative file not like any other fetched tarball, e.g. something like $DL_DIR/x86_64-nativesdk-libc_<version>.tar.bz2, where <version> can be the checksum.
Comment 1 Richard Purdie 2021-11-03 15:46:50 UTC
The mirroring issue should have been fixed firstly by before this bug):

http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/uninative.bbclass?id=64d15c298dd46e9ba200d77de6d0ab96ec24588c

and then more generically for PREMIRRORS in general with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/uninative.bbclass?id=917032944ec71e62ba9e32842ec78e1d1218e2e0

and in the mirror directory, it should be using the file under a checksum directory, not at the top level. As such I think the mirroring issues are fixed. 

I have left this bug open as having a version in the tarball name would be helpful, I'm struggling to remember what that was a bad idea at the time and whether it still applies...
Comment 2 Mark Jonas 2021-11-12 16:09:35 UTC
It now works as I expected. That is, the uninative archive can be found at uninative/<CHECKSUM>/x86_64-nativesdk-libc.tar.bz2 in the location SOURCE_MIRROR_URL points to.

I tested on Dunfell 3.1.9.

Thank you very much Richard!
Comment 3 Richard Purdie 2021-11-13 16:41:34 UTC
Also, the rename is now in place so all the issues are resolved here:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=ca97a835fea2c1216ea1f5032b4301c9778c4462