Package: lmodern Version: 0.92-7 Followup-For: Bug #290001 This patch modifies the lmodern package control files to work without tetex-bin or tetex-base.
update-updmap, mktexlsr and updmap are only run if they are available. On installation, /etc/texmf/updmap.d is created if it doesn't exist and deleted on removal if it is empty. Changed Depends to be defoma and either tetex-bin or xutils, not both. Removed tetex-base entirely. Added recommends for tetex-bin and xutils. I've successfully built, installed, removed and reinstalled this patched version on my tetex-free system, and X sees the Latin Modern fonts. *** lmodern.patch diff -ur lmodern-0.92.orig/debian/changelog lmodern-0.92/debian/changelog --- lmodern-0.92.orig/debian/changelog 2005-03-17 17:46:25.000000000 -0800 +++ lmodern-0.92/debian/changelog 2005-03-17 17:12:25.000000000 -0800 @@ -1,3 +1,18 @@ +lmodern (0.92-8) unstable; urgency=low + + * Added test in lmodern.postinst to not run update-updmap, mktexlsr, + and updmap if tetex-bin is not installed. + + * Create /etc/texmf/updmap.d in lmodern.{pre,post}inst if it doesn't + exist and remove it in lmodern.postrm if empty. + + * Changed depends to require tetex-bin or xutils, and defoma. + Removed depends on tetex-base + Added recommends for tetex-bin and xutils + Closes: #290001. + + -- Chirik <[EMAIL PROTECTED]> Thu, 17 Mar 2005 16:26:47 -0800 + lmodern (0.92-7) unstable; urgency=low * Patch {t1,qx,ts1}lmtt.fd so that the interword space is not diff -ur lmodern-0.92.orig/debian/control lmodern-0.92/debian/control --- lmodern-0.92.orig/debian/control 2005-03-17 17:46:25.000000000 -0800 +++ lmodern-0.92/debian/control 2005-03-17 16:33:17.000000000 -0800 @@ -8,7 +8,8 @@ Package: lmodern Section: tex Architecture: all -Depends: tetex-bin (>= 2), tetex-base (>= 2), defoma (>= 0.5.0), xutils (>= 4.1.0-12) +Depends: tetex-bin (>= 2) | xutils (>= 4.1.0-12), defoma (>= 0.5.0) +Recommends: tetex-bin (>= 2), xutils (>= 4.1.0-12) Conflicts: lm, lmodern-x11 Replaces: lm, lmodern-x11 Description: scalable PostScript fonts for european character sets diff -ur lmodern-0.92.orig/debian/lmodern.postinst lmodern-0.92/debian/lmodern.postinst --- lmodern-0.92.orig/debian/lmodern.postinst 2005-03-17 17:46:25.000000000 -0800 +++ lmodern-0.92/debian/lmodern.postinst 2005-03-17 18:03:15.310396471 -0800 @@ -6,9 +6,10 @@ # his modifications to $CONFIG_FILE when the package is removed (not purged) # and reinstalled. STATE_DIR="/var/lib/$PACKAGE" +CONFIG_DIR="/etc/texmf/updmap.d" CONFIG_FILE_BASE_NAME=10lmodern.cfg -CONFIG_FILE="/etc/texmf/updmap.d/$CONFIG_FILE_BASE_NAME" +CONFIG_FILE="$CONFIG_DIR/$CONFIG_FILE_BASE_NAME" SAVED_CONFIG_FILE="$STATE_DIR/${CONFIG_FILE_BASE_NAME}.saved" REF_CONFIG_FILE="/usr/share/lmodern/$CONFIG_FILE_BASE_NAME" @@ -21,15 +22,18 @@ update_fontmaps() { - update-updmap - # mktexlsr is recommended now because updmap relies heavily on Kpathsea - # to locate updmap.cfg and the map files. Also, it is better not to - # specify a particular directory to refresh because updmap.cfg is - # typically found in $VARTEXMF while the map files are in $TEXMFMAIN. - mktexlsr - echo -n "Running updmap... " - updmap --quiet - echo "done." + # Only run these is tetex-bin is installed + if which update-updmap >/dev/null 2>&1; then + update-updmap + # mktexlsr is recommended now because updmap relies heavily on Kpathsea + # to locate updmap.cfg and the map files. Also, it is better not to + # specify a particular directory to refresh because updmap.cfg is + # typically found in $VARTEXMF while the map files are in $TEXMFMAIN. + mktexlsr + echo -n "Running updmap... " + updmap --quiet || true + echo "done." + fi return 0 } @@ -38,6 +42,7 @@ configure|abort-upgrade|abort-remove|abort-deconfigure) if [ ! -f "$CONFIG_FILE" ] && [ -f "$SAVED_CONFIG_FILE" ]; then if [ ! -f "$NO_CONFIG_FILE" ]; then + [ ! -d "$CONFIG_DIR" ] && mkdir --mode=755 "$CONFIG_DIR" mv "$SAVED_CONFIG_FILE" "$CONFIG_FILE" else echo "\ diff -ur lmodern-0.92.orig/debian/lmodern.postrm lmodern-0.92/debian/lmodern.postrm --- lmodern-0.92.orig/debian/lmodern.postrm 2005-03-17 17:46:25.000000000 -0800 +++ lmodern-0.92/debian/lmodern.postrm 2005-03-17 18:02:29.844771150 -0800 @@ -4,9 +4,10 @@ # cf. preinst for the rationale behind this directory STATE_DIR="/var/lib/$PACKAGE" +CONFIG_DIR="/etc/texmf/updmap.d" CONFIG_FILE_BASE_NAME=10lmodern.cfg -CONFIG_FILE="/etc/texmf/updmap.d/$CONFIG_FILE_BASE_NAME" +CONFIG_FILE="$CONFIG_DIR/$CONFIG_FILE_BASE_NAME" SAVED_CONFIG_FILE="$STATE_DIR/${CONFIG_FILE_BASE_NAME}.saved" TEMP_CONFIG_FILE="$STATE_DIR/${CONFIG_FILE_BASE_NAME}.tmp" @@ -30,15 +31,18 @@ # tetex-bin is removed, so we must append "|| true" to their calls. try_to_update_fontmaps() { - update-updmap || true - # mktexlsr is recommended now because updmap relies heavily on Kpathsea - # to locate updmap.cfg and the map files. Also, it is better not to - # specify a particular directory to refresh because updmap.cfg is - # typically found in $VARTEXMF while the map files are in $TEXMFMAIN. - mktexlsr || true - echo -n "Running updmap... " - updmap --quiet || true - echo "done." + # Only run these is tetex-bin is installed + if which update-updmap >/dev/null 2>&1; then + update-updmap || true + # mktexlsr is recommended now because updmap relies heavily on Kpathsea + # to locate updmap.cfg and the map files. Also, it is better not to + # specify a particular directory to refresh because updmap.cfg is + # typically found in $VARTEXMF while the map files are in $TEXMFMAIN. + mktexlsr || true + echo -n "Running updmap... " + updmap --quiet || true + echo "done." + fi return 0 } @@ -47,6 +51,7 @@ remove|disappear) if [ -f "$CONFIG_FILE" ]; then mv "$CONFIG_FILE" "$SAVED_CONFIG_FILE" + [ -d "$CONFIG_DIR" ] && rmdir --ignore-fail-on-non-empty "$CONFIG_DIR" # It is necessary to test the absence of $SAVED_CONFIG_FILE in the # following line, otherwise the script would not be idempotent (think # of what happens if it is interrupted right here, in this comment, @@ -82,6 +87,9 @@ rm -f "$CONFIG_FILE" "$SAVED_CONFIG_FILE" "$TEMP_CONFIG_FILE" \ "$NO_CONFIG_FILE" + # This directory might be empty now, purge if it is + [ -d "$CONFIG_DIR" ] && rmdir --ignore-fail-on-non-empty "$CONFIG_DIR" + # The directory should be empty by now. [ -d "$STATE_DIR" ] && rmdir "$STATE_DIR" diff -ur lmodern-0.92.orig/debian/lmodern.preinst.in lmodern-0.92/debian/lmodern.preinst.in --- lmodern-0.92.orig/debian/lmodern.preinst.in 2005-03-17 17:46:25.000000000 -0800 +++ lmodern-0.92/debian/lmodern.preinst.in 2005-03-17 18:04:27.701098140 -0800 @@ -9,9 +9,10 @@ # So, this directory is created here and removed only in postrm when the # package is purged. STATE_DIR="/var/lib/$PACKAGE" +CONFIG_DIR="/etc/texmf/updmap.d" CONFIG_FILE_BASE_NAME=10lmodern.cfg -CONFIG_FILE="/etc/texmf/updmap.d/$CONFIG_FILE_BASE_NAME" +CONFIG_FILE="$CONFIG_DIR/$CONFIG_FILE_BASE_NAME" TEMP_CONFIG_FILE="$STATE_DIR/${CONFIG_FILE_BASE_NAME}.tmp" # Useless here (preinst), but I sometimes refer to this file in the comments, @@ -69,6 +70,7 @@ cat > "$TEMP_CONFIG_FILE" <<EndOfRefConfigFile @LMODERN_REF_CONFIG_FILE@ EndOfRefConfigFile + [ ! -d "$CONFIG_DIR" ] && mkdir -p --mode=755 "$CONFIG_DIR" mv "$TEMP_CONFIG_FILE" "$CONFIG_FILE" fi ;; -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (950, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.10-cfk7 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages lmodern depends on: ii defoma 0.11.8-0.1 Debian Font Manager -- automatic f ii xutils 4.3.0.dfsg.1-12.0.1 X Window System utility programs -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]