Allow skipping 'installability' or 'repoclosure' (#37)
This allows you to skip either the installability or repoclosure 'phase'. If you skip installability, we will only check repoclosure of the modified base repositories, we will not check repoclosure of the new package repository. If you skip repoclosure, it's vice versa. This is intended to be used for ELN. ELN's buildroot contains more packages than are in its published repositories. The ELN maintainers don't consider repoclosure of the buildroot as a goal. So for the 'repoclosure' phase we should check the published repositories. However, for the 'installability' phase, we need to check against the buildroot, because the packages under test may be destined for the buildroot and thus have buildroot-only dependencies. We don't want to report a failure if their dependencies cannot be satisfied from the published repositories. We can cover both cases by allowing the phases to be run separately, so for ELN we will run the repoclosure phase against the published repositories, and the installability phase against the buildroot repository. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
c57888877c
commit
15047e9b56
75 changed files with 252 additions and 93 deletions
|
|
@ -6,8 +6,9 @@ on the base repositories as-is. Next, we re-run the checks, but with the checked
|
|||
available and using dnf's `excludepkgs` option to hide from the base repositories all packages from
|
||||
the same source RPM(s) as the package(s) in the checked repositories removed. The results of the
|
||||
two runs are compared. New failures should indicate problems introduced by the checked repositories.
|
||||
Also, some relevant checks are run on the checked repositories with reference to the modified base
|
||||
repositories.
|
||||
This is called the 'basetest' phase. Also, some relevant checks are run on the checked repositories
|
||||
with reference to the modified base repositories. This is called the 'newtest' phase. Either phase
|
||||
can be skipped with the `--skip` argument.
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ def get_modified_and_new_repoclosure(
|
|||
nmrepos: list[str],
|
||||
nrepos: list[str],
|
||||
removes: Iterable[str],
|
||||
skip: str,
|
||||
) -> tuple[str, str]:
|
||||
"""Runs repoclosure with new repo included and excludepkgs used
|
||||
for modified base repos, and returns the modified repoclosure
|
||||
|
|
@ -157,11 +158,13 @@ def get_modified_and_new_repoclosure(
|
|||
rcargs.append("--check")
|
||||
rcargs.append(",".join([hash_repo(mrepo) for mrepo in mrepos]))
|
||||
|
||||
# get the modified repoclosure
|
||||
mod = SUBPCAPTURE(rcargs).stdout
|
||||
mod = ""
|
||||
new = ""
|
||||
if nrepos:
|
||||
# the first nrepo is the checked repo, only check that
|
||||
# get the modified repoclosure
|
||||
if skip != "basetest":
|
||||
mod = SUBPCAPTURE(rcargs).stdout
|
||||
if nrepos and skip != "newtest":
|
||||
# the first newrepo is the checked repo, only check that
|
||||
rcargs[-1] = hash_repo(nrepos[0])
|
||||
# get the new repoclosure
|
||||
new = SUBPCAPTURE(rcargs).stdout
|
||||
|
|
@ -302,6 +305,13 @@ def parse_args() -> argparse.Namespace:
|
|||
default="",
|
||||
help="Arch to operate on. Must match arch of passed repositories. Defaults to host arch",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip",
|
||||
type=str,
|
||||
choices=("basetest", "newtest"),
|
||||
help="A phase to skip. Either 'basetest' or 'newtest'. Intended to allow "
|
||||
"running each phase with different base repos",
|
||||
)
|
||||
parser.add_argument(
|
||||
"baserepos",
|
||||
type=comma_url,
|
||||
|
|
@ -366,7 +376,7 @@ def main() -> None:
|
|||
|
||||
# get the modified rpmclosure output
|
||||
modraw, newraw = get_modified_and_new_repoclosure(
|
||||
args.baserepos, args.nmbaserepos, nrepos, sources
|
||||
args.baserepos, args.nmbaserepos, nrepos, sources, args.skip
|
||||
)
|
||||
modrc = parse_repoclosure(modraw)
|
||||
newrc = []
|
||||
|
|
|
|||
|
|
@ -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,47 @@ 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
|
||||
representing a "published" repo and a larger repo representing the
|
||||
"buildroot" repo. The new repo contains a package that breaks the
|
||||
deps of one package in the published repo and one package in the
|
||||
buildroot repo, and itself requires a package from the buildroot
|
||||
repo. We first run the basetest phase against the published repo,
|
||||
then the newtest phase against the buildroot repo, as we would do
|
||||
in reality. We expect to see a failure for the broken base repo
|
||||
package, but no failure for the broken buildroot repo package or
|
||||
the new package itself.
|
||||
"""
|
||||
sys.argv = [
|
||||
"rmdepcheck.py",
|
||||
"--skip",
|
||||
"newtest",
|
||||
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
|
||||
sys.argv = [
|
||||
"rmdepcheck.py",
|
||||
"--skip",
|
||||
"basetest",
|
||||
f"file://{REPOS}/elnroot",
|
||||
f"file://{REPOS}/elnnew",
|
||||
]
|
||||
with pytest.raises(SystemExit) as excinfo:
|
||||
rmdepcheck.main()
|
||||
assert excinfo.value.code == 0
|
||||
captured = capsys.readouterr()
|
||||
assert captured.out == captured.err == ""
|
||||
|
||||
|
||||
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"]
|
||||
|
|
|
|||
BIN
tests/testdata/repos/base/aaa-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/aaa-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/bbb-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/bbb-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/ccc-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/ccc-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/ddd-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/ddd-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/eee-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/eee-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/fff-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/fff-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/ggg-1.0-1.i686.rpm
vendored
BIN
tests/testdata/repos/base/ggg-1.0-1.i686.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/ggg-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/ggg-1.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/hhh-1.0-1.i686.rpm
vendored
BIN
tests/testdata/repos/base/hhh-1.0-1.i686.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/base/hhh-1.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/base/hhh-1.0-1.x86_64.rpm
vendored
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.
32
tests/testdata/repos/base/repodata/repomd.xml
vendored
32
tests/testdata/repos/base/repodata/repomd.xml
vendored
|
|
@ -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>
|
||||
|
|
|
|||
BIN
tests/testdata/repos/elnbase/epa-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnbase/epa-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/repos/elnbase/epc-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnbase/epc-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
tests/testdata/repos/elnbase/repodata/repomd.xml
vendored
Normal file
28
tests/testdata/repos/elnbase/repodata/repomd.xml
vendored
Normal 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>
|
||||
BIN
tests/testdata/repos/elnnew/epc-2.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnnew/epc-2.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
tests/testdata/repos/elnnew/repodata/repomd.xml
vendored
Normal file
28
tests/testdata/repos/elnnew/repodata/repomd.xml
vendored
Normal 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>
|
||||
BIN
tests/testdata/repos/elnroot/epa-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnroot/epa-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/repos/elnroot/epb-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnroot/epb-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/repos/elnroot/epc-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnroot/epc-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
BIN
tests/testdata/repos/elnroot/epd-1.0-1.x86_64.rpm
vendored
Normal file
BIN
tests/testdata/repos/elnroot/epd-1.0-1.x86_64.rpm
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
28
tests/testdata/repos/elnroot/repodata/repomd.xml
vendored
Normal file
28
tests/testdata/repos/elnroot/repodata/repomd.xml
vendored
Normal 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>
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
54
tests/testdata/repos/mkrepos.py
vendored
54
tests/testdata/repos/mkrepos.py
vendored
|
|
@ -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)
|
||||
|
|
|
|||
BIN
tests/testdata/repos/new/111-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/111-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/222-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/222-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/aaa-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/aaa-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/ccc-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/ccc-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/eee-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/eee-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/fff-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/fff-3.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/new/ggg-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/new/ggg-3.0-1.x86_64.rpm
vendored
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.
32
tests/testdata/repos/new/repodata/repomd.xml
vendored
32
tests/testdata/repos/new/repodata/repomd.xml
vendored
|
|
@ -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>
|
||||
|
|
|
|||
BIN
tests/testdata/repos/unfixed/ddd-3.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/unfixed/ddd-3.0-1.x86_64.rpm
vendored
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.
30
tests/testdata/repos/unfixed/repodata/repomd.xml
vendored
30
tests/testdata/repos/unfixed/repodata/repomd.xml
vendored
|
|
@ -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>
|
||||
|
|
|
|||
BIN
tests/testdata/repos/updates/aaa-2.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/updates/aaa-2.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/updates/bbb-2.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/updates/bbb-2.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/updates/ccc-2.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/updates/ccc-2.0-1.x86_64.rpm
vendored
Binary file not shown.
BIN
tests/testdata/repos/updates/ddd-2.0-1.x86_64.rpm
vendored
BIN
tests/testdata/repos/updates/ddd-2.0-1.x86_64.rpm
vendored
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.
32
tests/testdata/repos/updates/repodata/repomd.xml
vendored
32
tests/testdata/repos/updates/repodata/repomd.xml
vendored
|
|
@ -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
3
tests/testdata/test_e2e_eln.txt
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue