Transactions¶
| Author: | Chris Warrick <chris@chriswarrick.com> |
|---|---|
| Copyright: | © 2011-2023, Chris Warrick. |
| License: | BSD (see /LICENSE or Appendix B.) |
| Date: | 2023-01-30 |
| Version: | 4.3.2 |
New in version 4.1.0.
To install built packages, PKGBUILDer uses transactions. A transaction stores:
- package names (as requested by user), used for the validation step
- package file names, moved to pacman cache and installed through
pacman -U - signature file names, moved to pacman cache
- options for running the transaction
- a reference to the transaction file name (if any;
.txfiles are autosaved when status changes occur)
Package installation transactions.
New in version 4.1.0.
| Copyright: | © 2011-2023, Chris Warrick. |
|---|---|
| License: | BSD (see /LICENSE). |
-
pkgbuilder.transaction.generate_filename(absolute=True)[source]¶ Generate a filename for the transaction.
-
class
pkgbuilder.transaction.Transaction(pkgnames, pkgpaths, sigpaths, asdeps=True, uopt='', filename=None, delete=False, status=None, pacmanreturn=-1, invalid=-1)[source]¶ A package transaction.
-
exitcode¶ Provide the most appropriate exit code.
-
classmethod
fromjson(jsondata)[source]¶ Create a transaction from JSON data.
The following fields exist:
__PBTX__— PKGBUILDer versionpkgnames— names of packages to installpkgpaths— paths to packages to installsigpaths— paths to attached signature filesasdeps— whether or not this is a dependency installuopt— special (local) options topacman -Ustatus— status code of the transactionpacmanreturn— pacman return codeinvalid— number of invalid packages
-
install(sudo_tested=False, quiet=False)[source]¶ Install packages through
pacman -U.Parameters: - sudo_tested (bool) – if sudo was tested (password prompt)
- quiet (bool) – suppress messages
Returns: pacman return code
Return type: int
-
move(sudo_tested=False, quiet=False)[source]¶ Move package and signature files to pacman cache.
Parameters: - sudo_tested (bool) – if sudo was tested (password prompt)
- quiet (bool) – suppress messages
Returns: 0 on success, +mv return, -failed files
Return type: int
-
pacman_pkgpaths¶ Return package paths, augmented for pacman.
-