Jim MacArthur pushed to branch jmac/make_marked_directories at BuildStream / buildstream
Commits:
-
36746730
by Chandan Singh at 2019-01-31T10:50:05Z
-
fa4a21ce
by Chandan Singh at 2019-01-31T12:15:43Z
-
dd791373
by Chandan Singh at 2019-01-31T14:32:44Z
-
96c0fbd6
by Chandan Singh at 2019-01-31T15:39:19Z
-
73945ef2
by Jim MacArthur at 2019-01-31T16:36:55Z
3 changed files:
Changes:
| ... | ... | @@ -28,7 +28,7 @@ import grpc |
| 28 | 28 |
|
| 29 | 29 |
from .. import utils
|
| 30 | 30 |
from .._message import Message, MessageType
|
| 31 |
-from . import Sandbox, SandboxCommandError
|
|
| 31 |
+from . import Sandbox, SandboxCommandError, SandboxFlags
|
|
| 32 | 32 |
from .sandbox import _SandboxBatch
|
| 33 | 33 |
from ..storage._filebaseddirectory import FileBasedDirectory
|
| 34 | 34 |
from ..storage._casbaseddirectory import CasBasedDirectory
|
| ... | ... | @@ -313,6 +313,15 @@ class SandboxRemote(Sandbox): |
| 313 | 313 |
upload_vdir = CasBasedDirectory(cascache, ref=None)
|
| 314 | 314 |
upload_vdir.import_files(self.get_virtual_directory()._get_underlying_directory())
|
| 315 | 315 |
|
| 316 |
+ # Create directories for all marked directories. This emulates
|
|
| 317 |
+ # some of the behaviour of other sandboxes, which create these
|
|
| 318 |
+ # to use as mount points.
|
|
| 319 |
+ if not flags & SandboxFlags.ROOT_READ_ONLY:
|
|
| 320 |
+ for mark in self._get_marked_directories():
|
|
| 321 |
+ directory = mark['directory']
|
|
| 322 |
+ # Create each marked directory
|
|
| 323 |
+ upload_vdir.descend(directory.split(os.path.sep), create=True)
|
|
| 324 |
+ |
|
| 316 | 325 |
upload_vdir.recalculate_hash()
|
| 317 | 326 |
|
| 318 | 327 |
# Generate action_digest first
|
| ... | ... | @@ -18,7 +18,7 @@ try: |
| 18 | 18 |
utils.get_host_tool('git')
|
| 19 | 19 |
HAVE_GIT = True
|
| 20 | 20 |
out = str(subprocess.check_output(['git', '--version']), "utf-8")
|
| 21 |
- version = tuple(int(x) for x in out.split(' ', 2)[2].split('.'))
|
|
| 21 |
+ version = tuple(int(x) for x in out.split(' ')[2].split('.'))
|
|
| 22 | 22 |
HAVE_OLD_GIT = version < (1, 8, 5)
|
| 23 | 23 |
except ProgramNotFoundError:
|
| 24 | 24 |
HAVE_GIT = False
|
| ... | ... | @@ -88,5 +88,5 @@ whitelist_externals = |
| 88 | 88 |
commands =
|
| 89 | 89 |
python3 setup.py --command-packages=click_man.commands man_pages
|
| 90 | 90 |
deps =
|
| 91 |
- click-man
|
|
| 91 |
+ click-man >= 0.3.0
|
|
| 92 | 92 |
-rrequirements/requirements.txt
|
