diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2013-05-07 18:39:20 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-09 14:15:10 +0100 |
commit | d529c11fa512e7f06044378a7ec7137765ea8eb4 (patch) | |
tree | b636798aa7a84b290e3ccf6aa280655ed324d9dd /bitbake/lib/bb/fetch2 | |
parent | fd8dcd7b88925dbb8203b0d2ec6ac62fe667676c (diff) | |
download | poky-d529c11fa512e7f06044378a7ec7137765ea8eb4.tar.gz |
bitbake: git: remove symling before updating mirror tarball
* with read-only PREMIRROR (e.g. mounted over NFS or CIFS
and referenced as file:///mnt/premirror) we cannot use
BB_GENERATE_MIRROR_TARBALLS because all git2_abc.git.tar.gz
files later became just symlinks to read-only location in PREMIRROR
(it works fine on first build and for new components, because
at that time there isn't tarball on PREMIRROR yet).
ERROR: Fetcher failure: Fetch command failed with exit code 141, output:
tar (child): /build/downloads/git2_abc.git.tar.gz: Cannot open: Read-only file system
tar (child): Error is not recoverable: exiting now
(Bitbake rev: 3627b02f77c78beedadadd77c619b9e5edaae076)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r-- | bitbake/lib/bb/fetch2/git.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 052802e602..6175e4c7c9 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py | |||
@@ -217,6 +217,10 @@ class Git(FetchMethod): | |||
217 | def build_mirror_data(self, url, ud, d): | 217 | def build_mirror_data(self, url, ud, d): |
218 | # Generate a mirror tarball if needed | 218 | # Generate a mirror tarball if needed |
219 | if ud.write_tarballs and (ud.repochanged or not os.path.exists(ud.fullmirror)): | 219 | if ud.write_tarballs and (ud.repochanged or not os.path.exists(ud.fullmirror)): |
220 | # it's possible that this symlink points to read-only filesystem with PREMIRROR | ||
221 | if os.path.islink(ud.fullmirror): | ||
222 | os.unlink(ud.fullmirror) | ||
223 | |||
220 | os.chdir(ud.clonedir) | 224 | os.chdir(ud.clonedir) |
221 | logger.info("Creating tarball of git repository") | 225 | logger.info("Creating tarball of git repository") |
222 | runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d) | 226 | runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d) |