summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg/offline_postinstall.patch')
-rw-r--r--meta/recipes-devtools/opkg/opkg/offline_postinstall.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch b/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
new file mode 100644
index 0000000000..b197f6b731
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
@@ -0,0 +1,57 @@
1When we have an offline root and have specified force-postinstall,
2attempt to run the postinstall but if it fails, just leave it in the
3status file as neeing to run. We can issue a NOTICE this is happened
4but supress errors. This means the OE class doesn't have to do any
5further post processing of the postinstalls itself.
6
7Upstream-Status: Pending
8
9RP 2011/12/15
10
11
12Index: trunk/libopkg/pkg.c
13===================================================================
14--- trunk.orig/libopkg/pkg.c 2011-12-15 15:58:39.000000000 +0000
15+++ trunk/libopkg/pkg.c 2011-12-15 20:04:50.109992736 +0000
16@@ -1297,8 +1297,9 @@
17 free(cmd);
18
19 if (err) {
20- opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
21- pkg->name, script, err);
22+ if (!conf->offline_root)
23+ opkg_msg(ERROR, "package \"%s\" %s script returned status %d.\n",
24+ pkg->name, script, err);
25 return err;
26 }
27
28Index: trunk/libopkg/opkg_cmd.c
29===================================================================
30--- trunk.orig/libopkg/opkg_cmd.c 2011-12-15 19:49:25.826014150 +0000
31+++ trunk/libopkg/opkg_cmd.c 2011-12-15 19:50:52.346012148 +0000
32@@ -453,7 +453,8 @@
33 pkg->state_flag &= ~SF_PREFER;
34 opkg_state_changed++;
35 } else {
36- err = -1;
37+ if (!conf->offline_root)
38+ err = -1;
39 }
40 }
41 }
42Index: trunk/libopkg/opkg_configure.c
43===================================================================
44--- trunk.orig/libopkg/opkg_configure.c 2011-12-15 19:50:11.586013081 +0000
45+++ trunk/libopkg/opkg_configure.c 2011-12-15 19:52:15.082010347 +0000
46@@ -35,7 +35,10 @@
47
48 err = pkg_run_script(pkg, "postinst", "configure");
49 if (err) {
50- opkg_msg(ERROR, "%s.postinst returned %d.\n", pkg->name, err);
51+ if (!conf->offline_root)
52+ opkg_msg(ERROR, "%s.postinst returned %d.\n", pkg->name, err);
53+ else
54+ opkg_msg(NOTICE, "%s.postinst returned %d, marking as unpacked only, configuration required on target.\n", pkg->name, err);
55 return err;
56 }
57