[csw-maintainers] addition to CSWcommon?
Maciej (Matchek) Blizinski
maciej at opencsw.org
Thu Jan 6 21:07:21 CET 2011
No dia 1 de Janeiro de 2011 17:29, Maciej (Matchek) Blizinski
<maciej at opencsw.org> escreveu:
> No dia 1 de Janeiro de 2011 14:00, Peter FELECAN
> <pfelecan at opencsw.org> escreveu:
>> "Maciej (Matchek) Blizinski" <maciej at opencsw.org> writes:
>>
>>> I agree that suggesting a gazillion unrelated looking packages might
>>> be confusing. We could stop doing that and only report missing base
>>> directories, but... if the right choice is to add a dependency,
>>> finding the right dependency by hand is a PITA. (Unless you know
>>> tricks such as "bin/pkgdb show filename /etc/opt/csw/init.d".)
>>
>> It's not a unknown trick if you give this exact information in your
>> message helping the maintainer to find his way.
>
> I still fiddle a lot with the interface of pkgdb, and I was a bit
> reluctant of revealing it to the world. This is a very good
> suggestion, how about the following patch? (...)
Turns out, it's not that easy. The patch I suggested does not work.
We have to solve the general case of "CSWfoo needs path /opt/csw/bar".
What checkpkg currently does, is that it explains the issue, and if
the directory is already present in other packages, it suggests
declaring a dependency one one of them; providing a full list and
letting the maintainer choose which one.
The code that handles it is generic, which means it works for all file
types and doesn't care about the type of the needed file. The
interface to the database is that you call
GetPkgByPath("/opt/csw/lib/foo") and receive a list of packages:
frozenset(["CSWfoo", "CSWbar", ...]). You can call it with
/opt/csw/bin/python and it'll suggest CSWpython; in the future, you'll
be able to call /opt/csw/bin/python3.1 and it'll suggest the
dependency on CSWpython31. It's got a great potential.
Making it smarter however will require changing the database
interface; for example, each package name will need to be accompanied
by some file metadata, e.g. file type such as 'f', 'd', or 's'.
To make checkpkg output more useful, we can try to apply some
heuristics, for example if one of the packages returned is CSWcommon,
we can suggest just CSWcommon and not any other packages.
More information about the maintainers
mailing list