Patchwork scripts/oe-pkgdata-util: exclude unpackaged in glob output

login
register
mail settings
Submitter Paul Eggleton
Date July 30, 2012, 8:52 a.m.
Message ID <1343638321-25398-1-git-send-email-paul.eggleton@linux.intel.com>
Download mbox | patch
Permalink /patch/33273/
State Accepted
Commit 4a85d8a4026cf1d1603513ed9780f80c603cc611
Headers show

Comments

Paul Eggleton - July 30, 2012, 8:52 a.m.
Check for .packaged file and exclude packages if this file does not
exist - this avoids attempting to install empty packages during
complementary package installation within do_rootfs that didn't end up
being created (and failing as a result).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 scripts/oe-pkgdata-util |    4 ++++
 1 file changed, 4 insertions(+)
Andreas Müller - July 31, 2012, 1:12 p.m.
On Mon, Jul 30, 2012 at 10:52 AM, Paul Eggleton
<paul.eggleton@linux.intel.com> wrote:
> Check for .packaged file and exclude packages if this file does not
> exist - this avoids attempting to install empty packages during
> complementary package installation within do_rootfs that didn't end up
> being created (and failing as a result).
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  scripts/oe-pkgdata-util |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
> index 2427f10..900c27a 100755
> --- a/scripts/oe-pkgdata-util
> +++ b/scripts/oe-pkgdata-util
> @@ -112,6 +112,8 @@ def glob(args):
>                      fwdfile = fwdpkgdata(mappedpkg)
>                      if os.path.exists(fwdfile):
>                          mappedpkg = readrenamed(fwdfile)
> +                    if not os.path.exists(fwdfile + ".packaged"):
> +                        mappedpkg = ""
>                  else:
>                      # That didn't work, so now get the PN, substitute that, then map in the other direction
>                      revlink = revpkgdata(pkg)
> @@ -121,6 +123,8 @@ def glob(args):
>                          fwdfile = fwdpkgdata(newpkg)
>                          if os.path.exists(fwdfile):
>                              mappedpkg = readrenamed(fwdfile)
> +                        if not os.path.exists(fwdfile + ".packaged"):
> +                            mappedpkg = ""
>                      else:
>                          # Package doesn't even exist...
>                          if debug:
> --
> 1.7.9.5
Thanks for unbreaking do_rootfs part I

Acked-by: Andreas Müller <schnitzeltony@googlemail.com>

Patch

diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util
index 2427f10..900c27a 100755
--- a/scripts/oe-pkgdata-util
+++ b/scripts/oe-pkgdata-util
@@ -112,6 +112,8 @@  def glob(args):
                     fwdfile = fwdpkgdata(mappedpkg)
                     if os.path.exists(fwdfile):
                         mappedpkg = readrenamed(fwdfile)
+                    if not os.path.exists(fwdfile + ".packaged"):
+                        mappedpkg = ""
                 else:
                     # That didn't work, so now get the PN, substitute that, then map in the other direction
                     revlink = revpkgdata(pkg)
@@ -121,6 +123,8 @@  def glob(args):
                         fwdfile = fwdpkgdata(newpkg)
                         if os.path.exists(fwdfile):
                             mappedpkg = readrenamed(fwdfile)
+                        if not os.path.exists(fwdfile + ".packaged"):
+                            mappedpkg = ""
                     else:
                         # Package doesn't even exist...
                         if debug: