[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dependencies of -dbg and -doc packages



Ludovic Brenta <ludovic@ludovic-brenta.org> writes:

> In the course of investigating the upgrade process of Ada packages from
> Lenny to Squeeze, I had to install all Ada packages in Lenny to begin
> with.
>
> The way I did was by looking at all the packages that Depend: on gnat-4.3;

Using something like:

aptitude search "?depends(gnat-4.3)" 

?

> 
> this gave me a list of (most) -dev packages, which in turn Depend: on
> the shared library packages. However, finding the -dbg packages is
> more difficult.

I gather dpkg doesn't have a command for "report closure of packages
that depend on this package".

Can't we write some Python (or Ada :) code that uses the dpkg API to
generate that report? There is a package python-apt.

> The Debian Policy for Ada (5.6 "The separate debugging information
> package") does not mandate any form of dependencies; I would like to add a
> list of required dependencies.
>
> For starters, for technical reasons it is obvious that:
>
> Rule: the -dbg package SHALL depend on the exact version of the
> corresponding shared library package.

Ok.

> But this is insufficient to make the -dbg package visible to the human,
> e.g. in aptitude.  

Since the -dbg package name has the same root name as the library
package, this should work:

aptitude search LIBRARY

For opentoken, that gives:

aptitude search opentoken
p   libopentoken-dbg                - OpenToken lexical analysis library for Ada
p   libopentoken-dev                - OpenToken lexical analysis library for Ada
p   libopentoken2-dev               - OpenToken lexical analysis library for Ada
c   libopentoken4                   - OpenToken lexical analysis library for Ada
p   libopentoken6                   - OpenToken lexical analysis library for Ada
p   opentoken-dbg                   - OpenToken lexical analysis library for Ada

Or, given the above Depends rule:

aptitude search "?depends(libopentoken6)"


So it should be possible, using python-apt, to generate a list of "all
Ada packages" by doing a tree traversal on the depends relationships.

You could even do this in a bash script.

Ah; someone already did it (of course :); package apt-rdepends

apt-rdepends -r gnat-4.3

> Indeed, the human administrator must navigate from gnat-4.3 to the
> -dev package, then to the shared library package, and only then to the
> -dbg package; and then repeat the whole process for each -dev package
> that depends on gnat-4.3. I would like to propose:
>
> Rule: the -dbg package SHALL depend on the exact version of the
> corresponding -dev package.
>
> While not absolutely required to get a stack trace, the -dev package is
> certainly necessary for any kind of source-level debugging; so the
> dependency seems to make sense.  We could relax it to just Recommends:
> though.

I don't think we need this.

> I am pondering whether the -dev package should also Suggest: or Recommend:
> the -dbg package(s).  

No; we should assume that people doing Ada work on Debian are familiar
with general Debian packaging policy, and the Ada policy in particular.

> I have the same idea about -doc packages: in order to make them more
> visible to the human administrator, I think a rule like the following is
> necessary in "5.5 Documentation":
>
> Rule: the -dev package SHALL Recommend: the -doc package, if any.

Not necessary; I think 'aptitude search LIBRARY' is adequate.

-- 
-- Stephe


Reply to: