summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2012-09-29 13:20:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-02 11:16:30 +0100
commitf48a68177510e8f2d4fcc3725a6dfc41a9a8e96b (patch)
tree7a88b5ecdbcf302d5c1d75da1f0b0572aaf48b74 /meta/recipes-devtools/opkg
parent7ebce895a215b31cf01aea2ac43e554f96ef814f (diff)
downloadopenembedded-core-contrib-f48a68177510e8f2d4fcc3725a6dfc41a9a8e96b.tar.gz
opkg: Don't call sync() when installing into an offline root
Even when installing onto a live target system, calling sync() during package installation is of somewhat questionable benefit. But calling it on the build host during rootfs construction is certainly useless and can cause I/O to stall for several seconds on even a moderately sized host which is clearly not desirable. (From a patch originally by Mike Crowe.) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg')
-rw-r--r--meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch18
-rw-r--r--meta/recipes-devtools/opkg/opkg_svn.bb3
2 files changed, 20 insertions, 1 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
new file mode 100644
index 00000000000..b1b3453484b
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/opkg-no-sync-offline.patch
@@ -0,0 +1,18 @@
+When installing into an offline root, calling sync() is pointless and just
+hurts performance. Don't let's do that.
+
+Signed-off-by: Phil Blundell <philb@gnu.org>
+Upstream-Status: Pending
+
+--- a/libopkg/opkg_cmd.c 2011-09-08 10:53:07.000000000 +0100
++++ b/libopkg/opkg_cmd.c 2011-10-04 10:45:22.278615584 +0100
+@@ -64,7 +64,8 @@ write_status_files_if_changed(void)
+ opkg_msg(INFO, "Writing status file.\n");
+ opkg_conf_write_status_files();
+ pkg_write_changed_filelists();
+- sync();
++ if (!conf->offline_root)
++ sync();
+ } else {
+ opkg_msg(DEBUG, "Nothing to be done.\n");
+ }
diff --git a/meta/recipes-devtools/opkg/opkg_svn.bb b/meta/recipes-devtools/opkg/opkg_svn.bb
index d89a3f6c669..59bb2d94e2e 100644
--- a/meta/recipes-devtools/opkg/opkg_svn.bb
+++ b/meta/recipes-devtools/opkg/opkg_svn.bb
@@ -11,6 +11,7 @@ SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;protocol=http \
file://0008-select_higher_version.patch \
file://0009-pkg_depends-fix-version-constraints.patch \
file://0010-pkg_depends-fix-version_constraints_satisfied.patch \
+ file://opkg-no-sync-offline.patch \
"
S = "${WORKDIR}/trunk"
@@ -18,4 +19,4 @@ S = "${WORKDIR}/trunk"
SRCREV = "633"
PV = "0.1.8+svnr${SRCPV}"
-PR = "${INC_PR}.5"
+PR = "${INC_PR}.6"