
This commit enables patch remove in a Debian env. Patch remove command operates on the feed directory. It resets the feed ostree HEAD to the base commit of the patch being removed and then deletes all commits that belong to the patch. Test: sw-patch remove works as expected in Debian Story: 2009969 Task: 45327 Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com> Change-Id: If01ab1a1ab4e4e58ee1713cc622feb57481219b9
68 lines
1.1 KiB
Python
68 lines
1.1 KiB
Python
"""
|
|
Copyright (c) 2017-2022 Wind River Systems, Inc.
|
|
|
|
SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""
|
|
|
|
|
|
class PatchError(Exception):
|
|
"""Base class for patching exceptions."""
|
|
|
|
def __init__(self, message=None):
|
|
super(PatchError, self).__init__(message)
|
|
self.message = message
|
|
|
|
def __str__(self):
|
|
return self.message or ""
|
|
|
|
|
|
class MetadataFail(PatchError):
|
|
"""Metadata error."""
|
|
pass
|
|
|
|
|
|
class ContentFail(PatchError):
|
|
"""Content handling error."""
|
|
pass
|
|
|
|
|
|
class OSTreeTarFail(PatchError):
|
|
"""OSTree Tarball error."""
|
|
pass
|
|
|
|
|
|
class OSTreeCommandFail(PatchError):
|
|
"""OSTree Commands error."""
|
|
pass
|
|
|
|
|
|
class SemanticFail(PatchError):
|
|
"""Semantic check error."""
|
|
pass
|
|
|
|
|
|
class RepoFail(PatchError):
|
|
"""Repo error."""
|
|
pass
|
|
|
|
|
|
class PatchFail(PatchError):
|
|
"""General patching error."""
|
|
pass
|
|
|
|
|
|
class PatchValidationFailure(PatchError):
|
|
"""Patch validation error."""
|
|
pass
|
|
|
|
|
|
class PatchMismatchFailure(PatchError):
|
|
"""Patch validation error."""
|
|
pass
|
|
|
|
|
|
class PatchInvalidRequest(PatchError):
|
|
"""Invalid API request."""
|
|
pass
|