* [PATCH] mklibs-native: Remove the dpkg-native dependency
[not found] <cover.1433928968.git.leonardo.sandoval.gonzalez@linux.intel.com>
@ 2015-06-10 9:44 ` leonardo.sandoval.gonzalez
2015-07-07 15:07 ` Leonardo Sandoval
0 siblings, 1 reply; 2+ messages in thread
From: leonardo.sandoval.gonzalez @ 2015-06-10 9:44 UTC (permalink / raw)
To: openembedded-core
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
The 'dpkg-native' dependency introduced on 0a08dc is not neccesary
needed if the mklibs-native code is secured with a try/catch statement
when calling the dpkg-native application.
[YOCTO #3782]
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
.../mklibs/mklibs-native_0.1.40.bb | 3 +-
.../mklibs/catch-exception-if-dpkg-architect.patch | 103 +++++++++++++++++++++
2 files changed, 105 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
index b2fcae5..ff3fe08 100644
--- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
+++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
@@ -4,12 +4,13 @@ HOMEPAGE = "https://launchpad.net/mklibs"
SECTION = "devel"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
-DEPENDS = "python-native dpkg-native"
+DEPENDS = "python-native"
SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.xz \
file://ac_init_fix.patch\
file://fix_STT_GNU_IFUNC.patch\
file://sysrooted-ldso.patch \
+ file://catch-exception-if-dpkg-architect.patch \
"
SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
diff --git a/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch b/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
new file mode 100644
index 0000000..55ff0a7
--- /dev/null
+++ b/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
@@ -0,0 +1,103 @@
+From 78a1245b5217ea42fc122b339684ff8d59059037 Mon Sep 17 00:00:00 2001
+From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
+Date: Wed, 10 Jun 2015 07:24:23 +0000
+Subject: [PATCH] mklibs,mklibs-copy: Catch exception if dpkg-architecture not
+ found
+
+Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
+---
+ src/mklibs | 33 ++++++++++++++++++---------------
+ src/mklibs-copy | 33 ++++++++++++++++++---------------
+ 2 files changed, 36 insertions(+), 30 deletions(-)
+
+diff --git a/src/mklibs b/src/mklibs
+index a3533c0..75d2bb4 100755
+--- a/src/mklibs
++++ b/src/mklibs
+@@ -272,21 +272,24 @@ def extract_soname(so_file):
+ return ""
+
+ def multiarch(paths):
+- devnull = open('/dev/null', 'w')
+- dpkg_architecture = subprocess.Popen(
+- ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
+- stdout=subprocess.PIPE, stderr=devnull)
+- devnull.close()
+- deb_host_multiarch, _ = dpkg_architecture.communicate()
+- if dpkg_architecture.returncode == 0:
+- deb_host_multiarch = deb_host_multiarch.rstrip('\n')
+- new_paths = []
+- for path in paths:
+- new_paths.append(
+- path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
+- new_paths.append(path)
+- return new_paths
+- else:
++ try:
++ devnull = open('/dev/null', 'w')
++ dpkg_architecture = subprocess.Popen(
++ ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
++ stdout=subprocess.PIPE, stderr=devnull)
++ devnull.close()
++ deb_host_multiarch, _ = dpkg_architecture.communicate()
++ if dpkg_architecture.returncode == 0:
++ deb_host_multiarch = deb_host_multiarch.rstrip('\n')
++ new_paths = []
++ for path in paths:
++ new_paths.append(
++ path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
++ new_paths.append(path)
++ return new_paths
++ else:
++ return paths
++ except OSError:
+ return paths
+
+ def usage(was_err):
+diff --git a/src/mklibs-copy b/src/mklibs-copy
+index c33985d..fc93ea1 100755
+--- a/src/mklibs-copy
++++ b/src/mklibs-copy
+@@ -116,21 +116,24 @@ def extract_soname(so_file):
+ return ""
+
+ def multiarch(paths):
+- devnull = open('/dev/null', 'w')
+- dpkg_architecture = subprocess.Popen(
+- ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
+- stdout=subprocess.PIPE, stderr=devnull)
+- devnull.close()
+- deb_host_multiarch, _ = dpkg_architecture.communicate()
+- if dpkg_architecture.returncode == 0:
+- deb_host_multiarch = deb_host_multiarch.rstrip('\n')
+- new_paths = []
+- for path in paths:
+- new_paths.append(
+- path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
+- new_paths.append(path)
+- return new_paths
+- else:
++ try:
++ devnull = open('/dev/null', 'w')
++ dpkg_architecture = subprocess.Popen(
++ ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
++ stdout=subprocess.PIPE, stderr=devnull)
++ devnull.close()
++ deb_host_multiarch, _ = dpkg_architecture.communicate()
++ if dpkg_architecture.returncode == 0:
++ deb_host_multiarch = deb_host_multiarch.rstrip('\n')
++ new_paths = []
++ for path in paths:
++ new_paths.append(
++ path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
++ new_paths.append(path)
++ return new_paths
++ else:
++ return paths
++ except OSError:
+ return paths
+
+ def version(vers):
+--
+1.8.4.5
+
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mklibs-native: Remove the dpkg-native dependency
2015-06-10 9:44 ` [PATCH] mklibs-native: Remove the dpkg-native dependency leonardo.sandoval.gonzalez
@ 2015-07-07 15:07 ` Leonardo Sandoval
0 siblings, 0 replies; 2+ messages in thread
From: Leonardo Sandoval @ 2015-07-07 15:07 UTC (permalink / raw)
To: openembedded-core
ping
On 06/10/2015 04:44 AM, leonardo.sandoval.gonzalez@linux.intel.com wrote:
> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>
> The 'dpkg-native' dependency introduced on 0a08dc is not neccesary
> needed if the mklibs-native code is secured with a try/catch statement
> when calling the dpkg-native application.
>
> [YOCTO #3782]
>
> Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> ---
> .../mklibs/mklibs-native_0.1.40.bb | 3 +-
> .../mklibs/catch-exception-if-dpkg-architect.patch | 103 +++++++++++++++++++++
> 2 files changed, 105 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
>
> diff --git a/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
> index b2fcae5..ff3fe08 100644
> --- a/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
> +++ b/meta/recipes-devtools/mklibs/mklibs-native_0.1.40.bb
> @@ -4,12 +4,13 @@ HOMEPAGE = "https://launchpad.net/mklibs"
> SECTION = "devel"
> LICENSE = "GPLv2+"
> LIC_FILES_CHKSUM = "file://debian/copyright;md5=98d31037b13d896e33890738ef01af64"
> -DEPENDS = "python-native dpkg-native"
> +DEPENDS = "python-native"
>
> SRC_URI = "http://ftp.de.debian.org/debian/pool/main/m/mklibs/${BPN}_${PV}.tar.xz \
> file://ac_init_fix.patch\
> file://fix_STT_GNU_IFUNC.patch\
> file://sysrooted-ldso.patch \
> + file://catch-exception-if-dpkg-architect.patch \
> "
>
> SRC_URI[md5sum] = "e1dafe5f962caa9dc5f2651c0723812a"
> diff --git a/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch b/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
> new file mode 100644
> index 0000000..55ff0a7
> --- /dev/null
> +++ b/meta/recipes-devtools/mklibs/mklibs/catch-exception-if-dpkg-architect.patch
> @@ -0,0 +1,103 @@
> +From 78a1245b5217ea42fc122b339684ff8d59059037 Mon Sep 17 00:00:00 2001
> +From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> +Date: Wed, 10 Jun 2015 07:24:23 +0000
> +Subject: [PATCH] mklibs,mklibs-copy: Catch exception if dpkg-architecture not
> + found
> +
> +Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> +---
> + src/mklibs | 33 ++++++++++++++++++---------------
> + src/mklibs-copy | 33 ++++++++++++++++++---------------
> + 2 files changed, 36 insertions(+), 30 deletions(-)
> +
> +diff --git a/src/mklibs b/src/mklibs
> +index a3533c0..75d2bb4 100755
> +--- a/src/mklibs
> ++++ b/src/mklibs
> +@@ -272,21 +272,24 @@ def extract_soname(so_file):
> + return ""
> +
> + def multiarch(paths):
> +- devnull = open('/dev/null', 'w')
> +- dpkg_architecture = subprocess.Popen(
> +- ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
> +- stdout=subprocess.PIPE, stderr=devnull)
> +- devnull.close()
> +- deb_host_multiarch, _ = dpkg_architecture.communicate()
> +- if dpkg_architecture.returncode == 0:
> +- deb_host_multiarch = deb_host_multiarch.rstrip('\n')
> +- new_paths = []
> +- for path in paths:
> +- new_paths.append(
> +- path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
> +- new_paths.append(path)
> +- return new_paths
> +- else:
> ++ try:
> ++ devnull = open('/dev/null', 'w')
> ++ dpkg_architecture = subprocess.Popen(
> ++ ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
> ++ stdout=subprocess.PIPE, stderr=devnull)
> ++ devnull.close()
> ++ deb_host_multiarch, _ = dpkg_architecture.communicate()
> ++ if dpkg_architecture.returncode == 0:
> ++ deb_host_multiarch = deb_host_multiarch.rstrip('\n')
> ++ new_paths = []
> ++ for path in paths:
> ++ new_paths.append(
> ++ path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
> ++ new_paths.append(path)
> ++ return new_paths
> ++ else:
> ++ return paths
> ++ except OSError:
> + return paths
> +
> + def usage(was_err):
> +diff --git a/src/mklibs-copy b/src/mklibs-copy
> +index c33985d..fc93ea1 100755
> +--- a/src/mklibs-copy
> ++++ b/src/mklibs-copy
> +@@ -116,21 +116,24 @@ def extract_soname(so_file):
> + return ""
> +
> + def multiarch(paths):
> +- devnull = open('/dev/null', 'w')
> +- dpkg_architecture = subprocess.Popen(
> +- ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
> +- stdout=subprocess.PIPE, stderr=devnull)
> +- devnull.close()
> +- deb_host_multiarch, _ = dpkg_architecture.communicate()
> +- if dpkg_architecture.returncode == 0:
> +- deb_host_multiarch = deb_host_multiarch.rstrip('\n')
> +- new_paths = []
> +- for path in paths:
> +- new_paths.append(
> +- path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
> +- new_paths.append(path)
> +- return new_paths
> +- else:
> ++ try:
> ++ devnull = open('/dev/null', 'w')
> ++ dpkg_architecture = subprocess.Popen(
> ++ ['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
> ++ stdout=subprocess.PIPE, stderr=devnull)
> ++ devnull.close()
> ++ deb_host_multiarch, _ = dpkg_architecture.communicate()
> ++ if dpkg_architecture.returncode == 0:
> ++ deb_host_multiarch = deb_host_multiarch.rstrip('\n')
> ++ new_paths = []
> ++ for path in paths:
> ++ new_paths.append(
> ++ path.replace('/lib', '/lib/%s' % deb_host_multiarch, 1))
> ++ new_paths.append(path)
> ++ return new_paths
> ++ else:
> ++ return paths
> ++ except OSError:
> + return paths
> +
> + def version(vers):
> +--
> +1.8.4.5
> +
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-07 15:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1433928968.git.leonardo.sandoval.gonzalez@linux.intel.com>
2015-06-10 9:44 ` [PATCH] mklibs-native: Remove the dpkg-native dependency leonardo.sandoval.gonzalez
2015-07-07 15:07 ` Leonardo Sandoval
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox