Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Bug#299936: updmap.cfg, update-updmap and removed packages..

 
   Linux (Home) -> Tetex RSS
Next:  Bug#486779: RFP: libspreadsheet-xlsx-perl -- Perl..  
Author Message
Frank Küster

External


Since: May 03, 2006
Posts: 281



(Msg. 1) Posted: Thu Aug 04, 2005 10:50 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach
Archived from groups: linux>debian>bugs>dist, others (more info?)

Hi,

I had an idea for a totally different approach to the problem that
removed packages leave their map files on the system, but must
deactivate them. I'm not yet convinced that it is better than what
Florent has designed, especially because I haven't completely written it
down yet - but if it works, it would have certain advantages.

The main advantage is the reason why I'm sending this to this bug
(Original title: updmap-sys --enable-map should act on 00updmap.cfg).
The problem in this bug is that according to upstream's documentation
(and, of course, many resources on the web and in newsgroups and mailing
lists) one can permanently enable map files with "updmap[-sys] --enable
[Mixed]Map=...". This edits updmap.cfg, and of course will be
overwritten by update-updmap every time this command is run.

In the original bug report, I suggested that we patch updmap-sys to act
on 00updmap.cfg instead. However, since map entries can be in different
files in updmap.d, it is unclear on which file in this directory it
should actually act. This is even more severe for --disable, which
would need to parse all cfg files in updmap.d. If people start
combining updmap-sys --enable with editing of files in that directory,
the outcome is even more complicated (there may be two entries for one
map file...).

Furthermore such a patch to updmap-sys will lead to further code
divergence from upstream, making maintenance of the code more
difficult.


Therefore I propose the following scheme:

updmap.cfg is a configuration file in /etc/texmf/. update-updmap does
not just concatenate the files in updmap.d; instead it parses them, and
acts on each Map line (I'm going to say Map in the following, the same
holds for MixedMap of course) in turn. Basically, it runs "updmap-sys
--enable Map=..." for every line, and writes the same information into a
file in /var/, let's call it fontmap.var. The purpose of this file is
to be able to compare the actual setting with the setting provided by
the previous conffile that has just been replaced.

Preservation of local configuration during upgrade or while a package is
removed works as follows:

1. For every map line in updmap.d/*.cfg, a line is written to
fontmap.var. The line indicates whether the corresponding package is
installed or removed, and what the setting is in the conffile in
updmap.d. Let's say there's a I for installed and a R for removed, a
whitespace and the line itself. In the case of R, an additional + or
- follows the R to indicate whether there was a discrepancy between
the conffile setting and the local setting.

2. If a package was purged and is now installed, update-updmap does not
find any information about the map lines in fontmap.var. Therefore

2.1) for "Map enabled.map" in updmapd.d/*.cfg it writes to fontmap.var

I Map enabled.map

and calls

updmap-sys --enable Map enabled.map

2.2) for "#! Map disabled.map" in updmapd.d/*.cfg it writes to fontmap.var

I #! Map disabled.map

and calls

updmap-sys --enable Map disabled.map # to add a line at all
updmap-sys --disable disabled.map # to disable it


3. If the user changes the settings in updmap.cfg, the next time
update-updmap acts on this Map line it notices that the setting is
different in fontmap.var and updmap.cfg and respects the setting in
updmap.cfg, i.e. it doesn't call updmap-sys --[en|dis]able.

4. If the conffile in updmap.d changes (either because the package
changes, or because the local admin changes it and runs
update-updmap) it goes like this:

4.1) conffile changes from enabled to disabled

4.1.1) setting in updmap.cfg and fontmap.var is enabled (i.e. no
local change): Change setting to disabled in both files

4.1.2) enabled in fontmap.var, disabled in updmap.cfg (i.e. local
change): Change setting to disabled in fontmap.var. Now all
three files have the same information, no problem in the
future

4.2) conffile changes from disabled to enabled

4.2.1) settings in updmap.cfg and fontmap.var are diabled (i.e. no
local change): Change setting to disabled in both files

4.2.2) disabled in fontmap.var, enabled in updmap.cfg (i.e. local
change): Change setting to enabled in fontmap.var. Now all
three files have the same information, no problem in the
future

5. If the file is removed, but not purged, updmap-sys is called with
--disable in all cases, but the current state in updmap.cfg is
written into fontmap.var, with R prepended instead of I. If this
means a change to the setting (i.e. there was a local change), R- is
written R+ otherwise.

6. If after removal the package is reinstalled

6.1) with a conffile setting now enabled:

6.1.1) setting in fontmap.var is

R+ #!...
(i.e. previously map file was disabled in conffile and
updmap.cfg, no local changes):

Enable in upmap.cfg and fontmap.var

6.1.2) setting in fontmap.var is

R- #!...
(i.e. previously map file was enabled in conffile but
disabled in updmap.cfg, local change):

Disable in upmap.cfg, enable in fontmap.var

6.1.3) setting in fontmap.var is

R+ Map...
(i.e. previously map file was enabled in conffile and
in updmap.cfg, no local change):

Enable in upmap.cfg and fontmap.var

6.1.3) setting in fontmap.var is

R- Map...
(i.e. previously map file was disabled in conffile but
enabled in updmap.cfg, local change):

Enable in upmap.cfg and fontmap.var

6.2) with a conffile setting now disabled:

6.2.1) setting in fontmap.var is

R+ #!...
(i.e. previously map file was disabled in conffile and
updmap.cfg, no local changes):

Disable in upmap.cfg and fontmap.var

6.2.2) setting in fontmap.var is

R- #!...
(i.e. previously map file was enabled in conffile but
disabled in updmap.cfg, local change):

Disable in upmap.cfg and fontmap.var

6.2.3) setting in fontmap.var is

R+ Map...
(i.e. previously map file was enabled in conffile and
in updmap.cfg, no local change):

Disable in upmap.cfg and fontmap.var

6.2.3) setting in fontmap.var is

R- Map...
(i.e. previously map file was disabled in conffile but
enabled in updmap.cfg, local change):

Enable in upmap.cfg, disable in fontmap.var


Uff. I think this would work.

It would get even nicer if we enhance updmap's --enable with a
--comment=".." option that writes the comment line before the Map line
- surely Thomas Esser would accept such a patch.

And it makes it trivial to swap map files between packages, they simply
don't care about settings in files in updmap.d, because the actual local
setting is always in updmap.cfg (or fontmap.var after a removal)

Good night...
Frank

--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Back to top
Login to vote
Florent Rougon

External


Since: Sep 17, 2003
Posts: 75



(Msg. 2) Posted: Fri Aug 05, 2005 5:10 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Frank Küster <frank.DeleteThis@kuesterei.ch> wrote:

> The main advantage is the reason why I'm sending this to this bug
> (Original title: updmap-sys --enable-map should act on 00updmap.cfg).
> The problem in this bug is that according to upstream's documentation
> (and, of course, many resources on the web and in newsgroups and mailing
> lists) one can permanently enable map files with "updmap[-sys] --enable
> [Mixed]Map=...".

But this is Debian here. We are better than that, you know. Smile

> In the original bug report, I suggested that we patch updmap-sys to act
> on 00updmap.cfg instead. However, since map entries can be in different
> files in updmap.d, it is unclear on which file in this directory it
> should actually act. This is even more severe for --disable, which
> would need to parse all cfg files in updmap.d. If people start
> combining updmap-sys --enable with editing of files in that directory,
> the outcome is even more complicated (there may be two entries for one
> map file...).

Ack.

> Therefore I propose the following scheme:

[...]

> 2. If a package was purged and is now installed, update-updmap does not
> find any information about the map lines in fontmap.var. Therefore

So, when a font package is purged, it has to make sure that every map
line that is not in updmap.d/ is removed from fontmap.var.

[...]

> 3. If the user changes the settings in updmap.cfg, the next time
> update-updmap acts on this Map line it notices that the setting is
> different in fontmap.var and updmap.cfg and respects the setting in
> updmap.cfg, i.e. it doesn't call updmap-sys --[en|dis]able.

Changing a setting in updmap.cfg could also bring updmap.cfg in sync
with fontvar.map WRT this setting, and you would then infer that the
admin want to follow the config changes brought by the conffile in
updmap.d (whenever it is updated in the .deb), which is not necessarily
true...

> 4.1.2) enabled in fontmap.var, disabled in updmap.cfg (i.e. local
> change): Change setting to disabled in fontmap.var. Now all
> three files have the same information, no problem in the
> future

Here, the user wanted the map to be disabled. Since the pkg maintainer
happens to take the same decision at some point, the user's config will
now follow that of the .deb: reenabled whenever it is reenabled in the
..deb.

Of course, the same problem happens in general with conffiles. If you
happen to craft the exact same conffile as that distributed by the .deb
you have installed, then your config will follow that of the .deb in
next releases, unless there is a check on timestamps that I am not aware
of. But managing to craft the exact same conffile by sheer chance is in
general an exceptional event.

However, here, if a map was activated by default in a .deb you have
installed, and you later manually updmap-sys --disable then --enable it
(or simply enable it in the file under updmap.d/), you will have crafted
by "chance" the same config as shipped in the .deb and therefore, your
config will follow that of the .deb across releases, whether you like it
or not.

Similar thing for disabling, except that if you do it manually in
updmap.d/, you can use something else than #!, so that the system knows
that you really want the map disabled. However, if you run updmap-sys
--enable then --disable and the map was disabled as shipped in the .deb,
you have the same problem as in the previous paragraph.

> 4.2) conffile changes from disabled to enabled
>
> 4.2.1) settings in updmap.cfg and fontmap.var are diabled (i.e. no
> local change): Change setting to disabled in both files
^^^^^^^^
enabled, I suppose

> 4.2.2) disabled in fontmap.var, enabled in updmap.cfg (i.e. local
> change): Change setting to enabled in fontmap.var. Now all
> three files have the same information, no problem in the
> future

And your config will then follow the .deb, whether you like it or not...

[...]

> Uff. I think this would work.

Hmmm. You also have to deal with user additions to the files (possibly
user-added files) in updmap.d, somehow special-case 00updmap.cfg
(doesn't contain Map nor MixedMap lines; the options could be changed
there or in updmap.cfg directly, possibly conflicting) and with per-user
setups in $HOME...

I find all this rather complicated, but you may disagree. Smile

--
Florent
Back to top
Login to vote
Frank Küster

External


Since: May 03, 2006
Posts: 281



(Msg. 3) Posted: Sun Aug 07, 2005 8:10 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Florent Rougon <f.rougon.DeleteThis@free.fr> wrote:

> Hi,
>
> Frank Küster <frank.DeleteThis@kuesterei.ch> wrote:
>
>> The main advantage is the reason why I'm sending this to this bug
>> (Original title: updmap-sys --enable-map should act on 00updmap.cfg).
>> The problem in this bug is that according to upstream's documentation
>> (and, of course, many resources on the web and in newsgroups and mailing
>> lists) one can permanently enable map files with "updmap[-sys] --enable
>> [Mixed]Map=...".
>
> But this is Debian here. We are better than that, you know. Smile

But it's in the docs, mailing lists, README files, and people will try
it.

>> Therefore I propose the following scheme:
>
> [...]
>
>> 2. If a package was purged and is now installed, update-updmap does not
>> find any information about the map lines in fontmap.var. Therefore
>
> So, when a font package is purged, it has to make sure that every map
> line that is not in updmap.d/ is removed from fontmap.var.

Ups, yes, this is a little difficult, since the file in updmap.d is
gone. I hope we don't end up in rewriting updmap...

>> 3. If the user changes the settings in updmap.cfg, the next time
>> update-updmap acts on this Map line it notices that the setting is
>> different in fontmap.var and updmap.cfg and respects the setting in
>> updmap.cfg, i.e. it doesn't call updmap-sys --[en|dis]able.
>
> Changing a setting in updmap.cfg could also bring updmap.cfg in sync
> with fontvar.map WRT this setting, and you would then infer that the
> admin want to follow the config changes brought by the conffile in
> updmap.d (whenever it is updated in the .deb), which is not necessarily
> true...

Well, yes. If the package's choice was "enable", the local choice was
first "disable" and then "enable" again, and now the package decides
"disable", it would be disabled. But often there is a reason why a
package changes settings (like no longer shipping the font, but still
offering sample Map lines for the people who keep it or buy it). And
anyway, this is exactly the same as if updmap.cfg was managed by dpkg:
If the file is unchanged compared to the last packaged version, the
changed version from the new package will be used, regardless whether
the admin ever touched it.

> Of course, the same problem happens in general with conffiles. If you
> happen to craft the exact same conffile as that distributed by the .deb
> you have installed, then your config will follow that of the .deb in
> next releases, unless there is a check on timestamps that I am not aware
> of. But managing to craft the exact same conffile by sheer chance is in
> general an exceptional event.
>
> However, here, if a map was activated by default in a .deb you have
> installed, and you later manually updmap-sys --disable then --enable it
> (or simply enable it in the file under updmap.d/), you will have crafted
> by "chance" the same config as shipped in the .deb and therefore, your
> config will follow that of the .deb across releases, whether you like it
> or not.

That's a good point.

> I find all this rather complicated, but you may disagree. Smile

Indeed it is. On the other hand, patching updmap --enable/disable to
work on Debian isn't less complicated, I fear. The only really easy
thing to do would be to change --enable/disable to just echo some
"please use update-updmap" message on stderr, and then do nothing.

Regards, Frank
--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Back to top
Login to vote
Florent Rougon

External


Since: Sep 17, 2003
Posts: 75



(Msg. 4) Posted: Sun Aug 07, 2005 10:30 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Frank Küster <frank.RemoveThis@debian.org> wrote:

> But it's in the docs, mailing lists, README files, and people will try
> it.

Yes...

> Indeed it is. On the other hand, patching updmap --enable/disable to
> work on Debian isn't less complicated, I fear.

I agree...

> The only really easy thing to do would be to change --enable/disable
> to just echo some "please use update-updmap" message on stderr, and
> then do nothing.

That sounds appealing. Smile

--
Florent
Back to top
Login to vote
Norbert Preining

External


Since: Oct 12, 2005
Posts: 326



(Msg. 5) Posted: Tue Aug 23, 2005 2:20 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi all!

Ok, another proposal, after I have read through the whole bug report:

A map file is either enabled or not, and either in automatic mode or
not, ie. auto=managed by the system, manual= managed by root

enabled/disabled is shown by #! starting in updmap.cfg

at the end of the map line we save the system state and the current
mode, eg with
# sys mode
eg
# 1 auto
# 0 auto
# 1 manual
# 0 manual
meaning that
1 enabled in auto mode
0 disabled in auto mode

auto this line is automatically managed
manual this line is manually managed

we have the following 5 actions:
enable
disable
system-enable
system-disable
auto (switches back to auto mode)

So we have the states

{auto,manual}/{enabled,disabled}

and have to define transitions for these states for the 5 actions:

A=auto
M=manual
E=enabled
D=disabled

Transitions:

action enable -E->:
-------------------
all states -E-> M/E

action disable -D->:
--------------------
all states -D-> M/D

action system-enable -SE->:
---------------------------
this action also changes 0 -> 1
A/E -SE-> A/E
A/D -SE-> A/E
M/E -SE-> M/E
M/D -SE-> M/D

action system-disable -SD->:
----------------------------
this action also changes 1 -> 0
A/E -SD-> A/D
A/D -SD-> A/D
M/E -SD-> M/E
M/D -SD-> M/D

action auto -A->:
-----------------
A/E -A-> A/E
A/D -A-> A/D
M/E -A-> A/use info from 0/1
M/D -A-> A/use info from 0/1

As long as we leave the file in /var/lib/ somewhere and the user does
NOT edit the file by hand, messing up everything, this should be enough
to solve the problems.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining AT logic DOT at> Università di Siena
sip:preining@at43.tuwien.ac.at +43 (0) 59966-690018
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
You're bound to be unhappy if you optimize everything.
--- Donald E. Knuth


--
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Login to vote
Frank Küster

External


Since: May 03, 2006
Posts: 281



(Msg. 6) Posted: Tue Aug 23, 2005 3:00 pm
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Norbert Preining <preining RemoveThis @logic.at> wrote:

> Hi all!
>
> Ok, another proposal, after I have read through the whole bug report:
>
> A map file is either enabled or not, and either in automatic mode or
> not, ie. auto=managed by the system, manual= managed by root
>
> enabled/disabled is shown by #! starting in updmap.cfg
>
> at the end of the map line we save the system state and the current
> mode, eg with
> # sys mode

Again, without looking at the details (I should be working instead of
reading mail): You want to append this to updmap.cfg (or any other
configuration file) with updmap --enable/--disable/... And you are sure
that this is

- easier to implement than what I proposed and
- still maintainable when upstream updmap changes

Regards, Frank
--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Back to top
Login to vote
Frank Küster

External


Since: May 03, 2006
Posts: 281



(Msg. 7) Posted: Wed Aug 24, 2005 10:10 am
Post subject: Bug#299936: updmap.cfg, update-updmap and removed packages: Yet an other approach [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Norbert Preining <preining.RemoveThis@logic.at> wrote:

> As long as we leave the file in /var/lib/ somewhere and the user does
> NOT edit the file by hand, messing up everything, this should be enough
> to solve the problems.

But this means that there is no longer a configuration file for TeX font
usage, everything must be done by running commands. And a user who only
backs up /home and /etc (and maybe /var/lib/dpkg) has no chance to
restore the information, although it is "configuration".

Regards, Frank
--
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Bug#335210: tetex-bin: updmap-sys can't find dvips35.map - Package: tetex-bin Version: 3.0-10 Severity: important Hello. For a few days now, I've been seeing this error : When I apt-get dist-upgrade, or when I call updmap-sys : ------ updmap-sys: This is updmap-sys, version 1107552857-debian updmap-sys:..

Bug#335682: tetex-base: Only root can read /etc/texmf/updm.. - Package: tetex-base Version: 3.0-10 Severity: normal # ls -l /etc/texmf/updmap.d/00updmap.cfg -rw------- 1 root root 2787 2005-10-24 12:46 /etc/texmf/updmap.d/00updmap.cfg This seems overly restrictive - there's no reason to hide this from users...

SVN tetex commit: r320 - in tex-common/trunk: conf/updmap... - Author: frank Date: 2005-11-04 13:48:29 +0000 (Fri, 04 Nov 2005) New Revision: 320 Modified: tex-common/trunk/conf/updmap.d/00updmap.cfg tex-common/trunk/debian/changelog tex-common/trunk/debian/md5sums/00updmap.cfg.md5sum Log: * Add the md5sum...

SVN unreleased packages suggestion - Based on experience with other packages, I'd like to suggest that from now on, we keep the distribution setting in the changelog as "UNRELEASED" until we are actually about to compile and upload a package. In that way, it will be clear what is...

libkpathsea3 removal: Please trigger bin-NMU recompilation.. - Dear release team, libkpathsea3 is obsolete, and we're hoping to be able to remove it from the archive for etch. A couple of packages still depend on it. Since the API hasn't changed, and libkpathsea4-dev now provides libkpathsea-dev, a rebuild of the...
       Linux (Home) -> Tetex All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact