Package: libpaper
Version: 1.1.14-3
Tags: patch

The libpaper package should provide a hook for other packages to
receive notification when the paper size has been set or changed.

Not all packages can use libpaper as part of their normal run-time
to determine the current paper size.  Those that have their own
configuration (e.g., tetex) need to know when the system paper size
has changed, so they can update their own idea of the paper size.

The hook added in the attached patch defines a new directory,
/etc/paper.d, where other packages can place scripts that will be
run when the system paper size is set or changed.

 < Stephen

--- libpaper-1.1.14/src/paperconfig.in  2002-12-19 17:17:03.000000000 -0800
+++ src/paperconfig.in  2005-12-29 23:20:08.000000000 -0800
@@ -123,6 +123,11 @@ setpaper() {
     then
         echo `basename $0`: cannot create [EMAIL PROTECTED]@
         exit 2
+    else
+       if [ -d /etc/paper.d ]
+       then
+           run-parts /etc/paper.d
+       fi
     fi
 }
 
--- libpaper-1.1.14/man/paperconfig.8.in        2002-11-10 16:56:08 -0800
+++ man/paperconfig.8.in        2005-12-30 14:07:46 -0800
@@ -23,6 +23,12 @@
 file.
 It can either ask interactively for the paper to use or be called
 non-interactively by scripts.
+.PP
+When the paper size has been changed,
+.B paperconfig
+notifies other packages of the change by running the scripts in the
+.I /etc/paper.d
+directory.
 .SH OPTIONS
 .TP
 .BR \-v\fP, \fB\-\-version
@@ -54,6 +60,10 @@
 if the
 .B @PAPERSIZEVAR@
 variable is not set.
+.TP 20
+.B /etc/paper.d
+Directory of scripts to run after the paper size has been changed.
+This package puts no scripts here, but other packages may.
 .SH AUTHOR
 Yves Arrouye <[EMAIL PROTECTED]>
 .SH SEE ALSO


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to