This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygport: How to suppress automatic postinstall script additions
On Mon, 2012-03-05 at 12:59 -0500, Ken Brown wrote:
> On 3/5/2012 12:32 PM, Yaakov (Cygwin/X) wrote:
> > OK, here's the fix:
> >
> > 1) Install cygport-0.10.8.1-1 (released just moments ago).
> >
> > 2) Bump collection-basic to $today and build it with newly-downloaded
> > sources.
> >
> > 3) Bump collection-langcjk to $today, add 'jfontmaps' to ARCH_PKGS, and
> > build with newly-downloaded sources.
> >
> > After installing the new collection-basic with the new postinstall
> > script, the aforementioned xetex test works.
>
> In your new postinstall script, I wonder if it would be better to delete
> /etc/texmf/web2c/updmap.cfg rather than editing it. The reason is that
> the master updmap.cfg in /usr/share/texmf/web2c may have changed due to
> the addition or deletion of TL packages containing fonts, and I don't
> think these changes get propagated to /etc/texmf/web2c/updmap.cfg.
The problem with that is any settings in TEXMFSYSCONFIG/web2c/updmap.cfg
would be lost. What about the attached patch for cygport?
Yaakov
diff --git a/cygclass/texlive.cygclass b/cygclass/texlive.cygclass
index b27ab9a..501ff56 100644
--- a/cygclass/texlive.cygclass
+++ b/cygclass/texlive.cygclass
@@ -104,7 +104,9 @@ SRC_DIR="."
# Installs the TeX Live package file(s) into their respective locations.
#****
texlive_install() {
- local f pkg pkgs tlpobj dst src
+ local f pkg pkgs tlpobj dst src map
+
+ __config_set texlive_updmaps
for pkg in ${TEXLIVE_TEXMF_PKGS}
do
@@ -168,6 +170,12 @@ texlive_install() {
dodir /usr/share/${dst%/*}
__doinstall ${perm} $src /usr/share/${dst%/*}
done
+
+ for map in $(grep -E 'execute add[^ ]*Map' $tlpobj \
+ | sed 's/execute add\([^ ]*\) */\1=/g')
+ do
+ __config_set texlive_updmaps "$(__config_get texlive_updmaps) $map"
+ done
done
}
diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart
index aa26c15..08a964f 100644
--- a/lib/src_postinst.cygpart
+++ b/lib/src_postinst.cygpart
@@ -263,17 +263,27 @@ __prep_mateconf_schemas() {
__prep_texlive() {
dodir /etc/postinstall
cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF
- if [ -x /usr/bin/mktexlsr ] && \\
- [ ! -f /usr/share/texmf-dist/ls-R -o \\
+ if [ ! -f /usr/share/texmf-dist/ls-R -o \\
\$(find /usr/share/texmf{,-dist} -mindepth 2 -type f -cnewer /usr/share/texmf-dist/ls-R 2>/dev/null | wc -l) -gt 0 ]
then
- /usr/bin/mktexlsr
- if test -f /etc/texmf/web2c/updmap.cfg; then
- /usr/bin/sed -i -e 's/^#! //g' /etc/texmf/web2c/updmap.cfg
- fi
+ runfmtutil=1
+ fi
+ /usr/bin/mktexlsr
+ if [ ! -f /etc/texmf/web2c/updmap.cfg ]
+ then
/usr/bin/updmap-sys --syncwithtrees
+ fi
+ for map in $(__config_get texlive_updmaps)
+ do
+ /usr/bin/updmap-sys --nomkmap --enable \$map
+ done
+ if [ -n "\$map" ]
+ then
/usr/bin/updmap-sys --nohash
/usr/bin/mktexlsr
+ fi
+ if [ -n "\$runfmtutil" ]
+ then
/usr/bin/fmtutil-sys --all
/usr/bin/mktexlsr
fi
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple