diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 08:09:05 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-22 08:09:05 -0500 |
commit | 3445365503e1e4d5601acf7c05609cc9673ec414 (patch) | |
tree | 7eb70c5bab200b0515a1b4d16873a75855df4c89 /yocto-poky/bitbake/lib/bb/fetch2/git.py | |
parent | d10502479a70bd72ca4e09569b6ee738875e4823 (diff) | |
parent | d7e963193b4e6541206a320316a158a65f1fee89 (diff) | |
download | talos-openbmc-3445365503e1e4d5601acf7c05609cc9673ec414.tar.gz talos-openbmc-3445365503e1e4d5601acf7c05609cc9673ec414.zip |
Merge commit 'd7e963193b4e6541206a320316a158a65f1fee89' into HEAD
Diffstat (limited to 'yocto-poky/bitbake/lib/bb/fetch2/git.py')
-rw-r--r-- | yocto-poky/bitbake/lib/bb/fetch2/git.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/git.py b/yocto-poky/bitbake/lib/bb/fetch2/git.py index 40658ff94..9bd87ad25 100644 --- a/yocto-poky/bitbake/lib/bb/fetch2/git.py +++ b/yocto-poky/bitbake/lib/bb/fetch2/git.py @@ -66,6 +66,7 @@ Supported SRC_URI options are: # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +import errno import os import re import bb @@ -181,8 +182,6 @@ class Git(FetchMethod): def download(self, ud, d): """Fetch url""" - ud.repochanged = not os.path.exists(ud.fullmirror) - # If the checkout doesn't exist and the mirror tarball does, extract it if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror): bb.utils.mkdirhier(ud.clonedir) @@ -220,7 +219,11 @@ class Git(FetchMethod): runfetchcmd(fetch_cmd, d) runfetchcmd("%s prune-packed" % ud.basecmd, d) runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d) - ud.repochanged = True + try: + os.unlink(ud.fullmirror) + except OSError as exc: + if exc.errno != errno.ENOENT: + raise os.chdir(ud.clonedir) for name in ud.names: if not self._contains_ref(ud, d, name): @@ -228,7 +231,7 @@ class Git(FetchMethod): def build_mirror_data(self, ud, d): # Generate a mirror tarball if needed - if ud.write_tarballs and (ud.repochanged or not os.path.exists(ud.fullmirror)): + if ud.write_tarballs and not os.path.exists(ud.fullmirror): # it's possible that this symlink points to read-only filesystem with PREMIRROR if os.path.islink(ud.fullmirror): os.unlink(ud.fullmirror) |