ahriman.core.gitremote package

Submodules

ahriman.core.gitremote.remote_pull module

class RemotePull(repository_id: RepositoryId, configuration: Configuration, section: str)

Bases: LazyLogging

fetch PKGBUILDs from remote repository and use them for following actions

architecture

repository architecture

Type:

str

remote_source

repository remote source (remote pull url and branch)

Type:

RemoteSource

repository_paths

repository paths instance

Type:

RepositoryPaths

default constructor

Parameters:
  • repository_id (RepositoryId) – repository unique identifier

  • configuration (Configuration) – configuration instance

  • section (str) – settings section name

package_copy(pkgbuild_path: Path) None

copy single PKGBUILD content to the repository tree

Parameters:

pkgbuild_path (Path) – path to PKGBUILD to copy

repo_clone() None

clone repository from remote source

repo_copy(clone_dir: Path) None

copy directories from cloned remote source to local cache

Parameters:

clone_dir (Path) – path to temporary cloned directory

run() None

run git pull action

Raises:

GitRemoteError – pull processing error

ahriman.core.gitremote.remote_pull_trigger module

class RemotePullTrigger(repository_id: RepositoryId, configuration: Configuration)

Bases: Trigger

trigger based on pulling PKGBUILDs before the actions

targets

git remote target list

Type:

list[str]

default constructor

Parameters:
classmethod configuration_sections(configuration: Configuration) list[str]

extract configuration sections from configuration

Parameters:

configuration (Configuration) – configuration instance

Returns:

read configuration sections belong to this trigger

Return type:

list[str]

on_start() None

trigger action which will be called at the start of the application

ahriman.core.gitremote.remote_push module

class RemotePush(database: SQLite, configuration: Configuration, section: str)

Bases: LazyLogging

sync PKGBUILDs to remote repository after actions

commit_author

optional commit author in form of git config

Type:

tuple[str, str] | None

database

database instance

Type:

SQLite

remote_source

repository remote source (remote pull url and branch)

Type:

RemoteSource

default constructor

Parameters:
  • database (SQLite) – database instance

  • configuration (Configuration) – configuration instance

  • section (str) – settings section name

package_update(package: Package, target_dir: Path) str

clone specified package and update its content in cloned PKGBUILD repository

Parameters:
  • package (Package) – built package to update pkgbuild repository

  • target_dir (Path) – path to the cloned PKGBUILD repository

Returns:

relative path to be added as new file

Return type:

str

packages_update(result: Result, target_dir: Path) Generator[str, None, None]

update all packages from the build result

Parameters:
  • result (Result) – build result

  • target_dir (Path) – path to the cloned PKGBUILD repository

Yields:

str – path to updated files

run(result: Result) None

run git pull action

Parameters:

result (Result) – build result

Raises:

GitRemoteError – push processing error

ahriman.core.gitremote.remote_push_trigger module

class RemotePushTrigger(repository_id: RepositoryId, configuration: Configuration)

Bases: Trigger

trigger for syncing PKGBUILDs to remote repository

targets

git remote target list

Type:

list[str]

default constructor

Parameters:
classmethod configuration_sections(configuration: Configuration) list[str]

extract configuration sections from configuration

Parameters:

configuration (Configuration) – configuration instance

Returns:

read configuration sections belong to this trigger

Return type:

list[str]

on_result(result: Result, packages: list[Package]) None

trigger action which will be called after build process with process result

Parameters:
  • result (Result) – build result

  • packages (list[Package]) – list of all available packages

Raises:

GitRemoteError – if database is not set in context

Module contents