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

Re: Installing many languages of docs



Nice, I have a bug open about this (#23522: man-db installs foreign
language manpages) and I would like to close it :-)
Note: that bug is offensive; I left it open only for the TODO list :-)

On Tue, Sep 28, 1999 at 05:00:48PM +0300, arto.astala@nokia.com wrote:
> So,
> 
> what requirements we have this far?
> 
> - one must be able to select language(s) for documentation
>   to be installed
> 
> - selection of languages must be stored and not prompted
>   unnecessarily
> 
> are there any other requirements?

yes, as you already said:

> - what happens if user changes his or her selection, how can
>   the system be updated (i.e. languages added or removed)?

debconf is probably the right tool to get the information about which
languages to install.
We must in any case install english stuff (otherwise we need and
incredibly complicated system to get reasonable defaults in case of
partial absence of some doc).

That selection should be stored in a /etc file, and not in an ENV VAR
(env var are per-user, and you cannot rely on root as the upgrader: I
use sudo :-). This choice is global to that machine and is a cut
orthogonal to all packages (if you don't want swedish manpages, you
don't want also swedish info or other).

dpkg should memorize the fact that one package has been installed only
partially, better if it does this recording the exact selection used
(another field in the status file, I suppose). In this case apt-get
could be able to notice that, in case the install (or upgrade) request must force
reinstallation of some package even if the version is the same.

> 
> - what happens if docs are not available in all languages?
>   any of them?

the selection should be multiple; fi,se,ee,sa
it should also accept keyworks: all (default), none.

> 
> - shall there be a 'mandatory language' (English)?

yes, we need a fallback.

> - what happens in upgrade?
packages already on the same version level will be reinstalled only if
the selection in /etc is different from the one in the package field in
status file.

>   what if selection of languages
>   is different now? what if the selection is lost?
in absence of the /etc file debconf asks; if the priority forbits asking
the use the default (all).

>   what if the previous version did not support selection?
>   what if user has installed 'language packs', like man-pages-it

I think that we should add to the DEBIAN dir a file which lists all the
files included in the package (but only those in a lang different from
english) prefixed with the lang code :

es:/usr/share/man/es/man8/accessdb.8.gz
es:/usr/share/man/es/man8/mandb.8.gz
es:/usr/share/man/es/man8/catman.8.gz
it:/usr/share/man/it
it:/usr/share/man/it/man1
it:/usr/share/man/it/man1/apropos.1.gz
it:/usr/share/man/it/man5
it:/usr/share/man/it/man5/manpath.5.gz
de:/usr/share/man/de/man1/man.1.gz
de:/usr/share/man/de/man8/accessdb.8.gz
de:/usr/share/man/de/man8/mandb.8.gz
de:/usr/share/man/de/man8/catman.8.gz
de:/usr/share/locale/de
de:/usr/share/locale/de/LC_MESSAGES
de:/usr/share/locale/de/LC_MESSAGES/man-db.mo
it:/usr/share/locale/it
it:/usr/share/locale/it/LC_MESSAGES
it:/usr/share/locale/it/LC_MESSAGES/man-db.mo
es:/usr/share/locale/es
es:/usr/share/locale/es/LC_MESSAGES
es:/usr/share/locale/es/LC_MESSAGES/man-db.mo

with this info, it can be trivial to do removal ...
alternatively, one could list ONLY directories:

es:/usr/share/man/es
it:/usr/share/man/it
de:/usr/share/man/de
de:/usr/share/locale/de
it:/usr/share/locale/it
es:/usr/share/locale/es

this is easier to maintain, but then you cannot divide docs by content
and you must divide them by language.
Maybe we can use a mix of these: if you list a directory, you mean also
all its content, otherwise list the single files.

> 
> - what happens in downgrade? (this should be trivial, right)
> 
> - what happens in remove or purge, no extra warnings or what?
> 
> - what happens if user changes his or her selection, how can
>   the system be updated (i.e. languages added or removed)?
> 
> - what about shared documentation? how to decide if languages
>   can be removed from shared docs? (shared == across machines)

not a problem, as you will putt "all" in the server, and "none" in the
clients.
hummm, in this case you probably don't want even the english!
Maybe we need a keyword to avoid installing ANY docs (as it is mounted
from a server). But maybe this should be handled differently from dpkg,
as it affects also other type of files ... something like "if fs is
remote mounted, don't write on it" ...

> 
> - how user changes the selection?

edit the /etc file;
run debconf with some option to force asking;
run some nice gnome frontend that reads the /etc file, the list of
locales and maybe some statistic about the number of docs in each lang
in the distribution ... 

> 
> Then we can think about implications, like installing and removing
> partial packages and keeping state of that.
> 
> Then we should know enough to prioritize the reqs and put
> them in different development cycles, and to decide which
> reqs will 'never' be implemented.
> 
> This should be done sooner or later, and it looks like to be an
> interesting job.

but it requires the cooperation of the dpkg maintainer.
Ian has always said that "partia installation" is in his todo queue, but
...

> 
> t.aa
> -- 
> The best bugs are put where nobody tests.  (Hans Shaeffer)

I'll banner that on all v13a_hp* I can find ...


fab
-- 
| fab@pukki.ntc.nokia.com     fpolacco@prosa.it    fpolacco@debian.org
| 6F7267F5 fingerprint 57 16 C4 ED C9 86 40 7B 1A 69 A1 66 EC FB D2 5E
| fabrizio.polacco@nokia.com                  gsm: +358 (0)40 707 2468


Reply to: