Add non-checked base repo concept (#37)
All checks were successful
CI via Tox / tox (pull_request) Successful in 1m29s
AI Code Review / ai-review (pull_request_target) Successful in 15s

This adds a 'non-checked base repo' concept to address the ELN
scenario covered in #37. A 'non-checked base repo' is just like
a base repo, but it is not included in the `--check` arg when
generating the modified repoclosure. So it's always available to
the depsolver, and it is modified just like a regular base repo
(unlike a 'non-modified base repo'), but we don't actually check
for repoclosure issues in it.

This is intended to be used for the ELN buildroot repo. We need
it to be in scope for the depsolver so we do not get spurious
failures when a package under testing adds a dependency on
something that is only in the buildroot (this is fine if that
package is itself a buildroot-only package). But @yselkowitz
does not want us to fail when an update would *introduce* a new
dependency issue in a buildroot-only package, so we do not want
to run repoclosure on the buildroot repo.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2026-04-29 14:49:43 -07:00
commit c53ac8ac71
75 changed files with 278 additions and 115 deletions

View file

@ -9,12 +9,25 @@ two runs are compared. New failures should indicate problems introduced by the c
Also, some relevant checks are run on the checked repositories with reference to the modified base
repositories.
Optionally, additional base repositories can be specified which will not be modified, and
additional new repositories can be specified which will not be checked directly. The former is
intended for testing scenarios like stable Fedora releases, which have a frozen release repository
which is never modified, and an updates repository which is updated. The latter is intended for
multilib scenarios; it may be desirable to use such an additional repository for packages for
the multilib arch(es), if e.g. installability of these should not be tested directly.
Optionally, other types of repository can be specified:
* Additional base repositories which will not be modified or checked ("non-modified base repos")
* Additional base repositories which will be modified but not checked ("non-checked base repos")
* Additional new repositories can be specified which will not be checked directly
Non-modified base repos are intended for testing scenarios like stable Fedora releases, which have
a frozen release repository which is never modified, and an updates repository which is updated.
Non-checked base repos are intended for a scenario like Fedora ELN or CentOS Stream or RHEL, which
have more packages in their buildroot than their published repositories. As the packages being
tested may be destined for the buildroot, we must make the buildroot available for dependency
resolution and modify it, but we may not want to actually run a repoclosure check on it, if
repoclosure of the buildroot is not considered a current goal. We may only wish to check repoclosure
on the published repositories.
Additional new repositories are intended for multilib scenarios; it may be desirable to use such an
additional repository for packages for the multilib arch(es), if e.g. installability of these should
not be tested directly.
An alternative mode allows simply testing the consequences of *removing* a list of source packages
entirely; in this mode, in the second step, we exclude all binary packages built from the specified

View file

@ -100,13 +100,15 @@ def format_rc_errors(errors: list[DepTuple]) -> None:
print(f" {error[2]}")
def get_base_repoclosure(baserepos: Iterable[str], nmbaserepos: Iterable[str]) -> str:
"""Gets the reference repoclosure text. Both to-be-modified and
not-modified base repos are available to the solver, but only the
to-be-modified repos are checked.
def get_base_repoclosure(
baserepos: Iterable[str], ncbaserepos: Iterable[str], nmbaserepos: Iterable[str]
) -> str:
"""Gets the reference repoclosure text. Base repos, non-checked
base repos and non-modified base repos are available to the
solver, but only the base repos are checked.
"""
cmdargs = DNFARGS + ["repoclosure"]
for repo in list(baserepos) + list(nmbaserepos):
for repo in list(baserepos) + list(nmbaserepos) + list(ncbaserepos):
cmdargs.extend(["--repofrompath", f"{hash_repo(repo)},{repo}"])
cmdargs.append("--check")
# only check the repos that will be modified
@ -115,20 +117,22 @@ def get_base_repoclosure(baserepos: Iterable[str], nmbaserepos: Iterable[str]) -
def get_modified_and_new_repoclosure(
mrepos: Iterable[str],
nmrepos: list[str],
nrepos: list[str],
baserepos: list[str],
ncbaserepos: list[str],
nmbaserepos: list[str],
newrepos: list[str],
removes: Iterable[str],
) -> tuple[str, str]:
"""Runs repoclosure with new repo included and excludepkgs used
for modified base repos, and returns the modified repoclosure
text. Non-modified base repos, modified base repos after
modification, and the new repo are available to the solver; only
modified base repos are checked.
text. Non-modified base repos, modified base repos and non-checked
base repos after modification, and new repos are available to
the solver; only the base repos are checked in the "modified"
check and only the first new repo is checked in the "new" check.
"""
queryargs = DNFARGS + ["repoquery", "--queryformat", "%{source_name},%{full_nevra}\n"]
rcargs = DNFARGS + ["repoclosure"]
for mrepo in mrepos:
for mrepo in baserepos + ncbaserepos:
# figure out what to exclude
excludes = []
args = queryargs + ["--repofrompath", f"{hash_repo(mrepo)},{mrepo}"]
@ -150,19 +154,19 @@ def get_modified_and_new_repoclosure(
rcargs.extend(["--setopt", f"{hash_repo(mrepo)}.excludepkgs={','.join(excludes)}"])
# now add the non-modified base repos and new package repos
for repo in nmrepos + nrepos:
for repo in nmbaserepos + newrepos:
rcargs.extend(["--repofrompath", f"{hash_repo(repo)},{repo}"])
# finally, add the check arg
rcargs.append("--check")
rcargs.append(",".join([hash_repo(mrepo) for mrepo in mrepos]))
rcargs.append(",".join([hash_repo(baserepo) for baserepo in baserepos]))
# get the modified repoclosure
mod = SUBPCAPTURE(rcargs).stdout
new = ""
if nrepos:
# the first nrepo is the checked repo, only check that
rcargs[-1] = hash_repo(nrepos[0])
if newrepos:
# the first newrepo is the checked repo, only check that
rcargs[-1] = hash_repo(newrepos[0])
# get the new repoclosure
new = SUBPCAPTURE(rcargs).stdout
return (mod, new)
@ -271,6 +275,17 @@ def parse_args() -> argparse.Namespace:
"x86_64 package sets it should contain the matching i686 packages. It will be "
"available to the repoclosure check, but will be ignored by the installability check",
)
parser.add_argument(
"--ncbaserepos",
type=comma_url,
default="",
help="The URL(s) of non-checked base repositories to compare against (comma-separated). "
"These repositories *will* be modified as part of testing, but they will not be checked "
"for repoclosure. They should be repositories whose packages would be replaced with those "
"from the new package repo(s), and which we want to be available to the dependency solver "
"when checking the repoclosure of other repositories, but which we are for some reason not "
"interested in checking the repoclosure of - e.g. the buildroot for Fedora ELN",
)
parser.add_argument(
"--nmbaserepos",
type=comma_url,
@ -352,21 +367,22 @@ def main() -> None:
if f"--forcearch={args.arch}" not in DNFARGS:
DNFARGS.append(f"--forcearch={args.arch}")
if args.removes:
nrepos = []
newrepos = []
sources = args.removes
iut = "the specified source package removals"
else:
nrepos = [args.repo] + args.addrepos
newrepos = [args.repo] + args.addrepos
# find source package(s) of our tested repo(s)
# whether to include addrepos is arguable, but should usually be moot
sources = get_source_packages(nrepos)
sources = get_source_packages(newrepos)
iut = "the tested packages"
baserc = parse_repoclosure(get_base_repoclosure(args.baserepos, args.nmbaserepos))
baseraw = get_base_repoclosure(args.baserepos, args.ncbaserepos, args.nmbaserepos)
baserc = parse_repoclosure(baseraw)
# get the modified rpmclosure output
modraw, newraw = get_modified_and_new_repoclosure(
args.baserepos, args.nmbaserepos, nrepos, sources
args.baserepos, args.ncbaserepos, args.nmbaserepos, newrepos, sources
)
modrc = parse_repoclosure(modraw)
newrc = []

View file

@ -64,7 +64,7 @@ def test_get_base_repoclosure():
with open(f"{TESTDATA}/test_get_base_repoclosure.txt", "r", encoding="utf-8") as testfh:
expected = testfh.read()
expected = expected.replace("{HASH}", rmdepcheck.hash_repo(repo))
ret = rmdepcheck.get_base_repoclosure([repo], [])
ret = rmdepcheck.get_base_repoclosure([repo], [], [])
assert ret == expected
@ -78,7 +78,7 @@ def test_get_modified_and_new_repoclosure():
expectednew = testfh.read()
expectednew = expectednew.replace("{HASH}", rmdepcheck.hash_repo(nrepo))
ret = rmdepcheck.get_modified_and_new_repoclosure(
[brepo], [], [nrepo], ["aaa", "ccc", "eee", "fff", "ggg"]
[brepo], [], [], [nrepo], ["aaa", "ccc", "eee", "fff", "ggg"]
)
assert ret == (expectedmod, expectednew)
@ -95,7 +95,7 @@ def test_get_modified_and_new_repoclosure_commasafe():
rcmock.stdout = ""
with mock.patch("rmdepcheck.SUBPCAPTURE", side_effect=[qamock, rcmock]):
# this shouldn't raise an exception
rmdepcheck.get_modified_and_new_repoclosure(["file:///foo/bar"], [], [], ["ccc"])
rmdepcheck.get_modified_and_new_repoclosure(["file:///foo/bar"], [], [], [], ["ccc"])
def test_get_source_packages():
@ -257,6 +257,33 @@ def test_e2e_updates(capsys):
assert captured.out == exptext
def test_e2e_eln(capsys):
"""End-to-end test similar to Fedora ELN, with a smaller repo
as the base repo and a larger buildroot repo as a non-checked base
repo. The new repo contains a package that breaks the deps of one
package in the base repo and one package in the non-checked base
repo, and itself requires a package from the non-checked base
repo. We expect to see a failure for the broken base repo package,
but no failure for the broken non-checked base repo package or the
new package itself.
"""
sys.argv = [
"rmdepcheck.py",
"--ncbaserepos",
f"file://{REPOS}/elnroot",
f"file://{REPOS}/elnbase",
f"file://{REPOS}/elnnew",
]
with pytest.raises(SystemExit) as excinfo:
rmdepcheck.main()
assert excinfo.value.code == 1
captured = capsys.readouterr()
with open(f"{TESTDATA}/test_e2e_eln.txt", "r", encoding="utf-8") as fh:
exptext = fh.read()
exptext = exptext.replace("{REPOS}", REPOS)
assert captured.out == exptext
def test_e2e_removes(capsys):
"""End-to-end test of the alternate --removes mode."""
sys.argv = ["rmdepcheck.py", "--removes", f"file://{REPOS}/base", "aaa,eee"]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1774488262</revision>
<revision>1777498820</revision>
<data type="primary">
<checksum type="sha256">54942fbb3415a66f4ca49463d36439407c816b3eed8e30fc43016bd70ac9d456</checksum>
<open-checksum type="sha256">86802fea4fb3b2992f3acadd29e1419290552e9c0c6bc144866eb87148706907</open-checksum>
<location href="repodata/54942fbb3415a66f4ca49463d36439407c816b3eed8e30fc43016bd70ac9d456-primary.xml.zst"/>
<timestamp>1774488262</timestamp>
<size>1276</size>
<checksum type="sha256">6b696476761c56d8bceb3e8997d31ca6977aaf63901130fe94c708e7d0cf429d</checksum>
<open-checksum type="sha256">54c3435b6735114519dd995763d0a654a564872f34118ce620e7148d7488738e</open-checksum>
<location href="repodata/6b696476761c56d8bceb3e8997d31ca6977aaf63901130fe94c708e7d0cf429d-primary.xml.zst"/>
<timestamp>1777498820</timestamp>
<size>1281</size>
<open-size>10594</open-size>
</data>
<data type="filelists">
<checksum type="sha256">76928db153b3725bacd08e8ef992404e809d24c139488885cd076c79abf17b8c</checksum>
<open-checksum type="sha256">ff804b34b31f6873b4636dfc8e2eedf19f6522f4a35dcfa4fa9273493d20454d</open-checksum>
<location href="repodata/76928db153b3725bacd08e8ef992404e809d24c139488885cd076c79abf17b8c-filelists.xml.zst"/>
<timestamp>1774488262</timestamp>
<size>623</size>
<checksum type="sha256">1acaeb6689285db3bfe681d374748eed2bc7cd9c1af87b32a27819f776ecacb6</checksum>
<open-checksum type="sha256">05695974b3212a3e0a658e431c4c6eb1cf20b4346365b9a062c4469e7a85c6a1</open-checksum>
<location href="repodata/1acaeb6689285db3bfe681d374748eed2bc7cd9c1af87b32a27819f776ecacb6-filelists.xml.zst"/>
<timestamp>1777498820</timestamp>
<size>621</size>
<open-size>1722</open-size>
</data>
<data type="other">
<checksum type="sha256">a2cf9fe34266a8c53e47a781c8bd2f84a6ccfc3ee95369a4531451fc3eec4cc1</checksum>
<open-checksum type="sha256">02a27b080c28b2bfbe5438da214a1a95b6645eda2465d1a0f2cc58e774630964</open-checksum>
<location href="repodata/a2cf9fe34266a8c53e47a781c8bd2f84a6ccfc3ee95369a4531451fc3eec4cc1-other.xml.zst"/>
<timestamp>1774488262</timestamp>
<size>709</size>
<checksum type="sha256">6868a9258bc5b257d087b3f926cbdbc014866cac98e1c7047bb0de5c8f4e8b63</checksum>
<open-checksum type="sha256">29e4f16b3e7312bdeecc87f41baa5f8200df3793aaab472e131dcc6e010130b8</open-checksum>
<location href="repodata/6868a9258bc5b257d087b3f926cbdbc014866cac98e1c7047bb0de5c8f4e8b63-other.xml.zst"/>
<timestamp>1777498820</timestamp>
<size>710</size>
<open-size>2838</open-size>
</data>
</repomd>

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1777498823</revision>
<data type="primary">
<checksum type="sha256">f4ed4ad1632ef201cb823cb62f2408918097df27d66aaee819fc22ba37ab262c</checksum>
<open-checksum type="sha256">12c7b2df4b3e597c8a412e6b187f0379f9024b0c19db0a6a22615dd1b5b09962</open-checksum>
<location href="repodata/f4ed4ad1632ef201cb823cb62f2408918097df27d66aaee819fc22ba37ab262c-primary.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>699</size>
<open-size>2263</open-size>
</data>
<data type="filelists">
<checksum type="sha256">e66e2d334117944d094138fdc62fda05db2e252cd29aeffa765a71451a8856dc</checksum>
<open-checksum type="sha256">48d1e74e7b0cb3bf5286c6bf23c19000cb94afdf982c113b926688e51b100a36</open-checksum>
<location href="repodata/e66e2d334117944d094138fdc62fda05db2e252cd29aeffa765a71451a8856dc-filelists.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>279</size>
<open-size>445</open-size>
</data>
<data type="other">
<checksum type="sha256">6212147882b929cefe09ce147e26e1020b738656c9517eac9a52a058d7793a31</checksum>
<open-checksum type="sha256">c8b2793ecacedcdba8b304a308130a84ac2613447053514f1e0f040cf5220132</open-checksum>
<location href="repodata/6212147882b929cefe09ce147e26e1020b738656c9517eac9a52a058d7793a31-other.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>351</size>
<open-size>665</open-size>
</data>
</repomd>

Binary file not shown.

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1777498823</revision>
<data type="primary">
<checksum type="sha256">e1fb8cbc0efa75785de59ffca8a3de5dd3928ab2075891beabbdedf2a74608b0</checksum>
<open-checksum type="sha256">edfd3c129d9db24508a6dcd38765281f02cdf98609587ce9ccc3885cd226237f</open-checksum>
<location href="repodata/e1fb8cbc0efa75785de59ffca8a3de5dd3928ab2075891beabbdedf2a74608b0-primary.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>629</size>
<open-size>1265</open-size>
</data>
<data type="filelists">
<checksum type="sha256">029e08c67f723be4b217594371bb7f9f223cb866b934d857d9bddb4234e9c942</checksum>
<open-checksum type="sha256">8519cd36f5dcc309402aa70eb2463eebd439a134f410ee2b052afe51dddb6265</open-checksum>
<location href="repodata/029e08c67f723be4b217594371bb7f9f223cb866b934d857d9bddb4234e9c942-filelists.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>226</size>
<open-size>285</open-size>
</data>
<data type="other">
<checksum type="sha256">c083429e71ea2c4bea418159abf7debbf79dd70f21731b1b4acc5195658e7890</checksum>
<open-checksum type="sha256">bd83ff93ecd4e37aa7dc35a1dfc61a5c8d560c14eea47fe443c86ca184853289</open-checksum>
<location href="repodata/c083429e71ea2c4bea418159abf7debbf79dd70f21731b1b4acc5195658e7890-other.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>305</size>
<open-size>393</open-size>
</data>
</repomd>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1777498823</revision>
<data type="primary">
<checksum type="sha256">5548c16c17c9999a288149e4c028529fea3de98d310a6f6b9aaf5f9913c7ac7b</checksum>
<open-checksum type="sha256">a1a05ef98f83ff3a3d3f9916306cd31ca7a948599849ec779a95d6f7e8a40214</open-checksum>
<location href="repodata/5548c16c17c9999a288149e4c028529fea3de98d310a6f6b9aaf5f9913c7ac7b-primary.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>830</size>
<open-size>4359</open-size>
</data>
<data type="filelists">
<checksum type="sha256">081516c8122bf9e116d0314902b635ef595c121ba2e7a9d8d448de7e636c948b</checksum>
<open-checksum type="sha256">d25e63e1db6cb9a61a2a98c0ad43abda59e7826aa7551738079e02b16d75a912</open-checksum>
<location href="repodata/081516c8122bf9e116d0314902b635ef595c121ba2e7a9d8d448de7e636c948b-filelists.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>366</size>
<open-size>765</open-size>
</data>
<data type="other">
<checksum type="sha256">117a29ab84c4728bf8da3b0b942c823be18f4d190e710ed797182925cfad70ba</checksum>
<open-checksum type="sha256">a68bfd0ad8980ca8b2f26e4498cba5d9eb2c30885ca8fd1cac84f655687fe63f</open-checksum>
<location href="repodata/117a29ab84c4728bf8da3b0b942c823be18f4d190e710ed797182925cfad70ba-other.xml.zst"/>
<timestamp>1777498823</timestamp>
<size>445</size>
<open-size>1209</open-size>
</data>
</repomd>

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1774488264</revision>
<revision>1777498823</revision>
<data type="primary">
<checksum type="sha256">69a3730a283b85a4b3cff7d04bfde3b2b234f0607ebc17319d7a8d143a8e066e</checksum>
<open-checksum type="sha256">e1e2ffd2fb1ee76f87b70750d00ca5677a252b397ab6c2389137a0c33e7b359f</open-checksum>
<location href="repodata/69a3730a283b85a4b3cff7d04bfde3b2b234f0607ebc17319d7a8d143a8e066e-primary.xml.zst"/>
<timestamp>1774488264</timestamp>
<timestamp>1777498823</timestamp>
<size>123</size>
<open-size>167</open-size>
</data>
@ -13,7 +13,7 @@
<checksum type="sha256">9b07d97dc6ececed89aac0650b67bfb292647fe9fbaca48f629465be5f53f82b</checksum>
<open-checksum type="sha256">bf9808b81cb2dbc54b4b8e35adc584ddcaa73bd81f7088d73bf7dbbada961310</open-checksum>
<location href="repodata/9b07d97dc6ececed89aac0650b67bfb292647fe9fbaca48f629465be5f53f82b-filelists.xml.zst"/>
<timestamp>1774488264</timestamp>
<timestamp>1777498823</timestamp>
<size>118</size>
<open-size>125</open-size>
</data>
@ -21,7 +21,7 @@
<checksum type="sha256">6b37cc67608a24beaa81e1191d218f2ffd6b1191dceb5c100bac2e66249d518d</checksum>
<open-checksum type="sha256">e0ed5e0054194df036cf09c1a911e15bf2a4e7f26f2a788b6f47d53e80717ccc</open-checksum>
<location href="repodata/6b37cc67608a24beaa81e1191d218f2ffd6b1191dceb5c100bac2e66249d518d-other.xml.zst"/>
<timestamp>1774488264</timestamp>
<timestamp>1777498823</timestamp>
<size>117</size>
<open-size>121</open-size>
</data>

View file

@ -86,27 +86,52 @@ newddd = rpmfluff.SimpleRpmBuild("ddd", "3.0", "1", ["x86_64"])
newddd.add_requires("ccc = 3.0")
unfixed = (newddd,)
for pkg in allbase + allupd + allnew + unfixed:
# ELN scenario packages. The "shipped repo" will contain only
# epa and epc. The "buildroot repo" will contain all four
epa = rpmfluff.SimpleRpmBuild("epa", "1.0", "1", ["x86_64"])
epb = rpmfluff.SimpleRpmBuild("epb", "1.0", "1", ["x86_64"])
epc = rpmfluff.SimpleRpmBuild("epc", "1.0", "1", ["x86_64"])
epd = rpmfluff.SimpleRpmBuild("epd", "1.0", "1", ["x86_64"])
alleln = (epa, epb, epc, epd)
shipeln = (epa, epc)
newepc = rpmfluff.SimpleRpmBuild("epc", "2.0", "1", ["x86_64"])
# these will both be broken by the new epc, but only epa is in the
# "shipped repo", epb is not
epa.add_requires("epc = 1.0")
epb.add_requires("epc = 1.0")
# this requirement can only be satisfied in the buildroot repo, we
# should not report that as an error
newepc.add_requires("epd = 1.0")
for pkg in allbase + allupd + allnew + unfixed + alleln + (newepc,):
pkg.addVendor("Fedora Project")
pkg.addPackager("Fedora Project")
base = rpmfluff.yumrepobuild.YumRepoBuild(allbase)
basedir = "base"
base.repoDir = "base"
new = rpmfluff.yumrepobuild.YumRepoBuild(allnew)
newdir = "new"
new.repoDir = "new"
unfixed = rpmfluff.yumrepobuild.YumRepoBuild(unfixed)
unfixeddir = "unfixed"
unfixed.repoDir = "unfixed"
updates = rpmfluff.yumrepobuild.YumRepoBuild(allupd)
upddir = "updates"
updates.repoDir = "updates"
elnbase = rpmfluff.yumrepobuild.YumRepoBuild(shipeln)
elnbase.repoDir = "elnbase"
elnroot = rpmfluff.yumrepobuild.YumRepoBuild(alleln)
elnroot.repoDir = "elnroot"
elnnew = rpmfluff.yumrepobuild.YumRepoBuild((newepc,))
elnnew.repoDir = "elnnew"
empty = rpmfluff.yumrepobuild.YumRepoBuild([])
empdir = "empty"
empty.repoDir = "empty"
alldirs = [r.repoDir for r in (base, new, unfixed, updates, elnbase, elnroot, elnnew, empty)]
def cleanup(repos=True):
"""Delete all the repos."""
dirs = [pkgaaa.get_base_dir()]
if repos:
dirs.extend((basedir, upddir, newdir, unfixeddir, empdir))
dirs.extend(alldirs)
for _dir in dirs:
if os.path.isdir(_dir):
shutil.rmtree(_dir)
@ -114,20 +139,15 @@ def cleanup(repos=True):
cleanup()
os.mkdir(basedir)
os.mkdir(newdir)
os.mkdir(unfixeddir)
os.mkdir(upddir)
os.mkdir(empdir)
base.repoDir = basedir
new.repoDir = newdir
unfixed.repoDir = unfixeddir
updates.repoDir = upddir
empty.repoDir = empdir
for _dir in alldirs:
os.mkdir(_dir)
base.make("x86_64", "i686")
new.make("x86_64")
unfixed.make("x86_64")
updates.make("x86_64")
elnbase.make("x86_64")
elnroot.make("x86_64")
elnnew.make("x86_64")
empty.make()
cleanup(repos=False)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1774488263</revision>
<revision>1777498821</revision>
<data type="primary">
<checksum type="sha256">59ad48408d84fd97cfe3c80b9036d46baef2a55fc421f419203cd01aa926f1d7</checksum>
<open-checksum type="sha256">6e0ac7ee5b882344bcce9e3e4dab9efadea7a86b57b78925da47f015694ef7cf</open-checksum>
<location href="repodata/59ad48408d84fd97cfe3c80b9036d46baef2a55fc421f419203cd01aa926f1d7-primary.xml.zst"/>
<timestamp>1774488263</timestamp>
<size>1066</size>
<checksum type="sha256">182e2add8c3d3069057852ed9944419578aa72b31eb9233b18b6ce68fa86ba05</checksum>
<open-checksum type="sha256">4ffb8600b26cbe3f260b10f2f7c35e17c92839fe66e5f1f13e37ec170f4d0d16</open-checksum>
<location href="repodata/182e2add8c3d3069057852ed9944419578aa72b31eb9233b18b6ce68fa86ba05-primary.xml.zst"/>
<timestamp>1777498821</timestamp>
<size>1069</size>
<open-size>7430</open-size>
</data>
<data type="filelists">
<checksum type="sha256">6f5b348c760248ea001feca0ee0beaa9d8cdec94e0312805037939d684e31715</checksum>
<open-checksum type="sha256">7a511e06012fb5dd9cec13f938411aeb3d23218d6ca03884286d08f693cf36f6</open-checksum>
<location href="repodata/6f5b348c760248ea001feca0ee0beaa9d8cdec94e0312805037939d684e31715-filelists.xml.zst"/>
<timestamp>1774488263</timestamp>
<size>497</size>
<checksum type="sha256">8e6cd282fee67920e9fd5728c68c86ad8d8ca56f9e8db935bd9358e22f4b86a8</checksum>
<open-checksum type="sha256">601f4c051e7fb1541e74b63516ad2f5fceecafae40b02a15bef878f1e941b159</open-checksum>
<location href="repodata/8e6cd282fee67920e9fd5728c68c86ad8d8ca56f9e8db935bd9358e22f4b86a8-filelists.xml.zst"/>
<timestamp>1777498821</timestamp>
<size>499</size>
<open-size>1245</open-size>
</data>
<data type="other">
<checksum type="sha256">34cf946ca0f35edd60e0ab872d749be066e3e0fdb86e5db7b4c47b62e2bf8baa</checksum>
<open-checksum type="sha256">7b0f0f90ea67360bf96148c1b75fcedd467885f3f80f792ba1fc0575e1bc9d49</open-checksum>
<location href="repodata/34cf946ca0f35edd60e0ab872d749be066e3e0fdb86e5db7b4c47b62e2bf8baa-other.xml.zst"/>
<timestamp>1774488263</timestamp>
<size>578</size>
<checksum type="sha256">d6dae028f2d94a20a5ada403a89d418b7d31c646d2350605999882725a5b0862</checksum>
<open-checksum type="sha256">bfbc10574abc73bf3586a122246953f8073cde56afb8b4470d856ffe0d7823b0</open-checksum>
<location href="repodata/d6dae028f2d94a20a5ada403a89d418b7d31c646d2350605999882725a5b0862-other.xml.zst"/>
<timestamp>1777498821</timestamp>
<size>581</size>
<open-size>2025</open-size>
</data>
</repomd>

Binary file not shown.

View file

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1774488264</revision>
<revision>1777498822</revision>
<data type="primary">
<checksum type="sha256">0b463e3c855477c3495824980a03659d7c3ba317c156188f1b782e0da061f565</checksum>
<open-checksum type="sha256">745d2c48795fba78b4b7e9ab741118f7e54de2c05f39c9cab5339a52425fbc46</open-checksum>
<location href="repodata/0b463e3c855477c3495824980a03659d7c3ba317c156188f1b782e0da061f565-primary.xml.zst"/>
<timestamp>1774488264</timestamp>
<size>630</size>
<checksum type="sha256">daa25dfd3c818ca6b5104612d827dac24e70a2050986ed49457124116013f4ef</checksum>
<open-checksum type="sha256">ee07278548ed0fee3569e6b1aa00a4488ef82c0216d5fb835899edca81d00ebe</open-checksum>
<location href="repodata/daa25dfd3c818ca6b5104612d827dac24e70a2050986ed49457124116013f4ef-primary.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>626</size>
<open-size>1265</open-size>
</data>
<data type="filelists">
<checksum type="sha256">cfdea7cc8d5c4a89932a1c4edf35f74160476f125f70556f18ea908dc0684370</checksum>
<open-checksum type="sha256">78ae883f4eb18458e82d75f5462aa4022d62670f199c1693afda6a71124e6d88</open-checksum>
<location href="repodata/cfdea7cc8d5c4a89932a1c4edf35f74160476f125f70556f18ea908dc0684370-filelists.xml.zst"/>
<timestamp>1774488264</timestamp>
<size>227</size>
<checksum type="sha256">77dfe7c593c3e37af3f924516b5aa25cc512a5b8070f75fbeb4b1e844973835b</checksum>
<open-checksum type="sha256">7e2dfb6357481ec47ff798fc40501850c014472d258cccc9ac49ec9c1d176acb</open-checksum>
<location href="repodata/77dfe7c593c3e37af3f924516b5aa25cc512a5b8070f75fbeb4b1e844973835b-filelists.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>225</size>
<open-size>285</open-size>
</data>
<data type="other">
<checksum type="sha256">0dc249db5b0c7e6364824572d589e2fa29ec4e2e94391f1570cd3f7d6f25d41d</checksum>
<open-checksum type="sha256">417bef5b0ab889431a2f8f556372329bde5a40fd398ded2c712daf3f554dc88d</open-checksum>
<location href="repodata/0dc249db5b0c7e6364824572d589e2fa29ec4e2e94391f1570cd3f7d6f25d41d-other.xml.zst"/>
<timestamp>1774488264</timestamp>
<checksum type="sha256">a583ea09de5b85171eb9110dacfd240e527828cff25324ce894d3dd9c80cf961</checksum>
<open-checksum type="sha256">747fadb7b8374294f06c6ed1c48f21a25d7ac797625c574d13adf81377341014</open-checksum>
<location href="repodata/a583ea09de5b85171eb9110dacfd240e527828cff25324ce894d3dd9c80cf961-other.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>305</size>
<open-size>393</open-size>
</data>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,28 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<repomd xmlns="http://linux.duke.edu/metadata/repo" xmlns:rpm="http://linux.duke.edu/metadata/rpm">
<revision>1774488264</revision>
<revision>1777498822</revision>
<data type="primary">
<checksum type="sha256">72dbe6a89af644abc2808c89423098eb3f14737451845f23cddbff75a4b50c65</checksum>
<open-checksum type="sha256">fb946da940b692693adb8636d5175ad08ad6b3a85d94e9c78fcf1d9d44be7571</open-checksum>
<location href="repodata/72dbe6a89af644abc2808c89423098eb3f14737451845f23cddbff75a4b50c65-primary.xml.zst"/>
<timestamp>1774488264</timestamp>
<size>851</size>
<checksum type="sha256">736fcb107df83b5ae000865878a1f670603afb579fbb3179e2ce4d72c9586e48</checksum>
<open-checksum type="sha256">a301ab11789be905d36e3f1bf6aa8afe8f62be4dd888781f35f040cda6630ede</open-checksum>
<location href="repodata/736fcb107df83b5ae000865878a1f670603afb579fbb3179e2ce4d72c9586e48-primary.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>847</size>
<open-size>4359</open-size>
</data>
<data type="filelists">
<checksum type="sha256">17b5bd10c69bd41f762588c6aac8e8a16a063377b27cef897f980e0f00be574e</checksum>
<open-checksum type="sha256">a1da1c81895dc9464bb222c0231376facc65b4ee4e12086aa3ad89dcbf6b9e06</open-checksum>
<location href="repodata/17b5bd10c69bd41f762588c6aac8e8a16a063377b27cef897f980e0f00be574e-filelists.xml.zst"/>
<timestamp>1774488264</timestamp>
<size>372</size>
<checksum type="sha256">ca771b7fed377c578d3d9ffd1b856a9c1c0e5192ad31e2d111d1ae2ed978e34c</checksum>
<open-checksum type="sha256">92c0e6ce6d1a917a7d9104471513ad2d1699245864e08d8fcb5d78260bf0127c</open-checksum>
<location href="repodata/ca771b7fed377c578d3d9ffd1b856a9c1c0e5192ad31e2d111d1ae2ed978e34c-filelists.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>369</size>
<open-size>765</open-size>
</data>
<data type="other">
<checksum type="sha256">6858c6f91aeb1507cd0fb744ee8efee07913c239a3157f155d0fe966fb42dd71</checksum>
<open-checksum type="sha256">3bcb4ed05cf61065a58ec106f3431c49eddbdfd13c07cb0f47ef9d5d5e68d43d</open-checksum>
<location href="repodata/6858c6f91aeb1507cd0fb744ee8efee07913c239a3157f155d0fe966fb42dd71-other.xml.zst"/>
<timestamp>1774488264</timestamp>
<size>449</size>
<checksum type="sha256">5f112f5ba0bd830d4f7d2b42a6d57c1041d78b661a423c3e00b0b6072fe3d690</checksum>
<open-checksum type="sha256">981a53e7a783d642baf951a1efc14237eb9f11473cae778d566cada8e1a65c54</open-checksum>
<location href="repodata/5f112f5ba0bd830d4f7d2b42a6d57c1041d78b661a423c3e00b0b6072fe3d690-other.xml.zst"/>
<timestamp>1777498822</timestamp>
<size>447</size>
<open-size>1209</open-size>
</data>
</repomd>

3
tests/testdata/test_e2e_eln.txt vendored Normal file
View file

@ -0,0 +1,3 @@
Dependencies of other packages that would be BROKEN by the tested packages:
package: epa-1.0-1.x86_64 from file://{REPOS}/elnbase
epc = 1.0