Bug 2786 - [LTP]/opt/ltp/Version file doesn't show the correct version of ltp
Summary: [LTP]/opt/ltp/Version file doesn't show the correct version of ltp
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.5 M1
Assignee: Cristian Iorga
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-07-18 09:35 UTC by Yi Zhao
Modified: 2013-05-27 10:57 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yi Zhao 2012-07-18 09:35:17 UTC

    
Comment 1 Yi Zhao 2012-07-18 09:42:27 UTC
Tree/branch: poky/master
Commit:eb0cb7e8234f5d2e5623406e9660be91cf52f65e

Image location: http://autobuilder.pokylinux.org/pub/nightly/20120712-1/machines

The /opt/ltpVersion file shows a wrong version of ltp:
$ cat /opt/ltp/Version
1.3_M1.final-480-g89008d4

The correct version should be:
20120401
Comment 2 Saul Wold 2012-07-24 19:52:56 UTC
The problem here is that we seem to be picking up the results of git describe from the poky git repo, not from LTP since we download the tarball.  It might be better to just disable that git describe and always use the VERSION file since we download the tarball.

git describe seems to work differently depending on git version, which is why we see this sometime, and not across all machines.
Comment 3 Cristian Iorga 2012-07-25 06:29:03 UTC
In that case, a patch to the makefile can be added that will modify it to look for version only.
At this point, it is not clear if that patch can be upstreamed. Please advise.
Comment 4 Cristian Iorga 2013-05-27 10:57:52 UTC
Tested on Ubuntu 12.10 x86-64 build system.

Target: core-image-sato-sdk qemux86-64.

the content of /opt/ltp/Version is correct:

sh-4.2# cat /opt/ltp/Version
20130109
sh-4.2# 

ltp makefile took the right decision regarding content of Version file.

ltp is built from a tarball, and git describe command is ran in the right built directory, while git returns the right error code.

root@sentry:/mnt/Yo/yoctoproject/build/tmp/work/x86_64-poky-linux/ltp/20130109-r
0/ltp-20130109# git --version
git version 1.7.10.4
root@sentry:/mnt/Yo/yoctoproject/build/tmp/work/x86_64-poky-linux/ltp/20130109-r
0/ltp-20130109# which git
/usr/bin/git