Bug 5717 - GITSM fetcher should use ud.basecmd
Summary: GITSM fetcher should use ud.basecmd
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.6
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2014-01-13 01:43 UTC by Rudolf J Streif
Modified: 2014-01-28 11:58 UTC (History)
3 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 Rudolf J Streif 2014-01-13 01:43:23 UTC
The gitsm fetcher inherits from the git fetcher but it does hardcodes git into the runfetchcmd() calls in update_submodules():

def update_submodules(self, u, ud, d):
...
        runfetchcmd("git reset --hard", d)
        runfetchcmd("git submodule init", d)
        runfetchcmd("git submodule update", d)
...

It should use ud.basecmd instead. (Interestingly enough it does so in uses_submodules()). That is merely an inconsistency. However, it also does not allow for FETCHCMD_git to be used to override the command.

Proposed fix:

        runfetchcmd("%s reset --hard" % (ud.basecmd), d)
        runfetchcmd("%s submodule init" % (ud.basecmd), d)
        runfetchcmd("%s submodule update" % (ud.basecmd), d)