[Ultrapossum-cvs 1047] projects/debconf ...

アーカイブの一覧に戻る

Masato Taruishi taru****@users*****
2004年 10月 28日 (木) 14:31:14 JST


===================================================================
RCS file: projects/debconf/20debconf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- projects/debconf/20debconf	2004/10/06 10:06:00	1.1
+++ projects/debconf/20debconf	2004/10/28 05:31:14	1.2
@@ -29,6 +29,8 @@
 
   DEBCONF_BINDDN=$(ultrapossum_getconf DEBCONF_BINDDN "")
   DEBCONF_BINDPW=$(ultrapossum_getconf DEBCONF_BINDPW "")
+
+  DEBCONF_CACHEDIR=$(ultrapossum_getconf DEBCONF_CACHEDIR "$localstatedir/cache/ultrapossum-debconf")
 fi
 
 # Parsing configuration file
===================================================================
RCS file: projects/debconf/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- projects/debconf/Makefile.am	2004/10/06 12:50:13	1.2
+++ projects/debconf/Makefile.am	2004/10/28 05:31:14	1.3
@@ -23,6 +23,8 @@
 debconf: $(srcdir)/debconf.in $(srcdir)/Makefile
 	(prefix=@prefix@; sed -e "s!#schemadir#!$(schemadir)!g" $(srcdir)/debconf.in > debconf)
 
+install-data-local:
+	$(mkinstalldirs) $(DESTDIR)/$(localstatedir)/cache/@PACKAGE@/info
 
 EXTRA_DIST = \
 	ultrapossum.am \
===================================================================
RCS file: projects/debconf/reconfigure,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- projects/debconf/reconfigure	2004/10/06 12:50:13	1.1
+++ projects/debconf/reconfigure	2004/10/28 05:31:14	1.2
@@ -27,13 +27,32 @@
 eval `ultrapossum-config init`
 trap "eval `ultrapossum-config term`" 0
 
-dpkginfodir=/var/lib/dpkg/info/
+dpkginfodir=/var/lib/dpkg/info
 
 for p in "$@"
 do
-  if ! $MODULEDIR/debconf/dbdiff $p > /dev/null; then
-    $MODULEDIR/debconf/fetch pattern="^$p/"
+
+  if $MODULEDIR/debconf/dbdiff $p | grep -e '^>' ; then
+    $MODULEDIR/debconf/fetch --owner-pattern="^$p\$"
+  fi
+
+  if test -e "$DEBCONF_CACHEDIR/info/$p.postinst"; then
+    if ! test -e "$dpkginfodir/$p.postinst"; then
+      /bin/rm -f $DEBCONF_CACHEDIR/info/$p.postinst
+    fi
+  else
+    if test -e "$dpkginfodir/$p.postinst"; then
+      /bin/ln -s $dpkginfodir/$p.postinst $DEBCONF_CACHEDIR/info/
+    fi
+  fi
+
+  if test -e "$dpkginfodir/$p.prerm"; then
+    cache="" $dpkginfodir/$p.prerm upgrade "`dpkg-query --showformat='${Version}' -W $p`"
+  fi
+
+  if test -e "$DEBCONF_CACHEDIR/info/$p.postinst"; then
+    cache="" $DEBCONF_CACHEDIR/info/$p.postinst configure "`dpkg-query --showformat='${Version}' -W $p`"
   fi
-  $dpkginfodir/$p.postinst configure "`dpkg-query --showformat='${Version}' -W $p`"
+
 done
 



Ultrapossum-cvs メーリングリストの案内
アーカイブの一覧に戻る