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

Bug#366107: [Helge Hafting] Re: Bug#366107: Installing tex-common gets stuck after giving invalid group for owning fonts



--- Begin Message ---
Frank Küster wrote:

>Helge Hafting <helgehaf@aitel.hist.no> wrote:
>
>  
>
>>Package: tex-common
>>Version: 0.21
>>Severity: normal
>>
>>
>>I did a routine dist-upgrade.
>>tex-common asked what group should own the font cache, and I
>>misspelled the group name.
>>
>>The first thing that happened was chown balking at the invalid
>>group name, causing a fault in "post-installation".
>>    
>>
>
>Thanks for reporting, this is something we never tried.
>
>  
>
>>My next try, which I consider excessive:
>>dpkg --force-depends --remove tex-common
>>apt-get install tex-common
>>And it _still_ tried to use the bad group without giving
>>me a chance to fix it.
>>    
>>
>
>That is expected - debconf settings are only changed upon purge, and so
>is the "seen" status of questions.
>
>  
>
>>Final attempt, fortunately tex-common doesn't have
>>that many settings:
>>dpkg --force-depends --purge tex-common
>>apt-get install tex-common
>>
>>Still no questions asked, 
>>    
>>
>
>Now this is surprising.  I'll try that out.
>
>  
>
>>preconfiguring failed, 
>>    
>>
>
>Can you tell us how?
>  
>
There was a message to this effect.  I'll retry to get the exact one:
(After another forced purge)
#apt-get install tex-common
Get a message box:
Change of name of files in /etc/texmf/texmf.d/
texmf.cnf has previously been generated by update-texmf from all files
in /etc/texmf/texmf.d/. Now update-texmf is changed and only reads files
with extension '.cnf'.
So if you had any private file in /etc/texmf/texmf.d/, then you should
add '.cnf' to its name; for example, 22mymacro => 22mymacro.cnf.

I pressed enter on this one, there are no options here.

No questions asked, just these messages on the console:
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  tex-common
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 0B/278kB of archives.
After unpacking 795kB of additional disk space will be used.
Preconfiguring packages ...
tex-common failed to preconfigure, with exit status 1
Selecting previously deselected package tex-common.
(Reading database ... 214062 files and directories currently installed.)
Unpacking tex-common (from .../tex-common_0.21_all.deb) ...
Setting up tex-common (0.21) ...

Creating config file /etc/texmf/texmf.d/05TeXMF.cnf with new version

Creating config file /etc/texmf/texmf.d/15Plain.cnf with new version

Creating config file /etc/texmf/texmf.d/45TeXinputs.cnf with new version

Creating config file /etc/texmf/texmf.d/55Fonts.cnf with new version

Creating config file /etc/texmf/texmf.d/65BibTeX.cnf with new version

Creating config file /etc/texmf/texmf.d/75DviPS.cnf with new version

Creating config file /etc/texmf/texmf.d/85Misc.cnf with new version

Creating config file /etc/texmf/texmf.d/90TeXDoc.cnf with new version

Creating config file /etc/texmf/texmf.d/95NonPath.cnf with new version

Creating config file /etc/texmf/updmap.d/00updmap.cfg with new version

Creating config file /etc/texmf/texmf.cnf with new version

The package got properly installed despite the preconfigure failure,
so dpkg-reconfigure works fine.

dpkg-reconfigure tex-common gives me the same dialog about
filenames in texmf.d, but this time I get the "manage permissions
of font cache by debconf" dialog as the next step.
Perhaps the preconfigure failure message is about the failure to
bring up this dialog?

>>Now, the ideal fix would be a package system that offers
>>the option of reconfiguring packages that fail post-installation.
>>    
>>
>
>That would be a nice add on, but on the other hand postinst scripts
>should never fail (or if they do, they should clearly indicate why and
>how to fix this).
>  
>
Not really an add-on, but a change to dpkg-reconfigure. 
Post-installs that never fail is even better, but is that goal realistic
for *all* of debian?

>  
>
>>A nice fix for tex-common, would be to do minimal validation
>>of the group name entered.  For example, see if
>>"getent groupname" works.  Shellscript test:
>>
>>if getent group $GROUPNAME ; then echo ok ; else echo bad ; fi
>>
>>This works for me, of course you want to do better than "echo",
>>i.e. bring up the group dialog box again on failure.
>>    
>>
>
>That sounds like a very good way to do it; many thanks.
>
>  
>
>>-- debconf-show failed
>>    
>>
>
>Did you notice that?  Maybe something else is also broken with respect
>to debconf.
>  
>
No, I didn't see that.  It was in the autogenerated part of the report.

I tried debconf-show tex-common and got:
$ debconf-show tex-common
debconf: DbDriver "passwords" warning: could not open 
/var/cache/debconf/passwords.dat: Permission denied
* tex-common/groupname: ansatt
  tex-common/check_texmf_wrong:
  tex-common/check_texmf_missing:
* tex-common/managecache: true
* tex-common/cnf_name:

Running it as root gets rid of the error message, and otherwise
produce the same output.  I don't know what else to test
here, and wheter it matters.  The file seems to contain cleartext
passwords for various packages (such as slapd) that ask for
passwords during install. Clearly not readable by non-root users,
and I usually run reportbug as a normal user.

Helge Hafting



--- End Message ---

-- 
Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX)

Reply to: