Guest User

Untitled

a guest
Jun 22nd, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 59.97 KB | None | 0 0
  1. ______________________________ test_consistency_cached ______________________________
  2.  
  3. tmpdir = local('/home/shared/src/buildstream/tmp/test_consistency_cached0')
  4. datafiles = local('/home/shared/src/buildstream/tmp/test_consistency_cached0')
  5.  
  6. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
  7. def test_consistency_cached(tmpdir, datafiles):
  8. setup = BzrSetup(datafiles, 'target.bst', tmpdir)
  9. repodir = os.path.join(str(datafiles), 'foo')
  10. branchdir = os.path.join(repodir, 'bar')
  11. setup.bzr_initrepo(repodir)
  12. setup.bzr_init(branchdir)
  13. setup.bzr_commit(branchdir, 'b')
  14. setup.bzr_commit(branchdir, 'c/d')
  15. setup.bzr_commit(branchdir, 'c/e')
  16. > setup.source.fetch()
  17.  
  18. tests/sources/bzr.py:91:
  19. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  20. buildstream/plugins/sources/bzr.py:105: in fetch
  21. self._ensure_mirror()
  22. buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
  23. fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
  24. buildstream/plugin.py:399: in call
  25. exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
  26. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  27.  
  28. self = <pluginbase._internalspace._sp09fa344939790b76de3db52c1b7015de.bzr.BzrSource object at 0x7fe9adb9b908>
  29. collect_stdout = False
  30. fail = 'Failed to branch from file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar to /home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h/bar'
  31. popenargs = (['/usr/bin/bzr', 'branch', 'file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar', '/home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h/bar'],)
  32. kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
  33. output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
  34. kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adbc0f28>
  35. suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adbc0ea0>
  36. resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adbc0620>
  37. output = None, _ = None, exit_code = 4
  38.  
  39. def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
  40.  
  41. if 'stdout' in kwargs or 'stderr' in kwargs:
  42. raise ValueError('May not override destination output')
  43.  
  44. with self._output_file() as output_file:
  45. kwargs['stdout'] = output_file
  46. kwargs['stderr'] = output_file
  47. kwargs['start_new_session'] = True
  48. if collect_stdout:
  49. kwargs['stdout'] = subprocess.PIPE
  50.  
  51. self.__note_command(output_file, *popenargs, **kwargs)
  52.  
  53. # Handle termination, suspend and resume
  54. def kill_proc():
  55. if process:
  56. # FIXME: This is a brutal but reliable approach
  57. #
  58. # Other variations I've tried which try SIGTERM first
  59. # and then wait for child processes to exit gracefully
  60. # have not reliably cleaned up process trees and have
  61. # left orphaned git or ssh processes alive.
  62. #
  63. # This cleans up the subprocesses reliably but may
  64. # cause side effects such as possibly leaving stale
  65. # locks behind. Hopefully this should not be an issue
  66. # as long as any child processes only interact with
  67. # the temp directories which we control and cleanup
  68. # ourselves.
  69. #
  70. utils._kill_process_tree(process.pid)
  71.  
  72. def suspend_proc():
  73. if process:
  74. group_id = os.getpgid(process.pid)
  75. os.killpg(group_id, signal.SIGSTOP)
  76.  
  77. def resume_proc():
  78. if process:
  79. group_id = os.getpgid(process.pid)
  80. os.killpg(group_id, signal.SIGCONT)
  81.  
  82. with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
  83. process = subprocess.Popen(*popenargs, **kwargs)
  84. output, _ = process.communicate()
  85. exit_code = process.poll()
  86.  
  87. if fail and exit_code:
  88. > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
  89. E buildstream.exceptions.PluginError: bzr source at target.bst [line 4 column 2]: Failed to branch from file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar to /home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h/bar
  90.  
  91. buildstream/plugin.py:546: PluginError
  92. ------------------------------- Captured stdout call --------------------------------
  93. Host bzr is /usr/bin/bzr
  94. Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_consistency_cached0/foo
  95. Running host command
  96. Shared repository with trees (format: 2a)
  97. Location:
  98. shared repository: tmp/test_consistency_cached0/foo
  99. Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar
  100. Running host command
  101. Created a repository tree (format: 2a)
  102. Using shared repository: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/
  103. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add b
  104. Running host command
  105. adding b
  106. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file b"
  107. Running host command
  108. Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
  109. added b
  110. Committed revision 1.
  111. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add c/d
  112. Running host command
  113. adding c
  114. adding c/d
  115. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file c/d"
  116. Running host command
  117. Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
  118. added c
  119. added c/d
  120. Committed revision 2.
  121. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add c/e
  122. Running host command
  123. adding c/e
  124. Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file c/e"
  125. Running host command
  126. Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
  127. added c/e
  128. Committed revision 3.
  129. Fetching file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo
  130. Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h
  131. Running host command
  132. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  133.  
  134. Traceback (most recent call last):
  135. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  136. exec line
  137. File "<string>", line 1, in <module>
  138. ImportError: No module named cov_core_init
  139.  
  140. Remainder of file ignored
  141. Shared repository (format: 2a)
  142. Location:
  143. shared repository: tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h
  144. Running host command /home/shared/src/buildstream: /usr/bin/bzr branch file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar /home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h/bar
  145. Running host command
  146. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  147.  
  148. Traceback (most recent call last):
  149. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  150. exec line
  151. File "<string>", line 1, in <module>
  152. ImportError: No module named cov_core_init
  153.  
  154. Remainder of file ignored
  155. bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
  156.  
  157. Traceback (most recent call last):
  158. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
  159. return the_callable(*args, **kwargs)
  160. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
  161. ret = run(*run_argv)
  162. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
  163. return self.run(**all_cmd_args)
  164. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
  165. return self._operation.run_simple(*args, **kwargs)
  166. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
  167. self.cleanups, self.func, *args, **kwargs)
  168. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  169. result = func(*args, **kwargs)
  170. File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
  171. source_branch=br_from)
  172. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
  173. create_tree_if_local=create_tree_if_local)
  174. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
  175. self.cleanups, self.func, self, *args, **kwargs)
  176. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  177. result = func(*args, **kwargs)
  178. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
  179. result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  180. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
  181. find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  182. File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
  183. result = unbound(self, *args, **kwargs)
  184. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
  185. find_ghosts=find_ghosts)
  186. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
  187. self.__fetch()
  188. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
  189. pb.update(gettext("Finding revisions"), 0, 2)
  190. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
  191. install()
  192. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
  193. _translations = install_translations(lang)
  194. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
  195. fallback=True)
  196. File "/usr/lib64/python2.7/gettext.py", line 556, in translation
  197. t = _translations.setdefault(key, class_(fp))
  198. File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
  199. self._parse(fp)
  200. File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
  201. self.plural = c2py(plural)
  202. File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
  203. result, nexttok = _parse(_tokenize(plural))
  204. File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
  205. nexttok = next(tokens)
  206. File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
  207. for mo in re.finditer(_token_pattern, plural):
  208. File "/usr/lib64/python2.7/re.py", line 190, in finditer
  209. return _compile(pattern, flags).finditer(string)
  210. File "/usr/lib64/python2.7/re.py", line 247, in _compile
  211. raise TypeError, "first argument must be string or compiled pattern"
  212. TypeError: first argument must be string or compiled pattern
  213.  
  214. bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
  215. fedora-24-Twenty_Four)
  216. arguments: ['/usr/bin/bzr', 'branch',
  217. 'file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar
  218. ', '/home/shared/src/buildstream/tmp/test_consistency_cached0/sources/bzr/
  219. tmp61ebxm5h/bar']
  220. plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
  221. launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
  222. po_merge[2.6.0], weave_fmt[2.6.0]
  223. encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
  224.  
  225. *** Bazaar has encountered an internal error. This probably indicates a
  226. bug in Bazaar. You can help us fix it by filing a bug report at
  227. https://bugs.launchpad.net/bzr/+filebug
  228. including this traceback and a description of the problem.
  229. Fetching file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo
  230. ____________________________________ test_fetch _____________________________________
  231.  
  232. tmpdir = local('/home/shared/src/buildstream/tmp/test_fetch0')
  233. datafiles = local('/home/shared/src/buildstream/tmp/test_fetch0')
  234.  
  235. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
  236. def test_fetch(tmpdir, datafiles):
  237. # Pretty long setup
  238. setup = BzrSetup(datafiles, 'target.bst', tmpdir)
  239. repodir = os.path.join(str(datafiles), 'foo')
  240. branchdir = os.path.join(repodir, 'bar')
  241. setup.bzr_initrepo(repodir)
  242. setup.bzr_init(branchdir)
  243. setup.bzr_commit(branchdir, 'b')
  244. setup.bzr_commit(branchdir, 'c/d')
  245. setup.bzr_commit(branchdir, 'c/e')
  246.  
  247. # Fetch the branch
  248. > setup.source.fetch()
  249.  
  250. tests/sources/bzr.py:119:
  251. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  252. buildstream/plugins/sources/bzr.py:105: in fetch
  253. self._ensure_mirror()
  254. buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
  255. fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
  256. buildstream/plugin.py:399: in call
  257. exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
  258. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  259.  
  260. self = <pluginbase._internalspace._sp2c02ea1b8264fa0e887dc2c2baf4249d.bzr.BzrSource object at 0x7fe9af1eb668>
  261. collect_stdout = False
  262. fail = 'Failed to branch from file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar to /home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar'
  263. popenargs = (['/usr/bin/bzr', 'branch', 'file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar', '/home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar'],)
  264. kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
  265. output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
  266. kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9af1e2d90>
  267. suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adcb01e0>
  268. resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adcb0bf8>
  269. output = None, _ = None, exit_code = 4
  270.  
  271. def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
  272.  
  273. if 'stdout' in kwargs or 'stderr' in kwargs:
  274. raise ValueError('May not override destination output')
  275.  
  276. with self._output_file() as output_file:
  277. kwargs['stdout'] = output_file
  278. kwargs['stderr'] = output_file
  279. kwargs['start_new_session'] = True
  280. if collect_stdout:
  281. kwargs['stdout'] = subprocess.PIPE
  282.  
  283. self.__note_command(output_file, *popenargs, **kwargs)
  284.  
  285. # Handle termination, suspend and resume
  286. def kill_proc():
  287. if process:
  288. # FIXME: This is a brutal but reliable approach
  289. #
  290. # Other variations I've tried which try SIGTERM first
  291. # and then wait for child processes to exit gracefully
  292. # have not reliably cleaned up process trees and have
  293. # left orphaned git or ssh processes alive.
  294. #
  295. # This cleans up the subprocesses reliably but may
  296. # cause side effects such as possibly leaving stale
  297. # locks behind. Hopefully this should not be an issue
  298. # as long as any child processes only interact with
  299. # the temp directories which we control and cleanup
  300. # ourselves.
  301. #
  302. utils._kill_process_tree(process.pid)
  303.  
  304. def suspend_proc():
  305. if process:
  306. group_id = os.getpgid(process.pid)
  307. os.killpg(group_id, signal.SIGSTOP)
  308.  
  309. def resume_proc():
  310. if process:
  311. group_id = os.getpgid(process.pid)
  312. os.killpg(group_id, signal.SIGCONT)
  313.  
  314. with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
  315. process = subprocess.Popen(*popenargs, **kwargs)
  316. output, _ = process.communicate()
  317. exit_code = process.poll()
  318.  
  319. if fail and exit_code:
  320. > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
  321. E buildstream.exceptions.PluginError: bzr source at target.bst [line 4 column 2]: Failed to branch from file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar to /home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar
  322.  
  323. buildstream/plugin.py:546: PluginError
  324. ------------------------------- Captured stdout call --------------------------------
  325. Host bzr is /usr/bin/bzr
  326. Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_fetch0/foo
  327. Running host command
  328. Shared repository with trees (format: 2a)
  329. Location:
  330. shared repository: tmp/test_fetch0/foo
  331. Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_fetch0/foo/bar
  332. Running host command
  333. Created a repository tree (format: 2a)
  334. Using shared repository: /home/shared/src/buildstream/tmp/test_fetch0/foo/
  335. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add b
  336. Running host command
  337. adding b
  338. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file b"
  339. Running host command
  340. Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
  341. added b
  342. Committed revision 1.
  343. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add c/d
  344. Running host command
  345. adding c
  346. adding c/d
  347. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file c/d"
  348. Running host command
  349. Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
  350. added c
  351. added c/d
  352. Committed revision 2.
  353. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add c/e
  354. Running host command
  355. adding c/e
  356. Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file c/e"
  357. Running host command
  358. Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
  359. added c/e
  360. Committed revision 3.
  361. Fetching file:////home/shared/src/buildstream/tmp/test_fetch0/foo
  362. Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9
  363. Running host command
  364. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  365.  
  366. Traceback (most recent call last):
  367. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  368. exec line
  369. File "<string>", line 1, in <module>
  370. ImportError: No module named cov_core_init
  371.  
  372. Remainder of file ignored
  373. Shared repository (format: 2a)
  374. Location:
  375. shared repository: tmp/test_fetch0/sources/bzr/tmpqhxjhdd9
  376. Running host command /home/shared/src/buildstream: /usr/bin/bzr branch file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar /home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar
  377. Running host command
  378. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  379.  
  380. Traceback (most recent call last):
  381. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  382. exec line
  383. File "<string>", line 1, in <module>
  384. ImportError: No module named cov_core_init
  385.  
  386. Remainder of file ignored
  387. bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
  388.  
  389. Traceback (most recent call last):
  390. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
  391. return the_callable(*args, **kwargs)
  392. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
  393. ret = run(*run_argv)
  394. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
  395. return self.run(**all_cmd_args)
  396. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
  397. return self._operation.run_simple(*args, **kwargs)
  398. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
  399. self.cleanups, self.func, *args, **kwargs)
  400. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  401. result = func(*args, **kwargs)
  402. File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
  403. source_branch=br_from)
  404. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
  405. create_tree_if_local=create_tree_if_local)
  406. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
  407. self.cleanups, self.func, self, *args, **kwargs)
  408. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  409. result = func(*args, **kwargs)
  410. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
  411. result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  412. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
  413. find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  414. File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
  415. result = unbound(self, *args, **kwargs)
  416. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
  417. find_ghosts=find_ghosts)
  418. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
  419. self.__fetch()
  420. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
  421. pb.update(gettext("Finding revisions"), 0, 2)
  422. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
  423. install()
  424. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
  425. _translations = install_translations(lang)
  426. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
  427. fallback=True)
  428. File "/usr/lib64/python2.7/gettext.py", line 556, in translation
  429. t = _translations.setdefault(key, class_(fp))
  430. File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
  431. self._parse(fp)
  432. File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
  433. self.plural = c2py(plural)
  434. File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
  435. result, nexttok = _parse(_tokenize(plural))
  436. File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
  437. nexttok = next(tokens)
  438. File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
  439. for mo in re.finditer(_token_pattern, plural):
  440. File "/usr/lib64/python2.7/re.py", line 190, in finditer
  441. return _compile(pattern, flags).finditer(string)
  442. File "/usr/lib64/python2.7/re.py", line 247, in _compile
  443. raise TypeError, "first argument must be string or compiled pattern"
  444. TypeError: first argument must be string or compiled pattern
  445.  
  446. bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
  447. fedora-24-Twenty_Four)
  448. arguments: ['/usr/bin/bzr', 'branch',
  449. 'file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar', '/home/sha
  450. red/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar']
  451. plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
  452. launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
  453. po_merge[2.6.0], weave_fmt[2.6.0]
  454. encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
  455.  
  456. *** Bazaar has encountered an internal error. This probably indicates a
  457. bug in Bazaar. You can help us fix it by filing a bug report at
  458. https://bugs.launchpad.net/bzr/+filebug
  459. including this traceback and a description of the problem.
  460. Fetching file:////home/shared/src/buildstream/tmp/test_fetch0/foo
  461. ________________________________ test_stage_bad_ref _________________________________
  462.  
  463. tmpdir = local('/home/shared/src/buildstream/tmp/test_stage_bad_ref0')
  464. datafiles = local('/home/shared/src/buildstream/tmp/test_stage_bad_ref0')
  465.  
  466. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
  467. def test_stage_bad_ref(tmpdir, datafiles):
  468. # Pretty long setup
  469. setup = BzrSetup(datafiles, 'target-bad-ref.bst', tmpdir)
  470. repodir = os.path.join(str(datafiles), 'foo')
  471. branchdir = os.path.join(repodir, 'bar')
  472. setup.bzr_initrepo(repodir)
  473. setup.bzr_init(branchdir)
  474. setup.bzr_commit(branchdir, 'b')
  475. setup.bzr_commit(branchdir, 'c/d')
  476. setup.bzr_commit(branchdir, 'c/e')
  477.  
  478. > setup.source.fetch()
  479.  
  480. tests/sources/bzr.py:138:
  481. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  482. buildstream/plugins/sources/bzr.py:105: in fetch
  483. self._ensure_mirror()
  484. buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
  485. fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
  486. buildstream/plugin.py:399: in call
  487. exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
  488. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  489.  
  490. self = <pluginbase._internalspace._sp0ddaa1b9695d0977cb813d52e492fdc3.bzr.BzrSource object at 0x7fe9adba3e48>
  491. collect_stdout = False
  492. fail = 'Failed to branch from file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar to /home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0/bar'
  493. popenargs = (['/usr/bin/bzr', 'branch', 'file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar', '/home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0/bar'],)
  494. kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
  495. output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
  496. kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adbe4048>
  497. suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adbe4620>
  498. resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adbe40d0>
  499. output = None, _ = None, exit_code = 4
  500.  
  501. def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
  502.  
  503. if 'stdout' in kwargs or 'stderr' in kwargs:
  504. raise ValueError('May not override destination output')
  505.  
  506. with self._output_file() as output_file:
  507. kwargs['stdout'] = output_file
  508. kwargs['stderr'] = output_file
  509. kwargs['start_new_session'] = True
  510. if collect_stdout:
  511. kwargs['stdout'] = subprocess.PIPE
  512.  
  513. self.__note_command(output_file, *popenargs, **kwargs)
  514.  
  515. # Handle termination, suspend and resume
  516. def kill_proc():
  517. if process:
  518. # FIXME: This is a brutal but reliable approach
  519. #
  520. # Other variations I've tried which try SIGTERM first
  521. # and then wait for child processes to exit gracefully
  522. # have not reliably cleaned up process trees and have
  523. # left orphaned git or ssh processes alive.
  524. #
  525. # This cleans up the subprocesses reliably but may
  526. # cause side effects such as possibly leaving stale
  527. # locks behind. Hopefully this should not be an issue
  528. # as long as any child processes only interact with
  529. # the temp directories which we control and cleanup
  530. # ourselves.
  531. #
  532. utils._kill_process_tree(process.pid)
  533.  
  534. def suspend_proc():
  535. if process:
  536. group_id = os.getpgid(process.pid)
  537. os.killpg(group_id, signal.SIGSTOP)
  538.  
  539. def resume_proc():
  540. if process:
  541. group_id = os.getpgid(process.pid)
  542. os.killpg(group_id, signal.SIGCONT)
  543.  
  544. with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
  545. process = subprocess.Popen(*popenargs, **kwargs)
  546. output, _ = process.communicate()
  547. exit_code = process.poll()
  548.  
  549. if fail and exit_code:
  550. > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
  551. E buildstream.exceptions.PluginError: bzr source at target-bad-ref.bst [line 4 column 2]: Failed to branch from file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar to /home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0/bar
  552.  
  553. buildstream/plugin.py:546: PluginError
  554. ------------------------------- Captured stdout call --------------------------------
  555. Host bzr is /usr/bin/bzr
  556. Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
  557. Running host command
  558. Shared repository with trees (format: 2a)
  559. Location:
  560. shared repository: tmp/test_stage_bad_ref0/foo
  561. Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar
  562. Running host command
  563. Created a repository tree (format: 2a)
  564. Using shared repository: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/
  565. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add b
  566. Running host command
  567. adding b
  568. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file b"
  569. Running host command
  570. Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
  571. added b
  572. Committed revision 1.
  573. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add c/d
  574. Running host command
  575. adding c
  576. adding c/d
  577. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file c/d"
  578. Running host command
  579. Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
  580. added c
  581. added c/d
  582. Committed revision 2.
  583. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add c/e
  584. Running host command
  585. adding c/e
  586. Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file c/e"
  587. Running host command
  588. Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
  589. added c/e
  590. Committed revision 3.
  591. Fetching file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
  592. Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0
  593. Running host command
  594. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  595.  
  596. Traceback (most recent call last):
  597. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  598. exec line
  599. File "<string>", line 1, in <module>
  600. ImportError: No module named cov_core_init
  601.  
  602. Remainder of file ignored
  603. Shared repository (format: 2a)
  604. Location:
  605. shared repository: tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0
  606. Running host command /home/shared/src/buildstream: /usr/bin/bzr branch file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar /home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0/bar
  607. Running host command
  608. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  609.  
  610. Traceback (most recent call last):
  611. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  612. exec line
  613. File "<string>", line 1, in <module>
  614. ImportError: No module named cov_core_init
  615.  
  616. Remainder of file ignored
  617. bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
  618.  
  619. Traceback (most recent call last):
  620. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
  621. return the_callable(*args, **kwargs)
  622. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
  623. ret = run(*run_argv)
  624. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
  625. return self.run(**all_cmd_args)
  626. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
  627. return self._operation.run_simple(*args, **kwargs)
  628. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
  629. self.cleanups, self.func, *args, **kwargs)
  630. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  631. result = func(*args, **kwargs)
  632. File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
  633. source_branch=br_from)
  634. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
  635. create_tree_if_local=create_tree_if_local)
  636. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
  637. self.cleanups, self.func, self, *args, **kwargs)
  638. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  639. result = func(*args, **kwargs)
  640. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
  641. result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  642. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
  643. find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  644. File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
  645. result = unbound(self, *args, **kwargs)
  646. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
  647. find_ghosts=find_ghosts)
  648. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
  649. self.__fetch()
  650. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
  651. pb.update(gettext("Finding revisions"), 0, 2)
  652. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
  653. install()
  654. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
  655. _translations = install_translations(lang)
  656. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
  657. fallback=True)
  658. File "/usr/lib64/python2.7/gettext.py", line 556, in translation
  659. t = _translations.setdefault(key, class_(fp))
  660. File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
  661. self._parse(fp)
  662. File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
  663. self.plural = c2py(plural)
  664. File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
  665. result, nexttok = _parse(_tokenize(plural))
  666. File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
  667. nexttok = next(tokens)
  668. File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
  669. for mo in re.finditer(_token_pattern, plural):
  670. File "/usr/lib64/python2.7/re.py", line 190, in finditer
  671. return _compile(pattern, flags).finditer(string)
  672. File "/usr/lib64/python2.7/re.py", line 247, in _compile
  673. raise TypeError, "first argument must be string or compiled pattern"
  674. TypeError: first argument must be string or compiled pattern
  675.  
  676. bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
  677. fedora-24-Twenty_Four)
  678. arguments: ['/usr/bin/bzr', 'branch',
  679. 'file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar', '/
  680. home/shared/src/buildstream/tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri
  681. 0/bar']
  682. plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
  683. launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
  684. po_merge[2.6.0], weave_fmt[2.6.0]
  685. encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
  686.  
  687. *** Bazaar has encountered an internal error. This probably indicates a
  688. bug in Bazaar. You can help us fix it by filing a bug report at
  689. https://bugs.launchpad.net/bzr/+filebug
  690. including this traceback and a description of the problem.
  691. Fetching file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
  692. ____________________________________ test_stage _____________________________________
  693.  
  694. tmpdir = local('/home/shared/src/buildstream/tmp/test_stage0')
  695. datafiles = local('/home/shared/src/buildstream/tmp/test_stage0')
  696.  
  697. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
  698. def test_stage(tmpdir, datafiles):
  699. # Pretty long setup
  700. setup = BzrSetup(datafiles, 'target.bst', tmpdir)
  701. repodir = os.path.join(str(datafiles), 'foo')
  702. branchdir = os.path.join(repodir, 'bar')
  703. setup.bzr_initrepo(repodir)
  704. setup.bzr_init(branchdir)
  705. setup.bzr_commit(branchdir, 'b')
  706. setup.bzr_commit(branchdir, 'c/d')
  707. setup.bzr_commit(branchdir, 'c/e')
  708.  
  709. > setup.source.fetch()
  710.  
  711. tests/sources/bzr.py:158:
  712. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  713. buildstream/plugins/sources/bzr.py:105: in fetch
  714. self._ensure_mirror()
  715. buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
  716. fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
  717. buildstream/plugin.py:399: in call
  718. exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
  719. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  720.  
  721. self = <pluginbase._internalspace._spc9cb3b59112952199fc86811287bd46b.bzr.BzrSource object at 0x7fe9adb00cf8>
  722. collect_stdout = False
  723. fail = 'Failed to branch from file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar to /home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar'
  724. popenargs = (['/usr/bin/bzr', 'branch', 'file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar', '/home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar'],)
  725. kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
  726. output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
  727. kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adb146a8>
  728. suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adb14620>
  729. resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adb14510>
  730. output = None, _ = None, exit_code = 4
  731.  
  732. def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
  733.  
  734. if 'stdout' in kwargs or 'stderr' in kwargs:
  735. raise ValueError('May not override destination output')
  736.  
  737. with self._output_file() as output_file:
  738. kwargs['stdout'] = output_file
  739. kwargs['stderr'] = output_file
  740. kwargs['start_new_session'] = True
  741. if collect_stdout:
  742. kwargs['stdout'] = subprocess.PIPE
  743.  
  744. self.__note_command(output_file, *popenargs, **kwargs)
  745.  
  746. # Handle termination, suspend and resume
  747. def kill_proc():
  748. if process:
  749. # FIXME: This is a brutal but reliable approach
  750. #
  751. # Other variations I've tried which try SIGTERM first
  752. # and then wait for child processes to exit gracefully
  753. # have not reliably cleaned up process trees and have
  754. # left orphaned git or ssh processes alive.
  755. #
  756. # This cleans up the subprocesses reliably but may
  757. # cause side effects such as possibly leaving stale
  758. # locks behind. Hopefully this should not be an issue
  759. # as long as any child processes only interact with
  760. # the temp directories which we control and cleanup
  761. # ourselves.
  762. #
  763. utils._kill_process_tree(process.pid)
  764.  
  765. def suspend_proc():
  766. if process:
  767. group_id = os.getpgid(process.pid)
  768. os.killpg(group_id, signal.SIGSTOP)
  769.  
  770. def resume_proc():
  771. if process:
  772. group_id = os.getpgid(process.pid)
  773. os.killpg(group_id, signal.SIGCONT)
  774.  
  775. with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
  776. process = subprocess.Popen(*popenargs, **kwargs)
  777. output, _ = process.communicate()
  778. exit_code = process.poll()
  779.  
  780. if fail and exit_code:
  781. > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
  782. E buildstream.exceptions.PluginError: bzr source at target.bst [line 4 column 2]: Failed to branch from file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar to /home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar
  783.  
  784. buildstream/plugin.py:546: PluginError
  785. ------------------------------- Captured stdout call --------------------------------
  786. Host bzr is /usr/bin/bzr
  787. Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_stage0/foo
  788. Running host command
  789. Shared repository with trees (format: 2a)
  790. Location:
  791. shared repository: tmp/test_stage0/foo
  792. Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_stage0/foo/bar
  793. Running host command
  794. Created a repository tree (format: 2a)
  795. Using shared repository: /home/shared/src/buildstream/tmp/test_stage0/foo/
  796. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add b
  797. Running host command
  798. adding b
  799. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file b"
  800. Running host command
  801. Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
  802. added b
  803. Committed revision 1.
  804. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add c/d
  805. Running host command
  806. adding c
  807. adding c/d
  808. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file c/d"
  809. Running host command
  810. Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
  811. added c
  812. added c/d
  813. Committed revision 2.
  814. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add c/e
  815. Running host command
  816. adding c/e
  817. Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file c/e"
  818. Running host command
  819. Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
  820. added c/e
  821. Committed revision 3.
  822. Fetching file:////home/shared/src/buildstream/tmp/test_stage0/foo
  823. Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk
  824. Running host command
  825. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  826.  
  827. Traceback (most recent call last):
  828. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  829. exec line
  830. File "<string>", line 1, in <module>
  831. ImportError: No module named cov_core_init
  832.  
  833. Remainder of file ignored
  834. Shared repository (format: 2a)
  835. Location:
  836. shared repository: tmp/test_stage0/sources/bzr/tmprb9q6xnk
  837. Running host command /home/shared/src/buildstream: /usr/bin/bzr branch file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar /home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar
  838. Running host command
  839. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  840.  
  841. Traceback (most recent call last):
  842. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  843. exec line
  844. File "<string>", line 1, in <module>
  845. ImportError: No module named cov_core_init
  846.  
  847. Remainder of file ignored
  848. bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
  849.  
  850. Traceback (most recent call last):
  851. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
  852. return the_callable(*args, **kwargs)
  853. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
  854. ret = run(*run_argv)
  855. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
  856. return self.run(**all_cmd_args)
  857. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
  858. return self._operation.run_simple(*args, **kwargs)
  859. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
  860. self.cleanups, self.func, *args, **kwargs)
  861. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  862. result = func(*args, **kwargs)
  863. File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
  864. source_branch=br_from)
  865. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
  866. create_tree_if_local=create_tree_if_local)
  867. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
  868. self.cleanups, self.func, self, *args, **kwargs)
  869. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  870. result = func(*args, **kwargs)
  871. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
  872. result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  873. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
  874. find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  875. File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
  876. result = unbound(self, *args, **kwargs)
  877. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
  878. find_ghosts=find_ghosts)
  879. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
  880. self.__fetch()
  881. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
  882. pb.update(gettext("Finding revisions"), 0, 2)
  883. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
  884. install()
  885. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
  886. _translations = install_translations(lang)
  887. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
  888. fallback=True)
  889. File "/usr/lib64/python2.7/gettext.py", line 556, in translation
  890. t = _translations.setdefault(key, class_(fp))
  891. File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
  892. self._parse(fp)
  893. File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
  894. self.plural = c2py(plural)
  895. File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
  896. result, nexttok = _parse(_tokenize(plural))
  897. File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
  898. nexttok = next(tokens)
  899. File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
  900. for mo in re.finditer(_token_pattern, plural):
  901. File "/usr/lib64/python2.7/re.py", line 190, in finditer
  902. return _compile(pattern, flags).finditer(string)
  903. File "/usr/lib64/python2.7/re.py", line 247, in _compile
  904. raise TypeError, "first argument must be string or compiled pattern"
  905. TypeError: first argument must be string or compiled pattern
  906.  
  907. bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
  908. fedora-24-Twenty_Four)
  909. arguments: ['/usr/bin/bzr', 'branch',
  910. 'file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar', '/home/sha
  911. red/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar']
  912. plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
  913. launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
  914. po_merge[2.6.0], weave_fmt[2.6.0]
  915. encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
  916.  
  917. *** Bazaar has encountered an internal error. This probably indicates a
  918. bug in Bazaar. You can help us fix it by filing a bug report at
  919. https://bugs.launchpad.net/bzr/+filebug
  920. including this traceback and a description of the problem.
  921. Fetching file:////home/shared/src/buildstream/tmp/test_stage0/foo
  922. ____________________________________ test_track _____________________________________
  923.  
  924. tmpdir = local('/home/shared/src/buildstream/tmp/test_track0')
  925. datafiles = local('/home/shared/src/buildstream/tmp/test_track0')
  926.  
  927. @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
  928. def test_track(tmpdir, datafiles):
  929. # Pretty long setup
  930. setup = BzrSetup(datafiles, 'target-bad-ref.bst', tmpdir)
  931. repodir = os.path.join(str(datafiles), 'foo')
  932. branchdir = os.path.join(repodir, 'bar')
  933. setup.bzr_initrepo(repodir)
  934. setup.bzr_init(branchdir)
  935. setup.bzr_commit(branchdir, 'b')
  936. setup.bzr_commit(branchdir, 'c/d')
  937. setup.bzr_commit(branchdir, 'c/e')
  938.  
  939. > generated_ref = setup.source.track()
  940.  
  941. tests/sources/bzr.py:181:
  942. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  943. buildstream/plugins/sources/bzr.py:91: in track
  944. self._ensure_mirror()
  945. buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
  946. fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
  947. buildstream/plugin.py:399: in call
  948. exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
  949. _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
  950.  
  951. self = <pluginbase._internalspace._sp0d3904f544893e1bdd0534be753a6c68.bzr.BzrSource object at 0x7fe9adb20b38>
  952. collect_stdout = False
  953. fail = 'Failed to branch from file:////home/shared/src/buildstream/tmp/test_track0/foo/bar to /home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar'
  954. popenargs = (['/usr/bin/bzr', 'branch', 'file:////home/shared/src/buildstream/tmp/test_track0/foo/bar', '/home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar'],)
  955. kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
  956. output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
  957. kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adb3ad90>
  958. suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adb3ad08>
  959. resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adb3abf8>
  960. output = None, _ = None, exit_code = 4
  961.  
  962. def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
  963.  
  964. if 'stdout' in kwargs or 'stderr' in kwargs:
  965. raise ValueError('May not override destination output')
  966.  
  967. with self._output_file() as output_file:
  968. kwargs['stdout'] = output_file
  969. kwargs['stderr'] = output_file
  970. kwargs['start_new_session'] = True
  971. if collect_stdout:
  972. kwargs['stdout'] = subprocess.PIPE
  973.  
  974. self.__note_command(output_file, *popenargs, **kwargs)
  975.  
  976. # Handle termination, suspend and resume
  977. def kill_proc():
  978. if process:
  979. # FIXME: This is a brutal but reliable approach
  980. #
  981. # Other variations I've tried which try SIGTERM first
  982. # and then wait for child processes to exit gracefully
  983. # have not reliably cleaned up process trees and have
  984. # left orphaned git or ssh processes alive.
  985. #
  986. # This cleans up the subprocesses reliably but may
  987. # cause side effects such as possibly leaving stale
  988. # locks behind. Hopefully this should not be an issue
  989. # as long as any child processes only interact with
  990. # the temp directories which we control and cleanup
  991. # ourselves.
  992. #
  993. utils._kill_process_tree(process.pid)
  994.  
  995. def suspend_proc():
  996. if process:
  997. group_id = os.getpgid(process.pid)
  998. os.killpg(group_id, signal.SIGSTOP)
  999.  
  1000. def resume_proc():
  1001. if process:
  1002. group_id = os.getpgid(process.pid)
  1003. os.killpg(group_id, signal.SIGCONT)
  1004.  
  1005. with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
  1006. process = subprocess.Popen(*popenargs, **kwargs)
  1007. output, _ = process.communicate()
  1008. exit_code = process.poll()
  1009.  
  1010. if fail and exit_code:
  1011. > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
  1012. E buildstream.exceptions.PluginError: bzr source at target-bad-ref.bst [line 4 column 2]: Failed to branch from file:////home/shared/src/buildstream/tmp/test_track0/foo/bar to /home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar
  1013.  
  1014. buildstream/plugin.py:546: PluginError
  1015. ------------------------------- Captured stdout call --------------------------------
  1016. Host bzr is /usr/bin/bzr
  1017. Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_track0/foo
  1018. Running host command
  1019. Shared repository with trees (format: 2a)
  1020. Location:
  1021. shared repository: tmp/test_track0/foo
  1022. Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_track0/foo/bar
  1023. Running host command
  1024. Created a repository tree (format: 2a)
  1025. Using shared repository: /home/shared/src/buildstream/tmp/test_track0/foo/
  1026. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add b
  1027. Running host command
  1028. adding b
  1029. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file b"
  1030. Running host command
  1031. Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
  1032. added b
  1033. Committed revision 1.
  1034. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add c/d
  1035. Running host command
  1036. adding c
  1037. adding c/d
  1038. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file c/d"
  1039. Running host command
  1040. Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
  1041. added c
  1042. added c/d
  1043. Committed revision 2.
  1044. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add c/e
  1045. Running host command
  1046. adding c/e
  1047. Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file c/e"
  1048. Running host command
  1049. Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
  1050. added c/e
  1051. Committed revision 3.
  1052. Tracking file:////home/shared/src/buildstream/tmp/test_track0/foo
  1053. Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd
  1054. Running host command
  1055. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  1056.  
  1057. Traceback (most recent call last):
  1058. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  1059. exec line
  1060. File "<string>", line 1, in <module>
  1061. ImportError: No module named cov_core_init
  1062.  
  1063. Remainder of file ignored
  1064. Shared repository (format: 2a)
  1065. Location:
  1066. shared repository: tmp/test_track0/sources/bzr/tmpo9c0fckd
  1067. Running host command /home/shared/src/buildstream: /usr/bin/bzr branch file:////home/shared/src/buildstream/tmp/test_track0/foo/bar /home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar
  1068. Running host command
  1069. Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
  1070.  
  1071. Traceback (most recent call last):
  1072. File "/usr/lib64/python2.7/site.py", line 152, in addpackage
  1073. exec line
  1074. File "<string>", line 1, in <module>
  1075. ImportError: No module named cov_core_init
  1076.  
  1077. Remainder of file ignored
  1078. bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
  1079.  
  1080. Traceback (most recent call last):
  1081. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
  1082. return the_callable(*args, **kwargs)
  1083. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
  1084. ret = run(*run_argv)
  1085. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
  1086. return self.run(**all_cmd_args)
  1087. File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
  1088. return self._operation.run_simple(*args, **kwargs)
  1089. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
  1090. self.cleanups, self.func, *args, **kwargs)
  1091. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  1092. result = func(*args, **kwargs)
  1093. File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
  1094. source_branch=br_from)
  1095. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
  1096. create_tree_if_local=create_tree_if_local)
  1097. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
  1098. self.cleanups, self.func, self, *args, **kwargs)
  1099. File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
  1100. result = func(*args, **kwargs)
  1101. File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
  1102. result_repo.fetch(source_repository, fetch_spec=fetch_spec)
  1103. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
  1104. find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  1105. File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
  1106. result = unbound(self, *args, **kwargs)
  1107. File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
  1108. find_ghosts=find_ghosts)
  1109. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
  1110. self.__fetch()
  1111. File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
  1112. pb.update(gettext("Finding revisions"), 0, 2)
  1113. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
  1114. install()
  1115. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
  1116. _translations = install_translations(lang)
  1117. File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
  1118. fallback=True)
  1119. File "/usr/lib64/python2.7/gettext.py", line 556, in translation
  1120. t = _translations.setdefault(key, class_(fp))
  1121. File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
  1122. self._parse(fp)
  1123. File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
  1124. self.plural = c2py(plural)
  1125. File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
  1126. result, nexttok = _parse(_tokenize(plural))
  1127. File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
  1128. nexttok = next(tokens)
  1129. File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
  1130. for mo in re.finditer(_token_pattern, plural):
  1131. File "/usr/lib64/python2.7/re.py", line 190, in finditer
  1132. return _compile(pattern, flags).finditer(string)
  1133. File "/usr/lib64/python2.7/re.py", line 247, in _compile
  1134. raise TypeError, "first argument must be string or compiled pattern"
  1135. TypeError: first argument must be string or compiled pattern
  1136.  
  1137. bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
  1138. fedora-24-Twenty_Four)
  1139. arguments: ['/usr/bin/bzr', 'branch',
  1140. 'file:////home/shared/src/buildstream/tmp/test_track0/foo/bar', '/home/sha
  1141. red/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar']
  1142. plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
  1143. launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
  1144. po_merge[2.6.0], weave_fmt[2.6.0]
  1145. encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
  1146.  
  1147. *** Bazaar has encountered an internal error. This probably indicates a
  1148. bug in Bazaar. You can help us fix it by filing a bug report at
  1149. https://bugs.launchpad.net/bzr/+filebug
  1150. including this traceback and a description of the problem.
  1151. Tracking file:////home/shared/src/buildstream/tmp/test_track0/foo
Advertisement
Add Comment
Please, Sign In to add comment