mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-02 15:21:25 -07:00
Use custom rpm repo script for dnf testing (#32737)
* Use custom rpm repo script for dnf testing * Switch to a jinja2 test
This commit is contained in:
parent
0ddf092ae3
commit
3c1fb9b547
8 changed files with 790 additions and 626 deletions
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
import rpmfluff
|
||||
|
||||
|
||||
RPM = namedtuple('RPM', ['name', 'version', 'release', 'epoch'])
|
||||
|
||||
|
||||
SPECS = [
|
||||
RPM('foo', '1.0', '1', None),
|
||||
RPM('foo', '1.0', '2', '1'),
|
||||
RPM('foo', '1.1', '1', '1'),
|
||||
]
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
arch = sys.argv[1]
|
||||
except IndexError:
|
||||
arch = 'x86_64'
|
||||
|
||||
pkgs = []
|
||||
for spec in SPECS:
|
||||
pkg = rpmfluff.SimpleRpmBuild(spec.name, spec.version, spec.release, [arch])
|
||||
pkg.epoch = spec.epoch
|
||||
pkgs.append(pkg)
|
||||
|
||||
repo = rpmfluff.YumRepoBuild(pkgs)
|
||||
repo.make(arch)
|
||||
|
||||
for pkg in pkgs:
|
||||
pkg.clean()
|
||||
|
||||
print(repo.repoDir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Add table
Add a link
Reference in a new issue