Author: preining-guest Date: 2006-10-09 21:18:04 +0000 (Mon, 09 Oct 2006) New Revision: 1758
Modified: tex-common/trunk/debian/changelog tex-common/trunk/scripts/update-fontlang Log: add additional check for shadowing of files Modified: tex-common/trunk/debian/changelog =================================================================== --- tex-common/trunk/debian/changelog 2006-10-09 21:00:50 UTC (rev 1757) +++ tex-common/trunk/debian/changelog 2006-10-09 21:18:04 UTC (rev 1758) @@ -1,9 +1,11 @@ tex-common (0.33~1) unreleased; urgency=medium * Fix syntax error in debianize-updmap (closes: #391976). Also, the - logic in the script has been fixed, so that it actually works [frank] + logic in the script has been fixed, so that it actually works [frank] + * Add an additional check to update-* scripts in case users shadow their + generated files with files in TEXMFCONFIG. [preining] - -- Frank Küster <[EMAIL PROTECTED]> Mon, 9 Oct 2006 20:40:45 +0200 + -- Norbert Preining <[EMAIL PROTECTED]> Mon, 9 Oct 2006 23:16:38 +0200 tex-common (0.32) unstable; urgency=medium Modified: tex-common/trunk/scripts/update-fontlang =================================================================== --- tex-common/trunk/scripts/update-fontlang 2006-10-09 21:00:50 UTC (rev 1757) +++ tex-common/trunk/scripts/update-fontlang 2006-10-09 21:18:04 UTC (rev 1758) @@ -29,7 +29,9 @@ CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf" EXT="cnf" MEMORY_DIR=/var/lib/tex-common/language-cnf - SYSWIDE_VARD=/var/lib/texmf/tex/generic/config + SYSPATH_BASE=/var/lib/texmf + PATH_COMPONENT=tex/generic/config + SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT" DEFAULT_OUTPUTFILE_BASENAME=language.dat SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME" CC="%" # for COMMENTCHAR @@ -43,7 +45,9 @@ CHECKFILE="$SYSWIDE_CONFDIR/00updmap.cfg" EXT="cfg" MEMORY_DIR=/var/lib/tex-common/fontmap-cfg - SYSWIDE_VARD=/var/lib/texmf/web2c + SYSPATH_BASE=/var/lib/texmf + PATH_COMPONENT=web2c + SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT" DEFAULT_OUTPUTFILE_BASENAME=updmap.cfg SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME" CC="#" @@ -56,7 +60,9 @@ CHECKFILE="$SYSWIDE_CONFDIR/00tex.cnf" EXT="cnf" MEMORY_DIR=/var/lib/tex-common/fmtutil-cnf - SYSWIDE_VARD=/var/lib/texmf/web2c + SYSPATH_BASE=/var/lib/texmf + PATH_COMPONENT=web2c + SYSWIDE_VARD="$SYSPATH_BASE/$PATH_COMPONENT" DEFAULT_OUTPUTFILE_BASENAME=fmtutil.cnf SYSWIDE_DEFAULT_OUTPUTFILE="$SYSWIDE_VARD/$DEFAULT_OUTPUTFILE_BASENAME" CC="#" @@ -409,7 +415,26 @@ # Does $TEXMFVAR expand to a single directory? texmfvar=$(kpsewhich --expand-path '$TEXMFVAR') if ! echo "$texmfvar" | grep -e ':'; then - output_file="$texmfvar/web2c/$DEFAULT_OUTPUTFILE_BASENAME" + output_file="$texmfvar/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" + # it could be that there is a DEFAULT_OUTPUTFILE_BASENAME file + # in TEXMFCONFIG, which would be found instead of the + # output_file. So we check for this and give a warning in case + # the created file would be shadowed. + OLDIFS="$IFS" + IFS=: + for d in "$texmfconfig"; do + if [ -r "$d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME" ]; then + printf "\ +You are about to generate the file + $output_file +but at the same time you have a file + $d/$PATH_COMPONENT/$DEFAULT_OUTPUTFILE_BASENAME +which will shadow the former one. We will continue generating the first +file, but to make TeX and friends find it, you have to remove the later one.\n" + break + fi + done + IFS="$OLDIFS" else # We don't know what to do in this case, therefore: do nothing unless # the output file is specified with the correponding option. _______________________________________________ Pkg-tetex-commits mailing list Pkg-tetex-commits@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-tetex-commits