V Thu, Feb 10, 2022 at 04:06:27PM +0100, Fabio Valentini napsal(a):
On Thu, Feb 10, 2022 at 4:01 PM Zbigniew Jędrzejewski-Szmek
<zbyszek(a)in.waw.pl> wrote:
>
> Yeah, but is is worth the effort? I could open a bunch of bugs, but
> I don't want to do this if nobody wants to look at them anyway.
You might be able to save yourself from downloading and installing all
packages manually, by querying repository metadata for file providers:
for package in repository:
for file in package:
for provider in whatprovides(file):
if provider != package:
print "Path {file} is provided by both {package} and
{provider}."
Though you'd probably get a bunch of false positives, for things like
shared directory ownership. Not sure if you could filter that out
somehow.
You have the tested package locally, so you know whether a file name is
a directory or not and omit the directories from testing. (There is still
a possibility of clashing a local direcotory and a remote file, but I guess
that will be close to zero.)
Of course a good test when it discovers a same-named file, before reporting an
error, it should also check whether the Conflicts has already been declared
(locally or remotely).
(And the test also needs to skip a previous version of the tested package :)
-- Petr