| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Now that 'bst track' is obsolete, change guidance to refer to the
replacement 'bst source track' instead.
|
|
|
|
|
| |
Follow up of last commit which uses exclusive locking to
protect bzr operations instead.
|
|
|
|
| |
This patch by itself fixes #868
|
|
|
|
|
|
| |
The python netrc module will raise OSError in the case
that HOME is not set, this was discovered while running
tests under tox.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a `_GitSourceBase` class to act as the base class for deriving
source plugins that work with Git. The first user of this base class is
the `git` source plugin that's in core at the moment.
The contents of this base class is almost identical to the existing `GitSource`
class. The two notable differences are:
- the private methods now have leading underscores, as some were missing
it originally
- the name of the class
Note that we are exposing a private member here as we expect it to move to a
separate package soon. See the following discussion for more details:
https://gitlab.com/BuildStream/buildstream/issues/739#note_124819869
Fixes #739.
|
|
|
|
|
|
|
|
|
| |
When using aliases there are multiple remotes used in the cache
repository. When fetching, tags are not updated if the were previously
fetched from a different remote. Commits that not in a branch and only
tagged do not get fetched if the tag is not fetched.
Fixes #812
|
|
|
|
|
|
|
|
|
|
| |
Now that we have Source.validate_cache(), this is a better place to emmit
the ref-not-in-track warning, since it will be emmitted at the earliest
opportunity and not only at Source.stage() or Source.init_workspace().
This also allows us to remove the `self.tracked` local state, and cleanup
some convoluted calling paths, removing some unnecessary parameters from
the usual codepaths and making the plugin overall more readable.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Unlisted submodule warning
Now the git plugin will issue a configurable warning if a submodule
exists and is used (checking out the submodule is not disabled),
but is not specified in the source configuration.
o Invalid submodule warning
Now the git source plugin will issue a warning if the configuration
specified a submodule which does not exist in the underlying git repository.
As a side effect, this patch also changes the flow control of the git
plugin such that submodules which are explicitly set to not be
checked out, are also not fetched but instead ignored completely.
|
|
|
|
|
| |
Change 'INCONSISTENT_SUBMODULE' for 'WARN_INCONSISTENT_SUBMODULE' to
make things a bit more readable and comprehensive.
|
|
|
|
|
|
|
|
|
|
| |
Fixes the configurable warning part of this to properly link
to the project.conf documentation describing what configurable
warnings actually are.
Also fix the plugin raise the actual configurable warning which
it advertizes that it raises; which is 'inconsistent-submodule',
not 'inconsistent-submodules'.
|
|
|
|
|
|
| |
This also ensures it is exposed via the main buildstream __init__.py
file, fixes the imports of CoreWarnings, and adjusts the documentation
links to point to the right place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
shallow repository
Instead of tag information being fetched which can change with time,
they are tracked and saved in the projects.refs/.bst. Then we re-tag
automatically the closest tag so that `git describe` works and is
reproducible.
This new feature is opt-in with the new `track-tags` configuration,
and must be used to fix modules which are broken by our new policy
of omitting the `.git/` repository when staging git sources.
This fixes issue #487
|
|
|
|
| |
See #783
|
|
|
|
| |
Fixes #723.
|
| |
|
|
|
|
|
| |
This uses move_atomic insteand of the manual os.rename and manual error
checking and throws a SourceError for consistency with other modules.
|
|
|
|
|
|
|
|
| |
Moving atomically a file/directory can be tricky since different
errors might be raised for the same underlying problem.
Having a utility function to reduce this discrepancies will help
in ensuring we have correct behavior
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to the documentation
(https://www.unix.com/man-page/POSIX/3posix/rename/), when the directory
already is there, either EEXIST or ENOTEMPTY could be thrown.
Previously only ENOTEMPTY was checked.
Done:
- Separated the move into its own function
- Check for both errors
- Create unit tests for it, covering most test cases
|
|
|
|
|
|
|
|
| |
In some virtual environments, we might not have the binary with the
exact python version, which would lead the current pip plugin to
fail to find a working pip version.
This adds "python" at the start of the list of valid python versions
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of redundantly documenting "directory" configuration option in
each source plugin, refer to the built-in functionality documentation of
the Source class.
* source.py: Add anchor for built-in functionality.
* sources/plugins/*.py: Remove directory config option, and add reference to
Source's built-in functionality.
Fixes #713.
|
|
|
|
|
|
|
| |
The `assert_ref_in_track()` method's return value was never used so
rationalise it to never return a value.
Signed-off-by: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
|
| |
|
|
|
|
|
| |
Remove two uses of ExitStack that aren't necessary and make the code
a little harder to follow.
|
|
|
|
|
| |
Fix most instances of 'effect' being used as a verb instead of a noun.
Skipped generated instance in doc/source/conf.py.
|
|
|
|
|
|
|
|
| |
Since python 3.3, collections has been moved to collections.abc module.
For backwards compatibility, they continue to be visible in this module through Python 3.7.
Subsequently, they will be removed entirely.
See https://docs.python.org/3/library/collections.html
|
| |
|
|
|
|
| |
This will take care of silencing the status messages while checking submodules.
|
|
|
|
| |
Use `git describe` to prefix `ref` with closest tag, if available.
|
|
|
|
|
|
|
|
|
|
|
| |
Add a helper function assert_ref_in_track to git.py GitMirror()
which is used when staging & initing the source workspace. It
checks the element's ref exists in the track (branch/tag) if it
has been specified, raising a warning if necessary. The warning makes
use of the warning token 'REF_NOT_IN_TRACK' from the configurable
CoreWarnings. If the element has been tracked with bst, it is assumed
that the value of ref exists in the track as it was generated from it
& as such is not asserted.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Source must now mention whether the marked or translated
URL is "primary" or not. Even when a Source may have multiple
URLs, the auxilliary URLs are derived from the primary one, not
only is this true for git, but it is mandated by our tracking
API which assumes there is a primary URL.
This adjusts the `git` source and the test `fetch_source.py` source
to behave properly and advertize it's primary URL properly.
This is a part of #620
|
|
|
|
|
| |
This was displaying the aliased URL which is pretty useless,
use the translated URL for the timed activity.
|
| |
|
|
|
|
|
|
|
|
|
| |
Raise a error at configure time if the track and ref properties are
not present in the sources.
This is to address https://gitlab.com/BuildStream/buildstream/issues/471
that documented unhelpful behaviour when tracking git sources. However
the issue was also identified in ostree.
|
|
|
|
|
|
|
|
|
|
|
| |
Ostree mirrors were not sharing the same local repository, so it was
impossible the request refs from the right local repository when data
was fetched from a mirror rather than upstream.
Instead of having several repository with one remote each, we now
have one repository with several remotes.
This fixes #538.
|
|
|
|
|
|
|
|
|
|
|
| |
`pip` source plugin can stage python packages that are either specified
directly in the element definition or picked up from `requirements.txt`
from previous sources. In order to support the latter use-case
(which is also the primary motivation for this plugin), this plugin
requires access to previous sources and hence is an example of a
Source Transform source.
Also, bump `BST_FORMAT_VERSION` as this patch adds a new core plugin.
|
|
|
|
| |
This follows the implementation of configurable warnings.
|
|
|
|
|
|
|
| |
We now delay refreshing submodules until we have a clone, that is after
we have fetched the main fetcher.
Fixes #537
|
|
|
|
|
| |
Staging could end-up with file with different rights depending on the
umask. The extracted files need to get their access rights fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of copying metadata on files staged by local, we manually set
mode to 0755 or 0644 depending on whether user execution was enabled
on source file.
This makes file modes deterministic independently on the way source
was distributed.
Non-deterministic mode copying all metadata can still be enabled by
disable 'deterministic' Boolean configuration on the plugin.
Fixes #527.
|
|
|
|
|
| |
This is to address https://gitlab.com/BuildStream/buildstream/issues/471 that
documented unhelpfull behavour when tracking git sources.
|
|
|
|
|
|
|
|
|
|
| |
Add an optional flag to make files executable after having downloaded them.
Instead of leaving the permissioning of downloaded file in remote.py up
to the user's umask; expressly set permissions to 0644 or 0755 if
executable.
Bump format version to 13.
|
| |
|
| |
|
|
|
|
|
|
| |
The autotools example had to be copied over inside of the junction
example, as referring to a path outside of the project directory is
now disallowed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use os.rename() to rename the cloned temporary repository into
place in the source cache, and issue a STATUS message when discarding
a duplicate clone, in the case where the same repository is cloned
twice in parallel.
The problem with using shutil.move() is that it will create the source
directory in a subdirectory of the destination when the destination
exists, so it's behavior depends on whether the destination exists.
This shutil.move() behavior has so far hidden the race condition
where a duplicate repo is created in a subdirectory, as you need
to have three concurrent downloads of the same repo in order to
trigger the error.
This fixes issue #503
|
|
|
|
|
|
|
|
|
|
|
|
| |
When implementing fetching from mirrors, I encountered some problems
with the git source:
1. The mirror URL was using translate_url()'s output, so if a different
alias was used, then fetching from the mirror would go to a different
directory, and be inaccessible.
2. After fixing that, fetching was unable to pull from a URL other than
the one used at repository creation, meaning it wouldn't actually
pull from the mirror.
|
|
|
|
|
|
|
| |
This fixes:
* Bzr repositories pulling from the branch they were created with.
* Bzr's _ensure_mirror() not actually checking that it successfully
mirrored the ref.
|
|
|
|
|
| |
The git plugin will now make use of the fail_temporarily parameter
to Plugin.call(), allowing failures to trigger a retry.
|
|
|
|
| |
This follows the change in 67ecd97a05279a3b7570ad59f05bf0a5973ef04c.
|