summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-15 21:08:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-12-16 16:05:37 +0000
commit1855e94280bdbce2de84cb81cdd61f01950d05d9 (patch)
tree7e7eb13a71ced54a5a7ad36f66c1d4547f4d5a41 /meta/recipes-devtools/opkg/opkg/offline_postinstall.patch
parentc7335bd21b2413582cee1dec79700c3ac70a65e5 (diff)
downloadpoky-1855e94280bdbce2de84cb81cdd61f01950d05d9.tar.gz
opkg: Update svn 625 -> 633 and fix preinst issues
There is a major issue with opkg images at the moment as preinst functions are not being executed before their dependencies are installed and this is leading to corruption of images containing avahi/dbus in particular. There are various changes in upstream opkg in the last 8 revisions which make changes in this area but sadly these aren't enough to get things working for us. I've updated to the latest svn revision with this patch since it makes sense to pull in those changes first and then supplement them with the attached patches. There is a full description of the patches in the patch headers but in summary they: a) Ensure preinst functions execute with their dependencies installed. This is a pretty invasive change as it changes the package install ordering in general. b) Ensure opkg sets $D, not $PKG_ROOT which we don't use c) Change opkg to allow execution of postinstall functions which fail resulting in execution on the target device as rootfs_ipk.bbclass currently does manually. The remaining changes interface this with the rest of the OE build infrastructure, adding in the option to tell opkg to run the preinst and postinst functions, ensure the correct environment is present for the postinst scripts and removing the now unneeded rootfs_ipk class code which opkg now does itself. [YOCTO #1711] (From OE-Core rev: 2feba313c991170747381c7cf821a45c2cd04632) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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