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

Re: conflicts and replace



Nicolas Boulenguez <nicolas.boulenguez@free.fr> writes:
> Hello.
>
> Ludovic has uploaded libxmlada4.1-dev (depending on gnat-4.6). The
> previous version was libxmlada3.2-dev (depending on gnat-4.4). It
> seems that he has forgotten to make the package conflict/replace the
> previous version.
>
> However, I suggest that we relax the policy (in the "Coexistence not
> allowed" scenario) when the compiler changes. I believe that this
> implies an aliversion change for allmost any library, as we all use
> standard specs.
>
> The policy allready indirectly forbids both package being installed at
> the same time, so maybe we could allow the maintainer to flush the
> "Conflicts" list at each compiler upgrade. In the previous example,
> trying to install both -dev packages gives a quite explicit error in
> aptitude:
>
> (say libxmlada3.2-dev is installed with gnat (<=4.4) and gnat-4.4)
>   gnat-4.6 conflicts with gnat-4.4
>   libxmlada4.1-dev depends on gnat-4.6
>
> Since both packageŝ depend on gnat, the only package that may be
> installed is the one matching the default compiler. Keeping the list
> of old "Replaces" may help aptitude to find this solution during
> automatic upgrades.
>
> Ideas about that?

Good thinking Nicolas.  Indeed I forgot to add the Conflicts and
Replaces to libxmlada4.1-dev because I thought the work had been done
already.  And indeed, switching compilers is sufficient to create a
conflict anyway.  So I propose the following small change to the Debian
Policy for Ada:

--- debian-ada-policy.texi
+++ debian-ada-policy.texi
@@ -1119,7 +1118,14 @@ @subsection Avoiding the indirect FTBFS 
 it is necessary that the package @code{libconfig<aliversion>-dev} have
 @samp{Conflicts} and @samp{Replaces} clauses in its
 @file{debian/control} that list all previous versions of the
-@code{-dev} package.
+@code{-dev} package.  The @samp[Conflicts}/@samp{Replaces}
+relationship can be indirect and implicit through @code{gnat-X.Y}.  If
+@code{libconfig1-dev} depends on @code{gnat-4.1} and
+@code{libconfig2-dev} depends on @code{gnat-4.3}, an explicit
+@samp{Conflicts:} is unnecessary because @code{gnat-4.1} and
+@code{gnat-4.3} already conflict with each other, preventing
+coexistence of @code{libconfig1-dev} and @code{libconfig2-dev} as
+intended.
 
 The @var{soname} of the shared library can change independently of the
 @var{aliversion}.
@@ -1466,7 +1472,7 @@ @subsection Inter-package dependencies
 
 @subsection Inter-package dependencies
 
-Rule: the @code{-dev} package SHALL Depend: on the packages
+Rule: the @code{-dev} package SHALL @samp{Depend:} on the packages
 @code{gnat}, @code{gnat-X.Y} and @code{ada-compiler}.
 
 Rationale: depending on both packages ensures that only the default
@@ -1480,7 +1486,8 @@ @subsection Inter-package dependencies
 Rule: If the package maintainer chooses the @emph{No coexistence
 allowed} policy, the @code{-dev} package's @file{debian/control} file
 SHALL contain @samp{Conflicts:} and @samp{Replaces:} lines listing all
-previous versions of the package, if any.
+previous versions of the package, if any, that ever depended on the
+same @code{gnat-X.Y} package.
 
 Rule: the @code{-dbg} package SHALL Depend: on the exact version of
 the corresponding shared library package.

Any objections anyone?

-- 
Ludovic Brenta.


Reply to: