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

splitting packages: trouble with overwriting/replacing files during upgrade



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hi all,


i'm currently in the process of splitting a package i'm co-maintaining
into several sub-packages.

unfortunately i experience some problems with test upgrades, which i
would like to solve.


the original package "gem" has been split into "gem" and "gem-doc".
"gem-doc" contains documentation, that is also of (limited) use if the
main package "gem" is not installed.

i read [1] and tried to follow it closely, so i end up with a
debian/controls file:
<snip>
Package: gem
Recommends: gem-doc
[...]
Package: gem-doc
Section: doc
Recommends: gem
Replaces: gem (<< 0.93)
Breaks: gem (<< 0.93)
</snip>

obviously, 0.93 is the new version with the split packages (the old one
is 0.92)


now here's the weird thing: when i upgrade the package using "dpkg -i",
success depends on the order of the packages passed to dpkg.
that is, if i install it with "dpkg -i gem gem-doc" everything works
fine (the old version of gem is removed, the new version of gem is
installed and then gem-doc is installed)

however, if i run "dpkg -i gem-doc gem" it bails out, as gem-doc
(==0.93) tries to overwrite files in gem(==0.92). hein?


what will happen if the user wants to do a simple upgrade (e.g. via
aptitute)?
afaict, there is no way to force front ends like aptitude to install the
selected packages in a given order.
at least, without resorting to "Breaks", which is actively discouraged
on [1] for the purpose i'm pursuing.

i can't believe that i triggered a bug, so there must be something wrong.

any ideas?


fgamsdr
IOhannes





[1] http://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces


[2] here's the output of an upgrade process when i first install gem and
then gem-doc::
zmoelnig@ferrari:/tmp/debian$ sudo dpkg -i gem_0.93.3-1_i386.deb
gem-doc_0.93.3-1_all.deb
(Reading database ... 418116 files and directories currently installed.)
Preparing to replace gem 1:0.92.3-2+b1 (using gem_0.93.3-1_i386.deb) ...
Unpacking replacement gem ...
Selecting previously unselected package gem-doc.
Unpacking gem-doc (from gem-doc_0.93.3-1_all.deb) ...
Setting up gem (1:0.93.3-1) ...
Setting up gem-doc (1:0.93.3-1) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for doc-base ...
Processing 1 changed doc-base file...
Registering documents with dwww...
Registering documents with scrollkeeper...

[3] here's the output of an upgrade process when i first install gem-doc
and then gem::

zmoelnig@ferrari:/tmp/debian$ sudo dpkg -i gem-doc_0.93.3-1_all.deb
gem_0.93.3-1_i386.deb
Selecting previously unselected package gem-doc.
(Reading database ... 418116 files and directories currently installed.)
Unpacking gem-doc (from gem-doc_0.93.3-1_all.deb) ...
dpkg: error processing gem-doc_0.93.3-1_all.deb (--install):
 trying to overwrite
'/usr/share/gem/examples/10.glsl/01.simple_texture.pd', which is also in
package gem 1:0.92.3-2+b1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Preparing to replace gem 1:0.92.3-2+b1 (using gem_0.93.3-1_i386.deb) ...
Unpacking replacement gem ...
Setting up gem (1:0.93.3-1) ...
Processing triggers for man-db ...
Processing triggers for menu ...
Processing triggers for doc-base ...
Processing 1 removed doc-base file...
Registering documents with dwww...
Registering documents with scrollkeeper...
Errors were encountered while processing:
 gem-doc_0.93.3-1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7Ku1sACgkQkX2Xpv6ydvStggCcCeXUQTqPsl1vwent2vrDo6gX
WFcAoMVVvrmAN8o4fSy5QgREtnMcxrD7
=enS8
-----END PGP SIGNATURE-----

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Reply to: