Skip to contentSkip to conversation

linaro-pm-qa-utils: Remove hardcoded relative paths

PATCH Superseded Carlos Hernandez 2 participants 2 messages Nov 26, 2013 – Nov 27, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linaro-pm-qa-utils: Remove hardcoded relative paths

Some scripts contained hardcoded relative paths to not existing files. This patch removes the relative paths and instead let BASH resolve the path to the executable.

---
 .../linaro-pm-qa/linaro-pm-qa-utils_git.bb         |    5 +++++
 1 file changed, 5 insertions(+)
meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb +5 -0
index dcf599f..0ba1682 100644
@@ -41,6 +41,9 @@ do_install () {
     # Install the helper scripts in the include directory
     for script in `find . -name "*.sh" | grep include`
     do
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
+
         script_basename=`basename ${script}`
         install -m 0755 $script ${D}${bindir}/linaro-pm-qa-include/${script_basename}
     done
@@ -53,6 +56,8 @@ do_install () {
         # directory then change the include path to the absolute path
         # and to reflect the install location of the helper scripts.
         sed -i -e "s#source ../include#source ${bindir}/linaro-pm-qa-include#g" ${script}
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
 
         script_basename=`basename ${script}`
         install -m 0755 $script ${D}${bindir}/${script_basename}
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:meta-arago- [email protected]] On Behalf Of Hernandez, Carlos
Sent: Tuesday, November 26, 2013 4:47 PM
To: [email protected]
Subject: [meta-arago] [PATCH] linaro-pm-qa-utils: Remove hardcoded relative paths

Some scripts contained hardcoded relative paths to not existing files. This patch removes the relative paths and instead let BASH resolve the path to the executable.

PR bump please

Quoted 44 lines

---
.../linaro-pm-qa/linaro-pm-qa-utils_git.bb | 5 +++++

1 file changed, 5 insertions(+)
(quoted diff) +0 -0

qa/linaro-pm-qa-utils_git.bb b/meta-arago-extras/recipes- devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb
index dcf599f..0ba1682 100644
--- a/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm- qa-utils_git.bb
+++ b/meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm- qa-utils_git.bb

meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb +3 -0
@@ -41,6 +41,9 @@ do_install () {
    # Install the helper scripts in the include directory
    for script in `find . -name "*.sh" | grep include`
    do
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
+
        script_basename=`basename ${script}`
        install -m 0755 $script ${D}${bindir}/linaro-pm-qa-
 include/${script_basename}

done

(quoted diff) +0 -0
@@ -53,6 +56,8 @@ do_install () {
        # directory then change the include path to the absolute

path

        # and to reflect the install location of the helper
scripts.
        sed -i -e "s#source ../include#source ${bindir}/linaro-
pm-qa-include#g" ${script}
meta-arago-extras/recipes-devtools/linaro-pm-qa/linaro-pm-qa-utils_git.bb +2 -1
+        # Remove hardcoded relative paths
+        sed -i -e 's#..\/utils\/##' ${script}
 
        script_basename=`basename ${script}`
        install -m 0755 $script ${D}${bindir}/${script_basename}
--

1.7.9.5

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago