On Tue, Jul 18, 2023 at 7:28 AM Fabio Valentini <decathorpe(a)gmail.com> wrote:
On Tue, Jul 18, 2023, 15:22 Maxwell G <maxwell(a)gtmx.me> wrote:
> --requires --resolve resolves the entire dependency tree of a package.
> --requires just prints the direct dependencies that are specified in the
> RPM metadata.
> I don't know what this code is used for,
> but I don't think simply removing --resolve is the right solution.
Is it though? I assume you're thinking of "--recursive". As far as I know,
"--requires --resolve" force resolution of virtual provides instead. I don't
think removing "--resolve" is the correct solution for this case.
For example, the check if a package depends on something that's deprecated (i.e.
"Provides: deprecated ()") would need to resolve and check the actual package
dependencies, not only virtual provides.
That's the reason for the second change I proposed, namely changing
line 97 from:
name = line.rsplit(".", 2)[0]
to:
name = resolve_one(line)[0].rsplit(".", 2)[0]
The `resolve_one` function resolves the dependencies one at a time, to
compensate for unavailability of the --resolve option. On second
thought, though, perhaps that code should be:
for arg in resolve_one(line):
name = arg.rsplit(".", 2)[0]
deps.append(name.rsplit("-", 2)[0])
--
Jerry James
http://www.jamezone.org/