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

Bug#200264: Splitting texdoctk?



Hilmar Preusse <hille42@web.de> wrote:

> My patch in 190721 goes a little bit further into the huge split[TM],
> than it is actually desirable.
>   Actually I propose only to split off
> /etc/texdoctk/{texdocrc,texdoctk.dat} from tetex-extra and put it
> into a separate package. tetex-bin will depend on it.
> Problem: in woody /etc/texdoctk/* are conffiles. A Conflicts-field in
> tetex-bin will only remove that package, not purge it -- correct?
> What will happen, if that "to be created" package will try to
> overwrite them?

I am not really sure, and would like to test. Hi Florent, are the test
packages you made earlier still available somewhere?

But when reading Policy it seems that conffiles will be handled without
problems:

,----
| 7.5.1 Overwriting files in other packages
|
| Firstly, as mentioned before, it is usually an error for a package to
| contain files which are on the system in another package.
|
| However, if the overwriting package declares that it Replaces the one
| containing the file being overwritten, then dpkg will replace the file
| from the old package with that from the new. The file will no longer
| be listed as "owned" by the old package.

Note that it is "the file", not "all files".

| If a package is completely replaced in this way, so that dpkg does not
| know of any files it still contains, it is considered to have
| "disappeared". It will be marked as not wanted on the system (selected
| for removal) and not installed. Any conffiles details noted for the
| package will be ignored, as they will have been taken over by the
| overwriting package. The package's postrm script will be run with a
| special argument to allow the package to do any final cleanup
| required. See Summary of ways maintainer scripts are called, Section
| 6.4. [35]
`----

Thus, both tetex-bin and texdoctk-conffiles would "Replace: texdoctk",
but only tetex-bin would Conflict and Provide.

> Further: assume, that tetex-bin conflicts with texdoctk and depends
> on that "to be created" package. What will happen first: removal of
> texdoctk or install of that package?

I think removals are done first. But if I am correct with the above, it
doesn't matter. No it doesn't, see below.

>> The last option (only texdoctk-conffiles) looks good for me to
>> resolve this bug for sarge. Have you checked whether the patches
>> still can be applied somehow?
>> 
> No. Before I will do so, I would like to hear other opinions, if
> there could appear other technical issues (see above) etc.

We could try with some toy package, but I think we won't get problems.

[Hm. Time goes by. dpkg-buildpackage. pbuilder unpacks. good]

Okay, "Replaces" is as good as provides in this respect, and
installation works without problems:


 Package: tetex-bin
 Priority: optional
 Architecture: any
-Replaces: texbin, xdvik, mflib, kpathsea, makeindex, ps2pk, latex, texidoc, dvipdfm, cweb
+Replaces: texbin, xdvik, mflib, kpathsea, makeindex, ps2pk, latex, texidoc, dvipdfm, cweb, texdoctk

that's it. look:

dpkg: tetex-base: dependency problems, but removing anyway as you request:
 tetex-doc depends on tetex-base (>= 0.9.990311-1).
 tetex-bin depends on tetex-base (>= 1.0.2+20011202-1).
(Reading database ... 18327 files and directories currently installed.)
Removing tetex-base ...
dpkg - warning: while removing tetex-base, directory `/var/spool/texmf' not empty so not removed.
dpkg - warning: while removing tetex-base, directory `/etc/texmf/pdftex' not empty so not removed.
dpkg - warning: while removing tetex-base, directory `/etc/texmf/dvips' not empty so not removed.
dpkg - warning: while removing tetex-base, directory `/usr/share/texmf/tex/context' not empty so not removed.
(Reading database ... 13527 files and directories currently installed.)
Preparing to replace tetex-bin 1.0.7+20011202-7.1 (using .../tetex-bin_2.0.2-13_i386.deb) ...
Unpacking replacement tetex-bin ...
Replacing files in old package texdoctk ...
Selecting previously deselected package tetex-base.
Unpacking tetex-base (from .../tetex-base_2.0.2-6_all.deb) ...

That only leaves texdoctk unusable, because the database is missing, but
that's only _one_ file to be moved from tetex-extra to tetex-base

> Another possibility was discussed in #190721: put these files in
> tetex-base and we're done. That will solve #190721. After that we can
> swap over Conflicts: texdoctk etc. to tetex-bin, I just don't know,
> if that will solve our upgrade-problems (#200264).

We'll need the same "Replaces" for tetex-base, too. But in this case it
doesn't matter, at least not in reality, because texdoctk in woody
depends on tetex-bin, which will consequently be installed and upgraded
in the same run as tetex-base replaces texdoctk. 

So the way to go probably is the following:

Now:

- tetex-bin declares no relationship at all to texdoctk
- tetex-extra Conflicts/Replaces/Provides texdoctk
- files from texdoctk are in tetex-bin and tetex-extra

Future:

- files from texdoctk are in tetex-bin and tetex-base
- tetex-base declares "Replaces: texdoctk"
- tetex-bin declares Conflicts/Replaces/Provides.

I'll make a test ASAP and then check it in.

>
> [combination of tetex-bin, tetex-base]
>> 
>> Why not combine them into one tetex_$version.orig.tar.gz and
>> creating the same binary packages from there?
>> 
> That will help to solve problems like #190721. Do they occur that
> often? On the other hand: It may keep some things more simple.

Not very often, but if they do they're hard. The next one, with a 33%
pchance, will be /etc/X11/app-defaults/XDvi: It is currently in both
tar.gz's, and Thomas was asked by a user on pretest to make clear which
one should be used. He hasn't answered yet, but I'd bet there's a 2/3
chance that he'll remove one of them. And then chances are 50:50 that
we'll get a problem...

Not that I'm convinced of this. It was just an idea.

Regards, Frank

-- 
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie




Reply to: