[oe] [PATCH] bitbake: lib/bb/fetch/hg: fix fetching from a mercurial repository

Eric Bénard eric at eukrea.com
Mon Sep 6 19:25:08 UTC 2010


Le 06/09/2010 21:20, Frans Meulenbroeks a écrit :
> 2010/9/6 Eric Bénard<eric at eukrea.com>:
>> * without this fix, we get :
>> updating working directory
>> 74 files updated, 0 files merged, 0 files removed, 0 files unresolved
>> abort: There is no Mercurial repository here (.hg not found)!
>>
>> Signed-off-by: Eric Bénard<eric at eukrea.com>
>> Tested-by: Frans Meulenbroeks<fransmeulenbroeks at gmail.com>
>> ---
>>   lib/bb/fetch/hg.py |    1 +
>>   1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py
>> index d075638..bb156ed 100644
>> --- a/lib/bb/fetch/hg.py
>> +++ b/lib/bb/fetch/hg.py
>> @@ -138,6 +138,7 @@ class Hg(Fetch):
>>         # Even when we clone (fetch), we still need to update as hg's clone
>>         # won't checkout the specified revision if its on a branch
>>          updatecmd = self._buildhgcommand(ud, d, "update")
>> +        os.chdir(ud.moddir)
>>          bb.msg.debug(1, bb.msg.domain.Fetcher, "Running %s" % updatecmd)
>>          runfetchcmd(updatecmd, d)
>>
>> --
>> 1.6.3.3
>
> I understood from Eric that even with this patch one needs mercurial
> installed on the host.
> I did install it before, and have not tested without it, but with
> mercurial installed and this patch hg recipes (like ushare) work.
>
if mercurial is not installed on the host, the error is :
/usr/bin/env: hg: No such file or directory

Eric




More information about the Openembedded-devel mailing list