Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ______________________________ test_consistency_cached ______________________________
- tmpdir = local('/home/shared/src/buildstream/tmp/test_consistency_cached0')
- datafiles = local('/home/shared/src/buildstream/tmp/test_consistency_cached0')
- @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
- def test_consistency_cached(tmpdir, datafiles):
- setup = BzrSetup(datafiles, 'target.bst', tmpdir)
- repodir = os.path.join(str(datafiles), 'foo')
- branchdir = os.path.join(repodir, 'bar')
- setup.bzr_initrepo(repodir)
- setup.bzr_init(branchdir)
- setup.bzr_commit(branchdir, 'b')
- setup.bzr_commit(branchdir, 'c/d')
- setup.bzr_commit(branchdir, 'c/e')
- > setup.source.fetch()
- tests/sources/bzr.py:91:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- buildstream/plugins/sources/bzr.py:105: in fetch
- self._ensure_mirror()
- buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
- fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
- buildstream/plugin.py:399: in call
- exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pluginbase._internalspace._sp09fa344939790b76de3db52c1b7015de.bzr.BzrSource object at 0x7fe9adb9b908>
- collect_stdout = False
- 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'
- 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'],)
- kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
- output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
- kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adbc0f28>
- suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adbc0ea0>
- resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adbc0620>
- output = None, _ = None, exit_code = 4
- def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
- if 'stdout' in kwargs or 'stderr' in kwargs:
- raise ValueError('May not override destination output')
- with self._output_file() as output_file:
- kwargs['stdout'] = output_file
- kwargs['stderr'] = output_file
- kwargs['start_new_session'] = True
- if collect_stdout:
- kwargs['stdout'] = subprocess.PIPE
- self.__note_command(output_file, *popenargs, **kwargs)
- # Handle termination, suspend and resume
- def kill_proc():
- if process:
- # FIXME: This is a brutal but reliable approach
- #
- # Other variations I've tried which try SIGTERM first
- # and then wait for child processes to exit gracefully
- # have not reliably cleaned up process trees and have
- # left orphaned git or ssh processes alive.
- #
- # This cleans up the subprocesses reliably but may
- # cause side effects such as possibly leaving stale
- # locks behind. Hopefully this should not be an issue
- # as long as any child processes only interact with
- # the temp directories which we control and cleanup
- # ourselves.
- #
- utils._kill_process_tree(process.pid)
- def suspend_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGSTOP)
- def resume_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGCONT)
- with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
- process = subprocess.Popen(*popenargs, **kwargs)
- output, _ = process.communicate()
- exit_code = process.poll()
- if fail and exit_code:
- > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
- 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
- buildstream/plugin.py:546: PluginError
- ------------------------------- Captured stdout call --------------------------------
- Host bzr is /usr/bin/bzr
- Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_consistency_cached0/foo
- Running host command
- Shared repository with trees (format: 2a)
- Location:
- shared repository: tmp/test_consistency_cached0/foo
- Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar
- Running host command
- Created a repository tree (format: 2a)
- Using shared repository: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add b
- Running host command
- adding b
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file b"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
- added b
- Committed revision 1.
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add c/d
- Running host command
- adding c
- adding c/d
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file c/d"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
- added c
- added c/d
- Committed revision 2.
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr add c/e
- Running host command
- adding c/e
- Running host command /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar: bzr commit --message="Add file c/e"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_consistency_cached0/foo/bar/
- added c/e
- Committed revision 3.
- Fetching file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- Shared repository (format: 2a)
- Location:
- shared repository: tmp/test_consistency_cached0/sources/bzr/tmp61ebxm5h
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
- return the_callable(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
- ret = run(*run_argv)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
- return self.run(**all_cmd_args)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
- return self._operation.run_simple(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
- self.cleanups, self.func, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
- source_branch=br_from)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
- create_tree_if_local=create_tree_if_local)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
- self.cleanups, self.func, self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
- result_repo.fetch(source_repository, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
- find_ghosts=find_ghosts, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
- result = unbound(self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
- find_ghosts=find_ghosts)
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
- self.__fetch()
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
- pb.update(gettext("Finding revisions"), 0, 2)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
- install()
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
- _translations = install_translations(lang)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
- fallback=True)
- File "/usr/lib64/python2.7/gettext.py", line 556, in translation
- t = _translations.setdefault(key, class_(fp))
- File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
- self._parse(fp)
- File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
- self.plural = c2py(plural)
- File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
- result, nexttok = _parse(_tokenize(plural))
- File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
- nexttok = next(tokens)
- File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
- for mo in re.finditer(_token_pattern, plural):
- File "/usr/lib64/python2.7/re.py", line 190, in finditer
- return _compile(pattern, flags).finditer(string)
- File "/usr/lib64/python2.7/re.py", line 247, in _compile
- raise TypeError, "first argument must be string or compiled pattern"
- TypeError: first argument must be string or compiled pattern
- bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
- fedora-24-Twenty_Four)
- arguments: ['/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']
- plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
- launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
- po_merge[2.6.0], weave_fmt[2.6.0]
- encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
- *** Bazaar has encountered an internal error. This probably indicates a
- bug in Bazaar. You can help us fix it by filing a bug report at
- https://bugs.launchpad.net/bzr/+filebug
- including this traceback and a description of the problem.
- Fetching file:////home/shared/src/buildstream/tmp/test_consistency_cached0/foo
- ____________________________________ test_fetch _____________________________________
- tmpdir = local('/home/shared/src/buildstream/tmp/test_fetch0')
- datafiles = local('/home/shared/src/buildstream/tmp/test_fetch0')
- @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
- def test_fetch(tmpdir, datafiles):
- # Pretty long setup
- setup = BzrSetup(datafiles, 'target.bst', tmpdir)
- repodir = os.path.join(str(datafiles), 'foo')
- branchdir = os.path.join(repodir, 'bar')
- setup.bzr_initrepo(repodir)
- setup.bzr_init(branchdir)
- setup.bzr_commit(branchdir, 'b')
- setup.bzr_commit(branchdir, 'c/d')
- setup.bzr_commit(branchdir, 'c/e')
- # Fetch the branch
- > setup.source.fetch()
- tests/sources/bzr.py:119:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- buildstream/plugins/sources/bzr.py:105: in fetch
- self._ensure_mirror()
- buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
- fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
- buildstream/plugin.py:399: in call
- exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pluginbase._internalspace._sp2c02ea1b8264fa0e887dc2c2baf4249d.bzr.BzrSource object at 0x7fe9af1eb668>
- collect_stdout = False
- 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'
- 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'],)
- kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
- output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
- kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9af1e2d90>
- suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adcb01e0>
- resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adcb0bf8>
- output = None, _ = None, exit_code = 4
- def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
- if 'stdout' in kwargs or 'stderr' in kwargs:
- raise ValueError('May not override destination output')
- with self._output_file() as output_file:
- kwargs['stdout'] = output_file
- kwargs['stderr'] = output_file
- kwargs['start_new_session'] = True
- if collect_stdout:
- kwargs['stdout'] = subprocess.PIPE
- self.__note_command(output_file, *popenargs, **kwargs)
- # Handle termination, suspend and resume
- def kill_proc():
- if process:
- # FIXME: This is a brutal but reliable approach
- #
- # Other variations I've tried which try SIGTERM first
- # and then wait for child processes to exit gracefully
- # have not reliably cleaned up process trees and have
- # left orphaned git or ssh processes alive.
- #
- # This cleans up the subprocesses reliably but may
- # cause side effects such as possibly leaving stale
- # locks behind. Hopefully this should not be an issue
- # as long as any child processes only interact with
- # the temp directories which we control and cleanup
- # ourselves.
- #
- utils._kill_process_tree(process.pid)
- def suspend_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGSTOP)
- def resume_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGCONT)
- with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
- process = subprocess.Popen(*popenargs, **kwargs)
- output, _ = process.communicate()
- exit_code = process.poll()
- if fail and exit_code:
- > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
- 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
- buildstream/plugin.py:546: PluginError
- ------------------------------- Captured stdout call --------------------------------
- Host bzr is /usr/bin/bzr
- Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_fetch0/foo
- Running host command
- Shared repository with trees (format: 2a)
- Location:
- shared repository: tmp/test_fetch0/foo
- Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_fetch0/foo/bar
- Running host command
- Created a repository tree (format: 2a)
- Using shared repository: /home/shared/src/buildstream/tmp/test_fetch0/foo/
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add b
- Running host command
- adding b
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file b"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
- added b
- Committed revision 1.
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add c/d
- Running host command
- adding c
- adding c/d
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file c/d"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
- added c
- added c/d
- Committed revision 2.
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr add c/e
- Running host command
- adding c/e
- Running host command /home/shared/src/buildstream/tmp/test_fetch0/foo/bar: bzr commit --message="Add file c/e"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_fetch0/foo/bar/
- added c/e
- Committed revision 3.
- Fetching file:////home/shared/src/buildstream/tmp/test_fetch0/foo
- Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- Shared repository (format: 2a)
- Location:
- shared repository: tmp/test_fetch0/sources/bzr/tmpqhxjhdd9
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
- return the_callable(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
- ret = run(*run_argv)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
- return self.run(**all_cmd_args)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
- return self._operation.run_simple(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
- self.cleanups, self.func, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
- source_branch=br_from)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
- create_tree_if_local=create_tree_if_local)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
- self.cleanups, self.func, self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
- result_repo.fetch(source_repository, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
- find_ghosts=find_ghosts, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
- result = unbound(self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
- find_ghosts=find_ghosts)
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
- self.__fetch()
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
- pb.update(gettext("Finding revisions"), 0, 2)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
- install()
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
- _translations = install_translations(lang)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
- fallback=True)
- File "/usr/lib64/python2.7/gettext.py", line 556, in translation
- t = _translations.setdefault(key, class_(fp))
- File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
- self._parse(fp)
- File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
- self.plural = c2py(plural)
- File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
- result, nexttok = _parse(_tokenize(plural))
- File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
- nexttok = next(tokens)
- File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
- for mo in re.finditer(_token_pattern, plural):
- File "/usr/lib64/python2.7/re.py", line 190, in finditer
- return _compile(pattern, flags).finditer(string)
- File "/usr/lib64/python2.7/re.py", line 247, in _compile
- raise TypeError, "first argument must be string or compiled pattern"
- TypeError: first argument must be string or compiled pattern
- bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
- fedora-24-Twenty_Four)
- arguments: ['/usr/bin/bzr', 'branch',
- 'file:////home/shared/src/buildstream/tmp/test_fetch0/foo/bar', '/home/sha
- red/src/buildstream/tmp/test_fetch0/sources/bzr/tmpqhxjhdd9/bar']
- plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
- launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
- po_merge[2.6.0], weave_fmt[2.6.0]
- encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
- *** Bazaar has encountered an internal error. This probably indicates a
- bug in Bazaar. You can help us fix it by filing a bug report at
- https://bugs.launchpad.net/bzr/+filebug
- including this traceback and a description of the problem.
- Fetching file:////home/shared/src/buildstream/tmp/test_fetch0/foo
- ________________________________ test_stage_bad_ref _________________________________
- tmpdir = local('/home/shared/src/buildstream/tmp/test_stage_bad_ref0')
- datafiles = local('/home/shared/src/buildstream/tmp/test_stage_bad_ref0')
- @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
- def test_stage_bad_ref(tmpdir, datafiles):
- # Pretty long setup
- setup = BzrSetup(datafiles, 'target-bad-ref.bst', tmpdir)
- repodir = os.path.join(str(datafiles), 'foo')
- branchdir = os.path.join(repodir, 'bar')
- setup.bzr_initrepo(repodir)
- setup.bzr_init(branchdir)
- setup.bzr_commit(branchdir, 'b')
- setup.bzr_commit(branchdir, 'c/d')
- setup.bzr_commit(branchdir, 'c/e')
- > setup.source.fetch()
- tests/sources/bzr.py:138:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- buildstream/plugins/sources/bzr.py:105: in fetch
- self._ensure_mirror()
- buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
- fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
- buildstream/plugin.py:399: in call
- exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pluginbase._internalspace._sp0ddaa1b9695d0977cb813d52e492fdc3.bzr.BzrSource object at 0x7fe9adba3e48>
- collect_stdout = False
- 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'
- 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'],)
- kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
- output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
- kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adbe4048>
- suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adbe4620>
- resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adbe40d0>
- output = None, _ = None, exit_code = 4
- def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
- if 'stdout' in kwargs or 'stderr' in kwargs:
- raise ValueError('May not override destination output')
- with self._output_file() as output_file:
- kwargs['stdout'] = output_file
- kwargs['stderr'] = output_file
- kwargs['start_new_session'] = True
- if collect_stdout:
- kwargs['stdout'] = subprocess.PIPE
- self.__note_command(output_file, *popenargs, **kwargs)
- # Handle termination, suspend and resume
- def kill_proc():
- if process:
- # FIXME: This is a brutal but reliable approach
- #
- # Other variations I've tried which try SIGTERM first
- # and then wait for child processes to exit gracefully
- # have not reliably cleaned up process trees and have
- # left orphaned git or ssh processes alive.
- #
- # This cleans up the subprocesses reliably but may
- # cause side effects such as possibly leaving stale
- # locks behind. Hopefully this should not be an issue
- # as long as any child processes only interact with
- # the temp directories which we control and cleanup
- # ourselves.
- #
- utils._kill_process_tree(process.pid)
- def suspend_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGSTOP)
- def resume_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGCONT)
- with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
- process = subprocess.Popen(*popenargs, **kwargs)
- output, _ = process.communicate()
- exit_code = process.poll()
- if fail and exit_code:
- > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
- 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
- buildstream/plugin.py:546: PluginError
- ------------------------------- Captured stdout call --------------------------------
- Host bzr is /usr/bin/bzr
- Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
- Running host command
- Shared repository with trees (format: 2a)
- Location:
- shared repository: tmp/test_stage_bad_ref0/foo
- Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar
- Running host command
- Created a repository tree (format: 2a)
- Using shared repository: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add b
- Running host command
- adding b
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file b"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
- added b
- Committed revision 1.
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add c/d
- Running host command
- adding c
- adding c/d
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file c/d"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
- added c
- added c/d
- Committed revision 2.
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr add c/e
- Running host command
- adding c/e
- Running host command /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar: bzr commit --message="Add file c/e"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo/bar/
- added c/e
- Committed revision 3.
- Fetching file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- Shared repository (format: 2a)
- Location:
- shared repository: tmp/test_stage_bad_ref0/sources/bzr/tmpvi_ypri0
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
- return the_callable(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
- ret = run(*run_argv)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
- return self.run(**all_cmd_args)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
- return self._operation.run_simple(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
- self.cleanups, self.func, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
- source_branch=br_from)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
- create_tree_if_local=create_tree_if_local)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
- self.cleanups, self.func, self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
- result_repo.fetch(source_repository, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
- find_ghosts=find_ghosts, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
- result = unbound(self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
- find_ghosts=find_ghosts)
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
- self.__fetch()
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
- pb.update(gettext("Finding revisions"), 0, 2)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
- install()
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
- _translations = install_translations(lang)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
- fallback=True)
- File "/usr/lib64/python2.7/gettext.py", line 556, in translation
- t = _translations.setdefault(key, class_(fp))
- File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
- self._parse(fp)
- File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
- self.plural = c2py(plural)
- File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
- result, nexttok = _parse(_tokenize(plural))
- File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
- nexttok = next(tokens)
- File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
- for mo in re.finditer(_token_pattern, plural):
- File "/usr/lib64/python2.7/re.py", line 190, in finditer
- return _compile(pattern, flags).finditer(string)
- File "/usr/lib64/python2.7/re.py", line 247, in _compile
- raise TypeError, "first argument must be string or compiled pattern"
- TypeError: first argument must be string or compiled pattern
- bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
- fedora-24-Twenty_Four)
- arguments: ['/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_ypri
- 0/bar']
- plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
- launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
- po_merge[2.6.0], weave_fmt[2.6.0]
- encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
- *** Bazaar has encountered an internal error. This probably indicates a
- bug in Bazaar. You can help us fix it by filing a bug report at
- https://bugs.launchpad.net/bzr/+filebug
- including this traceback and a description of the problem.
- Fetching file:////home/shared/src/buildstream/tmp/test_stage_bad_ref0/foo
- ____________________________________ test_stage _____________________________________
- tmpdir = local('/home/shared/src/buildstream/tmp/test_stage0')
- datafiles = local('/home/shared/src/buildstream/tmp/test_stage0')
- @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
- def test_stage(tmpdir, datafiles):
- # Pretty long setup
- setup = BzrSetup(datafiles, 'target.bst', tmpdir)
- repodir = os.path.join(str(datafiles), 'foo')
- branchdir = os.path.join(repodir, 'bar')
- setup.bzr_initrepo(repodir)
- setup.bzr_init(branchdir)
- setup.bzr_commit(branchdir, 'b')
- setup.bzr_commit(branchdir, 'c/d')
- setup.bzr_commit(branchdir, 'c/e')
- > setup.source.fetch()
- tests/sources/bzr.py:158:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- buildstream/plugins/sources/bzr.py:105: in fetch
- self._ensure_mirror()
- buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
- fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
- buildstream/plugin.py:399: in call
- exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pluginbase._internalspace._spc9cb3b59112952199fc86811287bd46b.bzr.BzrSource object at 0x7fe9adb00cf8>
- collect_stdout = False
- 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'
- 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'],)
- kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
- output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
- kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adb146a8>
- suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adb14620>
- resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adb14510>
- output = None, _ = None, exit_code = 4
- def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
- if 'stdout' in kwargs or 'stderr' in kwargs:
- raise ValueError('May not override destination output')
- with self._output_file() as output_file:
- kwargs['stdout'] = output_file
- kwargs['stderr'] = output_file
- kwargs['start_new_session'] = True
- if collect_stdout:
- kwargs['stdout'] = subprocess.PIPE
- self.__note_command(output_file, *popenargs, **kwargs)
- # Handle termination, suspend and resume
- def kill_proc():
- if process:
- # FIXME: This is a brutal but reliable approach
- #
- # Other variations I've tried which try SIGTERM first
- # and then wait for child processes to exit gracefully
- # have not reliably cleaned up process trees and have
- # left orphaned git or ssh processes alive.
- #
- # This cleans up the subprocesses reliably but may
- # cause side effects such as possibly leaving stale
- # locks behind. Hopefully this should not be an issue
- # as long as any child processes only interact with
- # the temp directories which we control and cleanup
- # ourselves.
- #
- utils._kill_process_tree(process.pid)
- def suspend_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGSTOP)
- def resume_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGCONT)
- with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
- process = subprocess.Popen(*popenargs, **kwargs)
- output, _ = process.communicate()
- exit_code = process.poll()
- if fail and exit_code:
- > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
- 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
- buildstream/plugin.py:546: PluginError
- ------------------------------- Captured stdout call --------------------------------
- Host bzr is /usr/bin/bzr
- Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_stage0/foo
- Running host command
- Shared repository with trees (format: 2a)
- Location:
- shared repository: tmp/test_stage0/foo
- Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_stage0/foo/bar
- Running host command
- Created a repository tree (format: 2a)
- Using shared repository: /home/shared/src/buildstream/tmp/test_stage0/foo/
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add b
- Running host command
- adding b
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file b"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
- added b
- Committed revision 1.
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add c/d
- Running host command
- adding c
- adding c/d
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file c/d"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
- added c
- added c/d
- Committed revision 2.
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr add c/e
- Running host command
- adding c/e
- Running host command /home/shared/src/buildstream/tmp/test_stage0/foo/bar: bzr commit --message="Add file c/e"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_stage0/foo/bar/
- added c/e
- Committed revision 3.
- Fetching file:////home/shared/src/buildstream/tmp/test_stage0/foo
- Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- Shared repository (format: 2a)
- Location:
- shared repository: tmp/test_stage0/sources/bzr/tmprb9q6xnk
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
- return the_callable(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
- ret = run(*run_argv)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
- return self.run(**all_cmd_args)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
- return self._operation.run_simple(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
- self.cleanups, self.func, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
- source_branch=br_from)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
- create_tree_if_local=create_tree_if_local)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
- self.cleanups, self.func, self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
- result_repo.fetch(source_repository, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
- find_ghosts=find_ghosts, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
- result = unbound(self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
- find_ghosts=find_ghosts)
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
- self.__fetch()
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
- pb.update(gettext("Finding revisions"), 0, 2)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
- install()
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
- _translations = install_translations(lang)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
- fallback=True)
- File "/usr/lib64/python2.7/gettext.py", line 556, in translation
- t = _translations.setdefault(key, class_(fp))
- File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
- self._parse(fp)
- File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
- self.plural = c2py(plural)
- File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
- result, nexttok = _parse(_tokenize(plural))
- File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
- nexttok = next(tokens)
- File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
- for mo in re.finditer(_token_pattern, plural):
- File "/usr/lib64/python2.7/re.py", line 190, in finditer
- return _compile(pattern, flags).finditer(string)
- File "/usr/lib64/python2.7/re.py", line 247, in _compile
- raise TypeError, "first argument must be string or compiled pattern"
- TypeError: first argument must be string or compiled pattern
- bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
- fedora-24-Twenty_Four)
- arguments: ['/usr/bin/bzr', 'branch',
- 'file:////home/shared/src/buildstream/tmp/test_stage0/foo/bar', '/home/sha
- red/src/buildstream/tmp/test_stage0/sources/bzr/tmprb9q6xnk/bar']
- plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
- launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
- po_merge[2.6.0], weave_fmt[2.6.0]
- encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
- *** Bazaar has encountered an internal error. This probably indicates a
- bug in Bazaar. You can help us fix it by filing a bug report at
- https://bugs.launchpad.net/bzr/+filebug
- including this traceback and a description of the problem.
- Fetching file:////home/shared/src/buildstream/tmp/test_stage0/foo
- ____________________________________ test_track _____________________________________
- tmpdir = local('/home/shared/src/buildstream/tmp/test_track0')
- datafiles = local('/home/shared/src/buildstream/tmp/test_track0')
- @pytest.mark.datafiles(os.path.join(DATA_DIR, 'fetch'))
- def test_track(tmpdir, datafiles):
- # Pretty long setup
- setup = BzrSetup(datafiles, 'target-bad-ref.bst', tmpdir)
- repodir = os.path.join(str(datafiles), 'foo')
- branchdir = os.path.join(repodir, 'bar')
- setup.bzr_initrepo(repodir)
- setup.bzr_init(branchdir)
- setup.bzr_commit(branchdir, 'b')
- setup.bzr_commit(branchdir, 'c/d')
- setup.bzr_commit(branchdir, 'c/e')
- > generated_ref = setup.source.track()
- tests/sources/bzr.py:181:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- buildstream/plugins/sources/bzr.py:91: in track
- self._ensure_mirror()
- buildstream/plugins/sources/bzr.py:195: in _ensure_mirror
- fail="Failed to branch from {} to {}".format(branch_url, branch_dir))
- buildstream/plugin.py:399: in call
- exit_code, _ = self.__call(*popenargs, fail=fail, **kwargs)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <pluginbase._internalspace._sp0d3904f544893e1bdd0534be753a6c68.bzr.BzrSource object at 0x7fe9adb20b38>
- collect_stdout = False
- 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'
- 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'],)
- kwargs = {'start_new_session': True, 'stderr': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>, 'stdout': <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>}
- output_file = <_pytest.capture.EncodedFile object at 0x7fe9b093cb00>
- kill_proc = <function Plugin.__call.<locals>.kill_proc at 0x7fe9adb3ad90>
- suspend_proc = <function Plugin.__call.<locals>.suspend_proc at 0x7fe9adb3ad08>
- resume_proc = <function Plugin.__call.<locals>.resume_proc at 0x7fe9adb3abf8>
- output = None, _ = None, exit_code = 4
- def __call(self, *popenargs, collect_stdout=False, fail=None, **kwargs):
- if 'stdout' in kwargs or 'stderr' in kwargs:
- raise ValueError('May not override destination output')
- with self._output_file() as output_file:
- kwargs['stdout'] = output_file
- kwargs['stderr'] = output_file
- kwargs['start_new_session'] = True
- if collect_stdout:
- kwargs['stdout'] = subprocess.PIPE
- self.__note_command(output_file, *popenargs, **kwargs)
- # Handle termination, suspend and resume
- def kill_proc():
- if process:
- # FIXME: This is a brutal but reliable approach
- #
- # Other variations I've tried which try SIGTERM first
- # and then wait for child processes to exit gracefully
- # have not reliably cleaned up process trees and have
- # left orphaned git or ssh processes alive.
- #
- # This cleans up the subprocesses reliably but may
- # cause side effects such as possibly leaving stale
- # locks behind. Hopefully this should not be an issue
- # as long as any child processes only interact with
- # the temp directories which we control and cleanup
- # ourselves.
- #
- utils._kill_process_tree(process.pid)
- def suspend_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGSTOP)
- def resume_proc():
- if process:
- group_id = os.getpgid(process.pid)
- os.killpg(group_id, signal.SIGCONT)
- with _signals.suspendable(suspend_proc, resume_proc), _signals.terminator(kill_proc):
- process = subprocess.Popen(*popenargs, **kwargs)
- output, _ = process.communicate()
- exit_code = process.poll()
- if fail and exit_code:
- > raise PluginError("{plugin}: {message}".format(plugin=self, message=fail))
- 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
- buildstream/plugin.py:546: PluginError
- ------------------------------- Captured stdout call --------------------------------
- Host bzr is /usr/bin/bzr
- Running host command /home/shared/src/buildstream: bzr init-repo /home/shared/src/buildstream/tmp/test_track0/foo
- Running host command
- Shared repository with trees (format: 2a)
- Location:
- shared repository: tmp/test_track0/foo
- Running host command /home/shared/src/buildstream: bzr init /home/shared/src/buildstream/tmp/test_track0/foo/bar
- Running host command
- Created a repository tree (format: 2a)
- Using shared repository: /home/shared/src/buildstream/tmp/test_track0/foo/
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add b
- Running host command
- adding b
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file b"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
- added b
- Committed revision 1.
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add c/d
- Running host command
- adding c
- adding c/d
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file c/d"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
- added c
- added c/d
- Committed revision 2.
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr add c/e
- Running host command
- adding c/e
- Running host command /home/shared/src/buildstream/tmp/test_track0/foo/bar: bzr commit --message="Add file c/e"
- Running host command
- Committing to: /home/shared/src/buildstream/tmp/test_track0/foo/bar/
- added c/e
- Committed revision 3.
- Tracking file:////home/shared/src/buildstream/tmp/test_track0/foo
- Running host command /home/shared/src/buildstream: /usr/bin/bzr init-repo --no-trees /home/shared/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- Shared repository (format: 2a)
- Location:
- shared repository: tmp/test_track0/sources/bzr/tmpo9c0fckd
- 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
- Running host command
- Error processing line 1 of /usr/lib64/python2.7/site-packages/init_cov_core.pth:
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site.py", line 152, in addpackage
- exec line
- File "<string>", line 1, in <module>
- ImportError: No module named cov_core_init
- Remainder of file ignored
- bzr: ERROR: exceptions.TypeError: first argument must be string or compiled pattern
- Traceback (most recent call last):
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 930, in exception_to_return_code
- return the_callable(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1121, in run_bzr
- ret = run(*run_argv)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 673, in run_argv_aliases
- return self.run(**all_cmd_args)
- File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 697, in run
- return self._operation.run_simple(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 136, in run_simple
- self.cleanups, self.func, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1507, in run
- source_branch=br_from)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 367, in sprout
- create_tree_if_local=create_tree_if_local)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 132, in run
- self.cleanups, self.func, self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
- result = func(*args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/bzrdir.py", line 417, in _sprout
- result_repo.fetch(source_repository, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 1268, in fetch
- find_ghosts=find_ghosts, fetch_spec=fetch_spec)
- File "/usr/lib64/python2.7/site-packages/bzrlib/decorators.py", line 218, in write_locked
- result = unbound(self, *args, **kwargs)
- File "/usr/lib64/python2.7/site-packages/bzrlib/vf_repository.py", line 2585, in fetch
- find_ghosts=find_ghosts)
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 77, in __init__
- self.__fetch()
- File "/usr/lib64/python2.7/site-packages/bzrlib/fetch.py", line 98, in __fetch
- pb.update(gettext("Finding revisions"), 0, 2)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 40, in gettext
- install()
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 92, in install
- _translations = install_translations(lang)
- File "/usr/lib64/python2.7/site-packages/bzrlib/i18n.py", line 114, in install_translations
- fallback=True)
- File "/usr/lib64/python2.7/gettext.py", line 556, in translation
- t = _translations.setdefault(key, class_(fp))
- File "/usr/lib64/python2.7/gettext.py", line 255, in __init__
- self._parse(fp)
- File "/usr/lib64/python2.7/gettext.py", line 393, in _parse
- self.plural = c2py(plural)
- File "/usr/lib64/python2.7/gettext.py", line 177, in c2py
- result, nexttok = _parse(_tokenize(plural))
- File "/usr/lib64/python2.7/gettext.py", line 114, in _parse
- nexttok = next(tokens)
- File "/usr/lib64/python2.7/gettext.py", line 85, in _tokenize
- for mo in re.finditer(_token_pattern, plural):
- File "/usr/lib64/python2.7/re.py", line 190, in finditer
- return _compile(pattern, flags).finditer(string)
- File "/usr/lib64/python2.7/re.py", line 247, in _compile
- raise TypeError, "first argument must be string or compiled pattern"
- TypeError: first argument must be string or compiled pattern
- bzr 2.6.0 on python 2.7.13 (Linux-4.10.17-100.fc24.x86_64-x86_64-with-
- fedora-24-Twenty_Four)
- arguments: ['/usr/bin/bzr', 'branch',
- 'file:////home/shared/src/buildstream/tmp/test_track0/foo/bar', '/home/sha
- red/src/buildstream/tmp/test_track0/sources/bzr/tmpo9c0fckd/bar']
- plugins: bash_completion[2.6.0], changelog_merge[2.6.0], grep[2.6.0],
- launchpad[2.6.0], netrc_credential_store[2.6.0], news_merge[2.6.0],
- po_merge[2.6.0], weave_fmt[2.6.0]
- encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
- *** Bazaar has encountered an internal error. This probably indicates a
- bug in Bazaar. You can help us fix it by filing a bug report at
- https://bugs.launchpad.net/bzr/+filebug
- including this traceback and a description of the problem.
- Tracking file:////home/shared/src/buildstream/tmp/test_track0/foo
Advertisement
Add Comment
Please, Sign In to add comment