Hi Daan, Daan De Meyer <daan.j.demeyer@gmail.com> writes:
Hi Dan,
I would recommend to use either the repositories in https://src.opensuse.org/rpm/ or to checkout the packages in Base:System via the /public/ API route that works without authentication (with the caveat that you have to perform the checkout yourself).
https://src.opensuse.org/rpm/systemd does not seem to have a branch containing the changes from https://build.opensuse.org/package/show/Base:System/systemd. Can you show me how to use the public API route with osc?
osc does not support the public route, but my own (and very badly documented) API wrapper does[1]. However, it's just an API wrapper and no ready built solution. But it shouldn't be too hard, you first have to create an instance of the Osc class with public=True[2]. Then use the `fetch_all_files` function to obtain the files from the package[3]. At last, write the obtained files to disk: --8<---------------cut here---------------start------------->8--- from py_obs.osc import Osc from py_obs.project import fetch_all_files import asyncio osc = Osc(public=True) loop = asyncio.get_event_loop() files = loop.run_until_complete((fetch_all_files(osc, "Base:System", "systemd"))) for fname, contents in files.items(): with open(fname, "w") as f: f.write(contents) --8<---------------cut here---------------end--------------->8--- (should work 🤞) Hope this helps, Dan Footnotes: [1] https://github.com/dcermak/py-obs [2] https://github.com/dcermak/py-obs/blob/f27e8182f0840bd857721aeddfab526600c8f... [3] https://github.com/dcermak/py-obs/blob/f27e8182f0840bd857721aeddfab526600c8f...