osbuild: drop libdir from download() methods

The libdir is passed down for sources but it is never used in
any of our sources. As this is confusing and we want to eventually
support multiple libdirs remove this code.

It looks like the libdir for soruces was added a long time ago in 8423da3
but there is no indication if/how it is/was supposed to get used and
AFACT from going over the git history it was very used.

SourceService:dispatch() never sends "libdir" to the actual sources,
so it is not an even technically an API break.
This commit is contained in:
Michael Vogt 2024-08-15 13:43:24 +02:00
parent a2fed3e0d8
commit 77a61da760
4 changed files with 10 additions and 12 deletions

View file

@ -101,14 +101,14 @@ def make_test_cases():
yield source, case
def check_case(source, case, store, libdir):
def check_case(source, case_options, store):
with host.ServiceManager() as mgr:
expects = case["expects"]
expects = case_options["expects"]
if expects == "error":
with pytest.raises(host.RemoteError):
source.download(mgr, store, libdir)
source.download(mgr, store)
elif expects == "success":
source.download(mgr, store, libdir)
source.download(mgr, store)
else:
raise ValueError(f"invalid expectation: {expects}")
@ -131,5 +131,5 @@ def test_sources(source, case, tmp_path):
with osbuild.objectstore.ObjectStore(tmp_path) as store, \
fileServer(test.TestBase.locate_test_data()):
check_case(src, case_options, store, index.path)
check_case(src, case_options, store, index.path)
check_case(src, case_options, store)
check_case(src, case_options, store)