summaryrefslogtreecommitdiff
path: root/buildstream/_ostree.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove OSTree artifact cacheJürg Billeter2018-07-171-321/+0
| | | | | | No longer used. Fixes #134, #138, #148, #217, #268, #276, #443, #460.
* Remove shebangs from python filesGökçen Nurlu2018-06-191-1/+0
| | | | Fixes #424
* _ostree.py: Introduce _list_all_refs() and list_artifacts()Tristan Maat2018-06-071-0/+44
| | | | | The unused list_remote_refs() function has also been removed as part of this commit.
* _ostree.py: Reintroduce remove()Tristan Maat2018-06-071-0/+36
|
* _ostree.py: Remove unused function list_remote_refs()Jürg Billeter2018-05-111-20/+0
|
* _ostree.py: Mention the remote URL when we fail to fetch remote refsJim MacArthur2018-04-091-1/+2
|
* _ostree.py: Add diff_dirs functionTristan Maat2018-03-271-0/+167
|
* pylint - dealt with redefined-outer-name and redefined-built in warningsJames Ennis2018-03-141-9/+9
|
* pylint - dealt with import warningsJames Ennis2018-03-141-2/+5
|
* pylint - disabled no-member, bad-exception-context and ↵James Ennis2018-03-141-0/+4
| | | | catching-non-exception warnings
* _ostree.py: Use list of refs as commit parameterJürg Billeter2018-02-271-10/+6
|
* _ostree.py: Disable OSTree's minimum disk space check in our repossam/disable-ostree-free-space-checkSam Thursfield2018-02-221-0/+7
| | | | | | | | | | | | | | | | This interacts badly with our builds, usually if the check does fire it's at the point that we are trying to commit a completed build (which may have taken a long time to complete) into the cache. Even though there might be enough space available to store the build, the error causes BuildStream to consider it "failed" and forces the user to start again. This aims to fix https://gitlab.com/BuildStream/buildstream/issues/216 although there is some evidence that it does not completely do so. BuildStream currently has no minimum disk space check, and no way to automatically clean up the cache. There is an open issue for this: https://gitlab.com/BuildStream/buildstream/issues/135
* Add support for multiple remote cachesSam Thursfield2018-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This extends the 'artifacts' configuration block such that a list of `url` mappings can be given instead of a single entry. For example: artifacts: - url: http://example.com/artifacts1 - url: ssh://ostree@example.com/artifacts2 The OSTreeCache class is updated to set up multiple remotes and query remote refs from all of them. There are no automated tests for this yet. Empty URLs ('') now raise an exception. They cause breakages internally if we allow them through, and they can only occur if the user or our tests are misconfiguring things somehow. We report failure to fetch from the cache by printing a message to stderr for now. This is because BuildStream's actual logging functionality can't be used during frontend init -- see issue #168.
* Exceptions refactoringTristan Van Berkom2017-12-291-2/+3
| | | | | | | | | | | | | | | Outline of changes to exceptions: o Now BstError base class has a `domain` and `reason` member, reason members are optional. o All derived error classes now specify their `domain` o For LoadError, LoadErrorReason defines the error's `reason` o Now the scheduler `job` class takes care of sending the error reason and domain back to the main process where the last exception which caused a child task to fail can be discretely stored.
* _ostree.py: Avoid raising GLib.Error from configure_remote()Sam Thursfield2017-12-121-6/+9
| | | | | | | | | | This call can fail (if we pass an invalid remote name, for example) so we should wrap the GLib.Error with OSTreeException. In the case of GLib.Error this is especially important as GLib.Error can't be pickled and so such exceptions disappear completely when we try to propagate them back from multiprocessing subprocesses. See <https://bugzilla.gnome.org/show_bug.cgi?id=791265>.
* Remove unused importsGökçen Nurlu2017-12-071-3/+0
|
* _ostree.py: Fix string formatting in fetch()Jürg Billeter2017-11-201-1/+2
| | | | | | | | | New-style formatting does not implicitly convert from float to int. Add explicit conversion to fix the following error: ValueError: Unknown format code 'd' for object of type 'float' Fixes: 3b17762a ("Switch old-style string formattings to new...")
* Switch old-style string formattings to new '.format()'Gökçen Nurlu2017-11-171-1/+2
|
* Refactoring: Renamed _BstError -> BstErrorTristan Van Berkom2017-11-061-2/+2
| | | | | | Base class for exceptions is now a part of the already private _exceptions module Also moved PipelineError from _pipeline -> _exceptions module
* Refactoring: Move exceptions module to be privateTristan Van Berkom2017-11-061-1/+1
| | | | Hide all of buildstream's internal exceptions from the API surface.
* _ostree.py: Fix error handling to handle GLib.ErrorTristan Van Berkom2017-10-151-5/+1
|
* Ensure that artifact file permissions are set in the right orderTristan Maat2017-10-131-0/+6
|
* _ostree.py: Removed remove()Tristan Van Berkom2017-09-081-23/+0
| | | | | | | | The remove() API is not used anywhere, it was previously used by ArtifactCache.remove() which itself was unused. If we need it in the future, it will be right here in the history.
* _ostree.py: Add list_remote_refs()Jürg Billeter2017-07-201-0/+19
|
* _ostree.py: Add set_ref()Jürg Billeter2017-07-141-0/+22
|
* _ostree.py: Support branches in commit()Jürg Billeter2017-07-141-1/+6
|
* _ostree.py: Removed push() APITristan Van Berkom2017-07-101-63/+0
| | | | We're going to do this a bit differently.
* _ostree.py: Implement push with `ostree-push` and removed fetch_ssh() methodTristan Van Berkom2017-07-091-33/+41
| | | | | | Pushing is done with ostree-push, and fetching is done with regular _ostree.fetch() codepath only, which will support http or local directory pulls.
* _ostree.py: Added mountdir option to ostree push/pull apisTristan Van Berkom2017-07-031-3/+7
| | | | So that we dont dirty the CWD
* _ostree.py: Call ostree shell scripts with SIGTERM handling enabled.Tristan Van Berkom2017-07-031-0/+2
|
* _ostree.py: Add remove functionJürg Billeter2017-06-271-0/+23
|
* _ostree.py: Support local artifact sharingJürg Billeter2017-06-271-10/+15
|
* _ostree.py: Add SSH artifact fetch supportJürg Billeter2017-06-271-0/+22
|
* _ostree.py: Add SSH artifact push supportJürg Billeter2017-06-271-0/+25
|
* _ostree.py: Support multiple remotesJürg Billeter2017-06-271-10/+12
|
* _ostree.py: Restore the setting of everything to root ownershipTristan Van Berkom2017-06-121-7/+6
| | | | | This should eventually change with a fuse layer that cooperates with ostree and fakes root permissions.
* _ostree.py: Changes to repository modes.Tristan Van Berkom2017-04-051-9/+24
| | | | | | | | | | | | | | | | We use ostree primarily for the artifact cache and also for the ostree source plugin, for the artifact cache, we want "bare user" mode repository. Changes are that: o We no longer encode files as uid/gid root, because it requires "user mode" option at checkout time o We no longer use "user mode" option when checking out the artifacts (but we still need to use it for the ostree source). This is all because checking out with "user mode" not only drops the ownership bits on the checked out files, but it _also_ munges the permission bits, we need the file permission bits to be preserved.
* _ostree.py: Make internal OSTreeError derive from _BstErrorTristan Van Berkom2017-03-101-1/+2
| | | | This makes sure they are propagated correctly from child processes.
* _ostree.py: Fixed _ostree.exists() implementation.Tristan Van Berkom2017-01-191-4/+20
| | | | | | | | It's not enough to check if one can resolve the ref, that only means that the ref is known and valid in the metadata. One needs to check with OSTree.Repo.has_object() to know if a resolved commit object exists in the local ostree cache.
* _ostree.py: Adding ostree module for handling ostree interactions.Tristan Van Berkom2017-01-161-0/+273
We share some code this way and also have the option of replacing the implementation for a shell based one instead of a gi bindings based implementation (which would allow us to depend on older versions of ostree). Note we use repo.remote_change() API instead of repo.remote_add(), this allows to use a create-if-not-exists flag for configuring remotes.