Bug 972 - tag= does not work as expected for git URIs
Summary: tag= does not work as expected for git URIs
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: High major
Target Milestone: 1.0 PointRelease
Assignee: Ke Yu
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2011-04-12 08:09 UTC by Paul Eggleton
Modified: 2011-05-13 11:14 UTC (History)
3 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 Paul Eggleton 2011-04-12 08:09:30 UTC
If you specify a tag which is not a sha1 hash in a git URI then it will be ignored; when it unpacks you get master instead.

Example URI:

SRC_URI = "git://git.ipxe.org/ipxe.git;protocol=git;tag=v${PV}"
Comment 1 Ke Yu 2011-04-19 21:39:34 UTC
The culprit is here:
bitbake/lib/bb/fetch2/git.py:
"
        for name in ud.names:
            # Ensure anything that doesn't look like a sha256 checksum/revision is translated into one
            if not ud.revisions[name] or len(ud.revisions[name]) != 40  or (False in [c in "abcdef0123456789" for c in ud.revisions[name]]):
                ud.revisions[name] = self.latest_revision(ud.url, ud, d, name)
"

when revision is tag like v${PV}, fetcher will consider it as invalid sha256 checksum, and replace it with master laster revision.

Need to think about the better way to handle this case