tag 246296 +patch
tag 269409 +patch
tag 401684 +patch
tag 448144 +patch
thanks

On Tue, Dec 05, 2006 at 12:39:34PM +0100, Agustin Martin wrote:
> Do you really need to load all those site files and have the noise shown
> above? Using '-no-site-file' should work for all current emacs flavours
> currently shipped with Debian (failed with emacs20, which required
> '--no-site-file', but it is already history)
...
> Also, please consider leaving symlinks in the target dir to files in the
> source dir,
> 
> You can look at this patch to emacsen policy proposed by Michael Olsen.
> 
> http://lists.debian.org/debian-emacsen/2006/11/msg00012.html
> 
> Seems to be consensus about it.

I am attaching a patch that intends to deal with these two bug reports

  [#401684] a2ps: Please set symlinks and avoid loading
            /etc/emacs/site-startd.d stuff when bytecompiling
  [#448144] Error while loading 50dictionaries-common' during emacs22 install

using -no-site-file and setting symlinks.

This patch also removes trailing whitespace from changelog and intends to deal
with these other two bug reports

  [#246296] a2ps uses emacsen-common before it's configured
  [#269409] broken dependencies (emacs) 

by making sure emacsen-common is installed and configured before calling its
functions, so there is no need to depend on any emacsen stuff.

Hope this helps,

-- 
Agustin
diff -u a2ps-4.13c~rc5/debian/changelog a2ps-4.13c~rc5/debian/changelog
--- a2ps-4.13c~rc5/debian/changelog
+++ a2ps-4.13c~rc5/debian/changelog
@@ -1,3 +1,16 @@
+a2ps (1:4.13c~rc5-1.0.1) unstable; urgency=low
+
+  * Proposing fixes for some emacs related stuff.
+  * debian/emacsen-install: (Closes: #401684, #448144)
+    - Do not load site files when byte-compiling.
+    - Set symlinks to .el files.
+  * debian/{rules,prerm,postrm}: (Closes: #246296, #269409).
+    - prerm, postrm: Use emacsen-common stuff only when it
+      is installed and configured.
+    - rules: Do not install emacsen snippets in {prerm,postrm}.
+
+ -- Agustin Martin Domingo <[EMAIL PROTECTED]>  Tue, 06 Nov 2007 12:31:19 +0100
+
 a2ps (1:4.13c~rc5-1) unstable; urgency=low
 
   * New upstream release.
@@ -161,7 +174,7 @@
 
 a2ps (4.13b-20.1) unstable; urgency=low
 
-  * add emacs21-nox | emacsen to Build-Depends: (closes: #191372) 
+  * add emacs21-nox | emacsen to Build-Depends: (closes: #191372)
 
  -- Rene Engelhard <[EMAIL PROTECTED]>  Sat, 23 Aug 2003 02:44:57 +0200
 
@@ -175,7 +188,7 @@
 
 a2ps (4.13b-19) unstable; urgency=low
 
-  * Now install *.el by hand.  This eliminates the neccesity of emacsen 
+  * Now install *.el by hand.  This eliminates the neccesity of emacsen
     on build time.
 
  -- Masayuki Hatta <[EMAIL PROTECTED]>  Sun,  6 Apr 2003 20:52:07 +0900
@@ -197,7 +210,7 @@
   * 01_composite_fonts.dpatch:
     + Added composite fonts support - closes: #143317, #42824
   * 02_ja_po.dpatch
-    + Added ja.po - closes: #143318    
+    + Added ja.po - closes: #143318
   * 03_ko.po.dpatch
     + Updated ko.po - closes: #90819
   * 04_koi8_fonts_debian.dpatch
@@ -243,10 +256,10 @@
 
 a2ps (4.13b-11) unstable; urgency=low
 
-  * debian/preinst: Nuke /usr/doc/a2ps dir if present 
-    (but don't close the bug 107232 now assigned to doc-base) 
+  * debian/preinst: Nuke /usr/doc/a2ps dir if present
+    (but don't close the bug 107232 now assigned to doc-base)
   * debian/control: Add wdiff to Suggets: (Closes: #113053)
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Wed, 26 Sep 2001 23:07:35 -0500
 
 a2ps (4.13b-10.0.1) unstable; urgency=low
@@ -254,18 +267,18 @@
    * Binary-only non-maintainer upload for powerpc; no source changes.
    * rebuild to fix a2ps.cfg  (Closes: #107054)
 
- -- Michael Schmitz <[EMAIL PROTECTED]>  Sat, 11 Aug 2001 21:48:46 +0200 
-  
+ -- Michael Schmitz <[EMAIL PROTECTED]>  Sat, 11 Aug 2001 21:48:46 +0200
+
 a2ps (4.13b-10) unstable; urgency=low
 
-  * debian/rules: Install three new style sheets for GNU R code (i.e. 
+  * debian/rules: Install three new style sheets for GNU R code (i.e.
     written in the S language), its Rd documentation format and the
     Rout transcripts. Also submitted upstream to Akim.  Thanks to Kurt
     Hornik und Torsten Hothorn for their help on this.
   * debian/postrm: Moved install-info to debian/prerm (lintian)
   * debian/control: Changed Build-Depends to  gv | ghostview
   * debian/control: Updated Standards-Version
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Wed, 30 May 2001 22:32:56 -0500
 
 a2ps (4.13b-9) unstable; urgency=low
@@ -294,16 +307,16 @@
   * Note that we cannot simple use xpdf as actual acroread command-line
     options have been code into a2ps' behaviour. xpdf patches would surely
     be welcomed by the current xpdf maintainer (Hi Hamish!)
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sun,  7 Jan 2001 23:54:41 -0600
 
 a2ps (4.13b-5) unstable; urgency=low
 
-  * doc/a2ps.texi: Removed @c from definiton of @pack for non-TeX branch 
+  * doc/a2ps.texi: Removed @c from definiton of @pack for non-TeX branch
     so that the current texi2html (1.64-1) can compile a2ps (Closes: #81378)
   * debian/rules: Add perl post-processing to s/a2ps{}/a2ps/g to clean up
     the a2ps.html file produced by texi2html
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sun,  7 Jan 2001 14:15:56 -0600
 
 a2ps (4.13b-4) unstable; urgency=low
@@ -324,12 +337,12 @@
     are needed for a few input formats (cf #64420)
   * debian/rules: Call dh_installexamples with argument sample/[a-zA-Z]*
     to exclude the libtool leftovers (Closes: #65615)
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Thu, 15 Jun 2000 20:01:43 -0400
 
 a2ps (4.13b-1) unstable; urgency=low
 
-  * Upgraded to new upstream release 4.13b 
+  * Upgraded to new upstream release 4.13b
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Wed, 10 May 2000 22:23:29 -0400
 
@@ -343,12 +356,12 @@
 
   * Upgraded to new upstream release which fixes a bug with Severity:
     Important (and reported by a2ps' author) whereby postscript with
-    embedded bitmaps can be rendered invalid (Closes: #57351) 
+    embedded bitmaps can be rendered invalid (Closes: #57351)
   * debian/control: Add Build-Conflicts: and Build-Depends: to potato
     release as per Roman's suggestion (Closes: #57402)
-  * This version also closes two more old bugs (already fixed in unstable) 
+  * This version also closes two more old bugs (already fixed in unstable)
     and is therefore recommended as an addition to the potato release
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Tue,  8 Feb 2000 21:41:43 -0500
 
 a2ps (4.12l-1) unstable; urgency=low
@@ -374,7 +387,7 @@
 
 a2ps (4.12k-1) unstable; urgency=low
 
-  * Upgraded to new upstream release 4.12k 
+  * Upgraded to new upstream release 4.12k
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Mon, 31 Jan 2000 20:47:01 -0500
 
@@ -382,7 +395,7 @@
 
   * Re-built against .orig.tar.gz and not .tar.gz as with 4.12h-4
   * Also uploading into frozen to get the fix for #55765 into potato
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sun, 23 Jan 2000 22:37:18 -0500
 
 a2ps (4.12h-4) unstable; urgency=low
@@ -409,7 +422,7 @@
 
 a2ps (4.12h-1) unstable; urgency=low
 
-  * Upgraded to new upstream release 4.12h 
+  * Upgraded to new upstream release 4.12h
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Tue, 30 Nov 1999 19:16:38 -0500
 
@@ -421,7 +434,7 @@
 
 a2ps (4.12g-1) unstable; urgency=low
 
-  * Upgraded to new upstream release 4.12g 
+  * Upgraded to new upstream release 4.12g
 
   * psset: Problem with $quiet fixed in new release (Closes: #50451)
 
@@ -430,7 +443,7 @@
   * sheets/sheets.map: Files with .ml extensions now use ocaml.ssh
 
   * contrib/card.m4: Patched for safer tempfile use (Closes: #50747)
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sat, 20 Nov 1999 12:09:27 -0500
 
 a2ps (4.12c-1) unstable; urgency=low
@@ -470,8 +483,8 @@
   * [debian/conffiles] Added /etc/a2ps-site.cfg
   * [debian/rules] Configure with NLS support (fixes #40127)
 
- -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sat, 26 Jun 1999 11:22:20 -0400   
-  
+ -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sat, 26 Jun 1999 11:22:20 -0400
+
 a2ps (4.12-2) unstable; urgency=low
 
   * [debian/texi2dvi4a2ps] Updated to new version (fixes #35050)
@@ -493,7 +506,7 @@
 a2ps (4.10.4i-2) unstable; urgency=low
 
   * debian/{rules,postinst,postrm}: Removed support for html documentation
-    through menu as it is now provided by doc-base 
+    through menu as it is now provided by doc-base
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Thu, 14 Jan 1999 21:02:11 -0500
 
@@ -512,12 +525,12 @@
     /etc/a2ps.cfg according to /etc/papersize, a2ps now uses libpaper
   * debian/control: Upgraded to Standards-Version: 2.5.0
   * debian/rules: Added '$(MAKE) check' to the build stage
-  
+
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Mon, 30 Nov 1998 20:32:12 -0500
 
 a2ps (4.10.4-4) frozen unstable; urgency=low
 
-  * Rewrote postinst to not depend on English.pm so that a2ps can be 
+  * Rewrote postinst to not depend on English.pm so that a2ps can be
     installed on systems with perl-base only (fixes #30032)
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Thu, 26 Nov 1998 19:33:13 -0500
@@ -537,7 +550,7 @@
 
 a2ps (4.10.4-1) unstable; urgency=low
 
-  * Upgraded to new upstream version 4.10.4 
+  * Upgraded to new upstream version 4.10.4
   * Added support for mime-support (fixes #26708)
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Mon, 28 Sep 1998 22:33:31 -0400
@@ -556,8 +569,8 @@
 
 a2ps (4.10.2-3) unstable; urgency=low
 
-  * Added 'Recommends: groff, tetex-bin, psutils' to debian/control to 
-    reflect the need for other programs used by a2ps in its 'automatic 
+  * Added 'Recommends: groff, tetex-bin, psutils' to debian/control to
+    reflect the need for other programs used by a2ps in its 'automatic
     delegation' mode for file conversion (fixes #23352)
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Tue,  9 Jun 1998 21:50:41 -0400
@@ -595,7 +608,7 @@
 
 a2ps (4.10-2) frozen unstable; urgency=low
 
-  * Corrected papersize configuration for /etc/a2ps.cfg in postinst (#19945) 
+  * Corrected papersize configuration for /etc/a2ps.cfg in postinst (#19945)
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Thu, 19 Mar 1998 20:23:29 -0500
 
@@ -603,7 +616,7 @@
 
   * Upgraded to new upstream version 4.10
   * Really generate the html version of the texi documentation.
-  * Upgraded to Debian Policy 2.4.0.0 
+  * Upgraded to Debian Policy 2.4.0.0
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Tue, 10 Mar 1998 22:08:34 -0500
 
@@ -618,18 +631,18 @@
 
   * New upstream version (which fixed the bugs #8016, #8873, #9917 and
     #11203 which requested an upgrade to a newer version)
-  * Bug #7207 (a2ps passes -l to lpr) appears to be fixed in this (almost 
+  * Bug #7207 (a2ps passes -l to lpr) appears to be fixed in this (almost
     completely) rewritten version of a2ps, prints fine via magicfilter.
   * Bug #8976, however, is unfixable in a2ps: apsfilter contains a
-    complete (albeit much older) version of a2ps and installs the a2ps 
-    binary in an internal directory, but installs the a2ps manual page as 
-    well! That is braindead --- if apsfilter needs a2ps, it should depend 
-    on a2ps. Moreover, apsfilter has long been orphaned and does not appear 
+    complete (albeit much older) version of a2ps and installs the a2ps
+    binary in an internal directory, but installs the a2ps manual page as
+    well! That is braindead --- if apsfilter needs a2ps, it should depend
+    on a2ps. Moreover, apsfilter has long been orphaned and does not appear
     to have been updated upstream in a long time either.
   * Moved from non-free to main as a2ps is now released under GNU GPL
   * Upgrade to Debian Policy 2.3.0.0
-  * Compiled with GNU libc2 aka libc6 
-  * Ships the unmodified upstream source as a2ps_4.8.4.orig.tar.gz 
+  * Compiled with GNU libc2 aka libc6
+  * Ships the unmodified upstream source as a2ps_4.8.4.orig.tar.gz
   * New maintainer
 
  -- Dirk Eddelbuettel <[EMAIL PROTECTED]>  Sat,  6 Sep 1997 23:36:46 -0400
@@ -640,12 +653,12 @@
   * Applied patches for m68k builds (Bug#3911)
-  * New upstream version patches for libpaper (Bug#1874,6511) 
+  * New upstream version patches for libpaper (Bug#1874,6511)
   * Added postinst to check for and create /etc/papersize
   * Built for ELF (Bug#4568)
 
  -- Jon Rabone <[EMAIL PROTECTED]>  Wed, 29 Jan 1997 10:47:49 +0000
 
 a2ps (4.3-1) unstable; urgency=medium
-  
+
   * Initial release
-  
+
  -- K MacDonald <[EMAIL PROTECTED]>  Wed, 1 Feb 1995 00:00:00 +0000
diff -u a2ps-4.13c~rc5/debian/emacsen-install a2ps-4.13c~rc5/debian/emacsen-install
--- a2ps-4.13c~rc5/debian/emacsen-install
+++ a2ps-4.13c~rc5/debian/emacsen-install
@@ -19,27 +19,33 @@
 #    SITEFLAG="--no-site-file"
 #fi
+
+SITEFLAG="-no-site-file"     # Do not load site files when byte-compiling
 FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
 
 ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
 ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
 
-# Install-info-altdir does not actually exist. 
+# Install-info-altdir does not actually exist.
 # Maybe somebody will write it.
 if test -x /usr/sbin/install-info-altdir; then
     echo install/${PACKAGE}: install Info links for ${FLAVOR}
     install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz
 fi
 
-install -m 755 -d ${ELCDIR}
+install -m 0755 -d ${ELCDIR}
+
 cd ${ELDIR}
 FILES=`echo *.el`
-cp ${FILES} ${ELCDIR}
+
 cd ${ELCDIR}
+for i in $FILES; do
+    ln -sf ${ELDIR}/$i .
+done
 
 cat << EOF > path.el
 (setq load-path (cons "." load-path) byte-compile-warnings nil)
 EOF
 ${FLAVOR} ${FLAGS} ${FILES}
-rm -f *.el path.el
+rm -f path.el
 
 exit 0
diff -u a2ps-4.13c~rc5/debian/rules a2ps-4.13c~rc5/debian/rules
--- a2ps-4.13c~rc5/debian/rules
+++ a2ps-4.13c~rc5/debian/rules
@@ -108,7 +108,7 @@
 #	dh_installmenu
 #	dh_installdebconf	
 #	dh_installlogrotate
-	dh_installemacsen
+	dh_installemacsen --noscripts
 #	dh_installpam
 #	dh_installmime
 #	dh_installinit
only in patch2:
unchanged:
--- a2ps-4.13c~rc5.orig/debian/prerm
+++ a2ps-4.13c~rc5/debian/prerm
@@ -0,0 +1,15 @@
+#! /bin/sh
+set -e
+
+# postrm script for a2ps
+
+package=a2ps
+
+# Verifying that there are emacsen installed before calling emacs-package-remove
+if [ -x /usr/lib/emacsen-common/emacs-package-remove ] ; then
+    [ -e /var/lib/emacsen-common/installed-flavors ] && /usr/lib/emacsen-common/emacs-package-remove $package
+fi
+
+#DEBHELPER#
+
+exit 0
only in patch2:
unchanged:
--- a2ps-4.13c~rc5.orig/debian/postinst
+++ a2ps-4.13c~rc5/debian/postinst
@@ -0,0 +1,16 @@
+#! /bin/sh
+set -e
+
+# postinst script for a2ps
+
+package=a2ps
+
+# We need to test that there are emacsen installed before calling emacs-package-*
+if [ "$1" = "configure" ] && [ -x /usr/lib/emacsen-common/emacs-package-install ]
+then
+    [ -e /var/lib/emacsen-common/installed-flavors ] && /usr/lib/emacsen-common/emacs-package-install $package
+fi
+
+#DEBHELPER#
+
+exit 0

Reply via email to