https://github.com/archlinux/pytest-pacman
A pytest plugin which provides helpers to create pacman's localdb and sync db's (read-only mirror)
https://github.com/archlinux/pytest-pacman
pacman pytest
Last synced: 7 months ago
JSON representation
A pytest plugin which provides helpers to create pacman's localdb and sync db's (read-only mirror)
- Host: GitHub
- URL: https://github.com/archlinux/pytest-pacman
- Owner: archlinux
- License: mit
- Created: 2024-02-10T17:46:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-10T17:58:49.000Z (almost 2 years ago)
- Last Synced: 2025-01-25T17:07:57.316Z (about 1 year ago)
- Topics: pacman, pytest
- Language: Python
- Homepage: https://gitlab.archlinux.org/archlinux/pytest-pacman
- Size: 38.1 KB
- Stars: 2
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pytest-pacman - pacman db pytest fixture
This is a pytest plugin which will generate a test pacman db. To be used in
pyalpm, archweb and arch-signoff for testing.
## Fixtures
* generate_syncdb
* generate_localdb
* generate_package
## Usage
Installing is as simple as e.g.
```
pip install pytest-pacman
```
## Pacman syncdb structure
Pacman syncdb databases are usually stored in '/var/lib/pacman/sync' as gzip'd
tar archives. The structure in the archive is as following:
```
$pkgname-$pkgver-$pkgrel/
$pkgname-$pkgver-$pkgrel/desc
$pkgname-$epoch:$pkgver-$pkgrel/
$pkgname-$epoch:$pkgver-$pkgrel/desc
```
The desc file is formatted as following:
```
%FILENAME%
$pkgname-$pkgver-$pkgrel-$arch.pkg.tar.$ext
%NAME%
$pkgname
%BASE%
$pkgbase
%VERSION%
$pkgver-$pkgrel
%DESC%
My awesome package
%CSIZE%
671256
%ISIZE%
3460513
%MD5SUM%
c9f6e74471bce4b07d0f54b75e65b27c
%SHA256SUM%
c5af2664d994671a61b5038c468e6b4dae5dde71785dd687216f67f28df956d3
%URL%
https://archlinux.org
%LICENSE%
BSD
%ARCH%
$arch
%BUILDDATE%
$epoch
%PACKAGER%
John Doe
%DEPENDS%
zlib
xz
%MAKEDEPENDS%
systemd
```