All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [RFC PATCH 5/5] bitbake-layers: fix sorting of show_appends output
Date: Wed, 29 Jun 2011 19:37:41 +0100	[thread overview]
Message-ID: <4b3dc305f975d7156edeecb8c274b890f80f1167.1309372176.git.paul.eggleton@linux.intel.com> (raw)
In-Reply-To: <cover.1309372176.git.paul.eggleton@linux.intel.com>
In-Reply-To: <cover.1309372176.git.paul.eggleton@linux.intel.com>

Sort packages alphabetically but ensure appends are left in their
original order (layer priority).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/bin/bitbake-layers |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 110e3c8..dfbdb70 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -149,7 +149,9 @@ class Commands(cmd.Cmd):
 
         logger.info('State of append files:')
 
-        for pn in self.cooker_data.pkg_pn:
+        pnlist = list(self.cooker_data.pkg_pn.keys())
+        pnlist.sort( key=lambda item: item.pn )
+        for pn in pnlist:
             self.show_appends_for_pn(pn)
 
         self.show_appends_for_skipped()
@@ -188,7 +190,7 @@ class Commands(cmd.Cmd):
 
 
     def get_appends_for_files(self, filenames):
-        appended, notappended = set(), set()
+        appended, notappended = [], []
         for filename in filenames:
             _, cls = bb.cache.Cache.virtualfn2realfn(filename)
             if cls:
@@ -197,9 +199,9 @@ class Commands(cmd.Cmd):
             basename = os.path.basename(filename)
             appends = self.cooker_data.appends.get(basename)
             if appends:
-                appended.add((basename, frozenset(appends)))
+                appended.append((basename, list(appends)))
             else:
-                notappended.add(basename)
+                notappended.append(basename)
         return appended, notappended
 
     def show_appends_with_no_recipes(self):
-- 
1.7.4.1




  parent reply	other threads:[~2011-06-29 18:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29 18:37 [RFC PATCH 0/5] Layer tooling improvements v2 Paul Eggleton
2011-06-29 18:37 ` [RFC PATCH 1/5] bitbake: track 'overlayed' recipes Paul Eggleton
2011-06-29 18:37 ` [RFC PATCH 2/5] bitbake-layers: add show_overlayed action Paul Eggleton
2011-06-29 18:37 ` [RFC PATCH 3/5] bitbake/cooker: implement layer dependencies, make priority optional Paul Eggleton
2011-06-29 18:37 ` [RFC PATCH 4/5] bitbake-layers: add command to flatten layers into one Paul Eggleton
2011-06-29 18:37 ` Paul Eggleton [this message]
2011-07-05 12:26 ` [RFC PATCH 0/5] Layer tooling improvements v2 Richard Purdie

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=4b3dc305f975d7156edeecb8c274b890f80f1167.1309372176.git.paul.eggleton@linux.intel.com \
    --to=paul.eggleton@linux.intel.com \
    --cc=bitbake-devel@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.