diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-07 12:08:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-10 23:37:11 +0000 |
commit | 122d3609cdd83d28cc0770195e4aa30bb8737393 (patch) | |
tree | 5b0b57f68d70a6cb8a778eeabf325123e7ccc914 /lib/bb/fetch2/hg.py | |
parent | 97dbbae5fa366ce4fa51b62006c42d5e568c6390 (diff) | |
download | bitbake-122d3609cdd83d28cc0770195e4aa30bb8737393.tar.gz |
bitbake/fetch2: Update forcefetch and mirror handling to clean up, simplfy and bug fix the code
(From Poky rev: 37624b97450f2ba3d6fad3e1e51818486451447e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/hg.py')
-rw-r--r-- | lib/bb/fetch2/hg.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/fetch2/hg.py b/lib/bb/fetch2/hg.py index d186b009d..ac5825baa 100644 --- a/lib/bb/fetch2/hg.py +++ b/lib/bb/fetch2/hg.py @@ -64,9 +64,13 @@ class Hg(FetchMethod): ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision), d) - def forcefetch(self, url, ud, d): + def need_update(self, url, ud, d): revTag = ud.parm.get('rev', 'tip') - return revTag == "tip" + if revTag == "tip": + return True + if not os.path.exists(ud.localpath): + return True + return False def _buildhgcommand(self, ud, d, command): """ |