On Sat, Aug 04, 2018 at 11:24:27AM -0500, Rob Browning wrote:
> Axel Beckert <a...@debian.org> writes:
> 
> > upgrading emacs25-lucid on armhf pulls in emacs-lucid, but that fails
> > to install as follows:
> >
> > Preparing to unpack .../emacs-lucid_1%3a25.2+1-8_armhf.deb ...
> > Unpacking emacs-lucid (1:25.2+1-8) ...
> > dpkg: error processing archive 
> > /var/cache/apt/archives/emacs-lucid_1%3a25.2+1-8_armhf.deb (--unpack):
> >  trying to overwrite '/usr/share/emacs/25.2/etc/DOC', which is also in 
> > package emacs25-lucid 25.2+1-6+b3
> > dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
> > Errors were encountered while processing:
> >  /var/cache/apt/archives/emacs-lucid_1%3a25.2+1-8_armhf.deb
> >
> > The Replaces header only contains emacs-gtk and emacs-nox, but likely
> > also needs emacs25-lucid. And probably also needs a "Breaks:
> > emacs25-lucid".
> 
> I suspect I'm just misunderstanding the dependency system, but this
> confuses me because:
> 
>   emacs25-lucid 25.2+1-6+b3
>     Depends: emacs25-bin-common
> 
> and
> 
>   emacs25-bin-common
>     Depends: emacs25-common
> 
> and on the newer side
> 
>   emacs-lucid 1:25.2+1-8
>     Depends: emacs-common (= 1:25.2+1-8)
> 
> and 
> 
>   emacs-common 1:25.2+1-8
>     Depends: emacsen-common (>= 3.0.0)
> 
> and
> 
>   emacsen-common (>= 3.0.0)
>     Conflicts: emacs25-common
> 
> So I'd expected the indirect dependency of emacs-lucid on the newer
> emacsen-common to have indirectly forced emacs25-lucid out (via the
> emacsen-common conflicts), so that there wouldn't be a file conflict,
> but obviously I'm missing something (and agree that it's a somewhat
> tortuous route).

This needs Breaks+Replaces:
https://www.debian.org/doc/debian-policy/ch-relationships.html#overwriting-files-in-other-packages

The Breaks part might be covered by the Conflicts relationship you showed.

But during the upgrade the Replaces is additionally required, for 
telling dpkg that emacs-lucid contains files that are during the
upgrade still present from the not yet fully removed emacs25-lucid
package.

> Thanks

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

Reply via email to