Skip to contentSkip to conversation

oprofile: Determine the root home directory dynamically

PATCH New Chong Lu 1 participant 1 message Jun 10, 2014

lore
Share & tools
lore

Chong Lu

author
#0 lore raw

PATCH v2 1/1 oprofile: Determine the root home directory dynamically

This commit detects the root home directory dynamically with changes to the opcontrol script and the oprofile gui app source.

The commit replaces an earlier fix that detected and adjusted a 'non-standard' root home directory at build time. The advantage of this patch is that the oprofile tools are adjusted to the current run-time path to ~root, not the build time path.

---
 meta/recipes-kernel/oprofile/oprofile.inc          |    5 +-
 .../oprofile/oprofile/oprofile-root.patch          |  113 ------------------
 .../oprofile/oprofile/root-home-dir.patch          |  120 ++++++++++++++++++++
 3 files changed, 122 insertions(+), 116 deletions(-)
 delete mode 100644 meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch
 create mode 100644 meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch
meta/recipes-kernel/oprofile/oprofile.inc +2 -3
index aaba48e..76d0b6c 100644
@@ -19,16 +19,15 @@ FILES_${PN}-dev += "${libdir}/${BPN}/lib*${SOLIBSDEV} ${libdir}/${BPN}/lib*.la"
 FILES_${PN}-staticdev += "${libdir}/${BPN}/lib*.a"
 
 SRC_URI = "file://opstart.patch \
-           file://oprofile-root.patch \
            file://acinclude.m4 \
            file://oprofile-cross-compile-tests.patch \
-           file://run-ptest"
+           file://run-ptest \
+           file://root-home-dir.patch"
 
 inherit autotools-brokensep pkgconfig ptest
 
 EXTRA_OECONF = "--with-kernel=${STAGING_KERNEL_DIR}  --without-x"
 do_configure () {
-	find ${S} -wholename '${S}/.pc' -prune -o -type f -print | xargs sed -i 's#ROOTHOME#${ROOT_HOME}#'
 	cp ${WORKDIR}/acinclude.m4 ${S}/
 	autotools_do_configure
 }
meta/recipes-kernel/oprofile/oprofile/oprofile-root.patch deleted +0 -113

113 lines not on this page · raw message

meta/recipes-kernel/oprofile/oprofile/root-home-dir.patch new file +120 -0

120 lines not on this page · raw message

Signature · 1 line
1.7.9.5