On 14/09/11 01:55 , Peter Dyballa wrote:
>
> Am 11.09.2011 um 17:18 schrieb Martin Costabel:
>
>> There exists a system-texlive-2010 package on the submission tracker
>> <http://sourceforge.net/tracker/index.php?func=detail&aid=3191785&group_id=17203&atid=414256>

I'll go over your observations in detail, because if we want to have a 
system-texlive package in Fink, it must interact correctly with other 
Fink packages. This is, after all, its only raison d'être.

> The packages produce some problems when I remove them *after* I had installed 
> and removed the marginally updated latex2html 2002-2-1_4 package. When I 
> install, it performs

I suppose you are talking about installing/removing latex2html here?

>       mktexlsr: Updating /sw/etc/texmf.local/ls-R...
>       mktexlsr: Done.
>
> When I remove, it performs:
>
>       mktexlsr: /sw/etc/texmf.local not a directory.
>       mktexlsr: Done.

This shows a serious problem with the system-texlive package (which I 
think was already present in the very first system-tetex package): It 
installs /sw/etc/texmf.local not as a directory, but as a symlink (to 
/usr/local/texlive/texmf-local). Then, if another package, like 
latex2html in this case, installs stuff into /sw/etc/texmf.local, this 
stuff in reality ends up in /usr/local/texlive/texmf-local. Latex2html 
still thinks it owns a directory /sw/etc/texmf.local.

> Upon installation some TEX, STY, DEF files are installed in 
> /sw/etc/texmf.local/tex/latex/html. Removing the package obviously removes 
> the whole /sw/etc/texmf.local tree, including /sw/etc/texmf.local/ls-R. I 
> can't see where in the INFO file this is coded…

Upon removal, any Fink package tries to remove everything in its file 
list, including directories. If a directory is not empty, because 
something else has installed files there, it is not removed. But if it 
is a symlink, it is removed.

> When I then remove the system-texlive-20XY package, it complains that it 
> can't tremove /sw/etc/texmf.local, because it's a directory, now with this 
> contents:
>
>       total 24
>       -rw-r--r--  1 root  admin  80 14 Sep 01:18 ls-R
>       lrwxr-xr-x  1 root  admin  30 14 Sep 01:19 texmf-local ->  
> /usr/local/texlive/texmf-local
>       lrwxr-xr-x  1 root  admin  19 14 Sep 01:19 texmf.local ->  
> /sw/etc/texmf.local

I don't quite understand what is the situation where you see this. Just 
before, you said the whole /sw/etc/texmf.local was removed, and now you 
find it non-empty. Did you reinstall system-texlive in the meantime?

But this shows another problem with the package: It creates the symlinks 
between directories with a simple "ln -s". This will fail if the target 
already exists, because then the symlink will be created *inside* the 
target directory. Thus if you already have symlinks

/sw/share/texmf.local -> /sw/etc/texmf.local
/sw/etc/texmf.local -> /usr/local/texlive/texmf-local

and then the package goes ahead and executes

   ln -s /usr/local/texlive/texmf-local %p/etc/texmf.local
   ln -s %p/etc/texmf.local %p/share/texmf.local

both of these symlinks will end up inside 
/usr/local/texlive/texmf-local, and this is what you are seeing when you 
run ls -l inside /sw/etc/texmf.local.

The package needs to check whether any of /sw/etc/texmf.local and 
/sw/share/texmf.local already exists, either as a symlink or a 
directory, and then take appropriate actions.

It also needs to make directory symlinks using "ln -ns", so that the 
symlink will not end up inside the target directory, but throws an error 
if the target directory exists.

> (Another sym-link has been created in /sw/share:
>
>       lrwxr-xr-x 1 root admin 19 13 Sep 20:50 texmf.local ->  
> /sw/etc/texmf.local)
>
> Another complaint is that a sym-link /sw/texmf.cnf can't be created.

This something I don't understand. The package should not create 
/sw/texmf.cnf. This is illegal in Fink's file system, and it is useless 
for TeX, which will never look at such a file.
It should perhaps become /sw/share/texmf/web2c/texmf.cnf?

> Repeating the removal finishes without any complaints. Upon re-installation 
> more complaints are emitted:
>
>       /sw/etc/texmf.local and /sw/share/texmf can't removed, because 
> directories,
>       sym-link /sw/etc/texmf.local/texmf-local not creating, because file 
> exists
>
> Some editing of
>
>       PostInstScript:<<
>       ln -s /usr/local/texlive/%v/texmf %p/share/texmf
>         ln -s /usr/local/texlive/texmf-local %p/etc/texmf.local
>         ln -s %p/etc/texmf.local %p/share/texmf.local
>         ln -s /usr/local/texlive/%v/texmf/web2c/texmf.cnf %p
>         ln -s /usr/local/texlive/%v/bin/universal-darwin/mktexlsr 
> %p/bin/mktexlsr
>       <<
>       
>       PreRmScript:<<
>       rm %p/share/texmf
>         rm %p/etc/texmf.local
>         rm %p/share/texmf.local
>         rm %p/texmf.cnf
>         rm %p/bin/mktexlsr
>       <<
>
> might be necessary. IMO the PreRmScript is obsolete: Where do these files 
> come from when no TeX is installed?

The system-texlive package thinks they are symlinks, and because they 
are created in the PostInstScript, they are not in the file list of the 
package, so they are not automatically removed. The situation would be 
different if the symlinks were not created in the PostInstScript, but in 
the InstallScript. Then they would be removed automatically (by dpkg) 
upon package removal. I think they should be created (or not, if the 
directories already exist, see above) not in the PostInstScript, but in 
the InstallScript, which is more robust. Then the PreRmScript would be 
unnecessary.

> The situation is this that automatic removal of the already installed 
> system-texlive-20XY when installing another system-texlive-20XY package 
> fails. The message is:
>
>       dpkg: regarding .../system-texlive-2011_2011-1_darwin-i386.deb 
> containing system-texlive-2011:
>        system-texlive-2011 conflicts with texlive
>         system-texlive-2010 provides texlive and is broken due to postinst 
> failure.
>
> but no "texlive" package is listed as installed. (I hope I can clear the 
> situation I'm in.)

The "texlive" package comes from the "Provides:" field in the 
system-texlive package. This and the "conflicts" is normal. The problem 
is that the PreRmScript fails and the package therefore cannot be 
removed cleanly. This is a bad situation, where you can first try

  sudo dpkg -r --force-remove-reinstreq system-texlive

If this fails, too, edit (carefully!) the database file
/sw/var/lib/dpkg/status
and remove the paragraph that talks about system-texlive

-- 
Martin

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerry&reg; mobile platform with sessions, labs & more.
See new tools and technologies. Register for BlackBerry&reg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to