summaryrefslogtreecommitdiff
path: root/data/_dpkg/extrainst.diff
blob: fe305260016cd8934d408e8cae7f5c8f44c66bdb (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.18.10/lib/dpkg/dpkg.h dpkg-1.18.10+iPhone/lib/dpkg/dpkg.h
--- dpkg-1.18.10/lib/dpkg/dpkg.h	2016-07-05 01:55:13.000000000 +0000
+++ dpkg-1.18.10+iPhone/lib/dpkg/dpkg.h	2016-08-15 23:45:06.000000000 +0000
@@ -68,6 +68,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.18.10/src/unpack.c dpkg-1.18.10+iPhone/src/unpack.c
--- dpkg-1.18.10/src/unpack.c	2016-07-05 02:00:41.000000000 +0000
+++ dpkg-1.18.10+iPhone/src/unpack.c	2016-08-15 23:43:41.000000000 +0000
@@ -1434,6 +1434,16 @@
 
   tar_deferred_extract(newfiles_queue.head, pkg);
 
+  if (oldversionstatus == PKG_STAT_NOTINSTALLED || oldversionstatus == PKG_STAT_CONFIGFILES) {
+    maintscript_new(pkg, EXTRAINSTFILE, "extra-installation", cidir, cidirrest,
+                    "install", NULL);
+  } else {
+    maintscript_new(pkg, EXTRAINSTFILE, "extra-installation", cidir, cidirrest,
+                    "upgrade",
+                    versiondescribe(&pkg->installed.version, vdew_nonambig),
+                    NULL);
+  }
+
   if (oldversionstatus == PKG_STAT_HALFINSTALLED ||
       oldversionstatus == PKG_STAT_UNPACKED) {
     /* Packages that were in ‘installed’ and ‘postinstfailed’ have been