View Single Post
Posts: 62 | Thanked: 18 times | Joined on Dec 2009 @ Missouri, USA
#51
Originally Posted by TA-t3 View Post
Yes. Note, though, the part in the original package with the .path file which my original description said to copy to your /home/user/.profile file. You will want to edit and update that file (it's currently in usr/local/teTeX/) to make the setup consistent. And if you do, generate a new MD5sum and update DEBIAN/md5sums (actually, you will want to re-generate that file altogether because all the paths will be changed).

And finally, edit DEBIAN/postinstall

And be aware of potential issues with a re-installed version of your repackaged file, e.g. your existing edit of your .profile.
@TA-t3:

OK. It's almost ready, but after installing the new .deb, the postinstall script does not seem to be executed.

I did as you instructed. I expanded the contents to a folder tmp/ . To have the new installation under /opt, I moved all the files in tmp/usr/ to tmp/opt/ and deleted the folder tmp/usr . Then I edited the following files: tmp/opt/local/teTeX/.path, tmp/DEBIAN/postinstall, and tmp/opt/local/maemotex/070802/texmf/web2c/texmf.cnf to point to the new path.

(I actually missed the last one the first time and after installing it, pdflatex couldn't find something.)

Checking the contents of the .deb as you said, I realized there were two symlinks that needed to be recreated to point to the new path, so I recreated them, the files are:
tmp/opt/local/maemotex/070802/texmf/web2c/pdflatex.fmt and tmp/opt/local/maemotex/070802/texmf/web2c/pdftex.pool.

I also updated the md5sums file.

When I tried installing this new version I noticed that the DEBIAN/postinstall script did not run, so /etc/profile was not updated and neither were the tex filename databases (some files called ls-R that are regenerated by running the command texhash), so I did all this manually as root. I have no idea what happened, because I remember that the file /etc/profile was updated after I first installed your version a3.

I also realized that for the local texmf tree, it seems better to create a folder /home/user/texmf which contains symlinks to folders in /home/user/MyDocs/localtexmf/ and one actual file, /home/user/texmf/ls-R , which should be owned by user:users . This file contains the texmf filename database of the local texmf tree. It should updated with the command texhash after any changes to the localtexfm tree.

At this point, pdflatex works fine, and the contents of my localtexmf folder can be updated into the texmf filename database. The only concern is the postinstall file not running when installing. So the contents of /etc/profile that I edited manually will not be removed if the package is uninstalled.

Any ideas? Thanks,