summaryrefslogtreecommitdiff
path: root/data/dpkg/extrainst.diff
blob: 59c50808464ad5e4566f427df737385bfa119d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff -ru dpkg-1.14.25/lib/dpkg.h dpkg-1.14.25+iPhone/lib/dpkg.h
--- dpkg-1.14.25/lib/dpkg.h	2009-02-01 06:18:59.000000000 +0000
+++ dpkg-1.14.25+iPhone/lib/dpkg.h	2009-04-11 01:20:50.000000000 +0000
@@ -80,6 +80,7 @@
 #define CONTROLFILE        "control"
 #define CONFFILESFILE      "conffiles"
 #define PREINSTFILE        "preinst"
+#define EXTRAINSTFILE      "extrainst_"
 #define POSTINSTFILE       "postinst"
 #define PRERMFILE          "prerm"
 #define POSTRMFILE         "postrm"
diff -ru dpkg-1.14.25/src/processarc.c dpkg-1.14.25+iPhone/src/processarc.c
--- dpkg-1.14.25/src/processarc.c	2009-02-01 06:19:02.000000000 +0000
+++ dpkg-1.14.25+iPhone/src/processarc.c	2009-04-11 01:19:29.000000000 +0000
@@ -596,6 +596,16 @@
   p1[0] = -1;
   waitsubproc(c1,BACKEND " --fsys-tarfile",PROCPIPE);
 
+  if (oldversionstatus == stat_notinstalled || oldversionstatus == stat_configfiles) {
+    maintainer_script_new(pkg->name, EXTRAINSTFILE, "extra-installation", cidir, cidirrest,
+                          "install", (char *)0);
+  } else {
+    maintainer_script_new(pkg->name, EXTRAINSTFILE, "extra-installation", cidir, cidirrest,
+                          "upgrade", versiondescribe(&pkg->installed.version,
+                                                     vdew_nonambig),
+                          (char *)0);
+  }
+
   if (oldversionstatus == stat_halfinstalled || oldversionstatus == stat_unpacked) {
     /* Packages that were in `installed' and `postinstfailed' have been reduced
      * to `unpacked' by now, by the running of the prerm script.