All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] mklibs-native: Remove the dpkg-native dependency
Date: Tue, 07 Jul 2015 10:07:41 -0500	[thread overview]
Message-ID: <559BEB3D.208@linux.intel.com> (raw)
In-Reply-To: <d2f0d2911c1db921dba223d55940fb2deec71cc9.1433928968.git.leonardo.sandoval.gonzalez@linux.intel.com>

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
> +
>


      reply	other threads:[~2015-07-07 15:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559BEB3D.208@linux.intel.com \
    --to=leonardo.sandoval.gonzalez@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.