[kernel-team] 13/86: lib/kconfigeditor/kconfig/package/files.py - Remove options without prompt. - Update file sort.

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Mon Dec 21 00:34:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch benh/kconfigeditor2
in repository kernel-team.

commit fb8fdf3143a4ca9b1ff1e61038dace610b3a6e49
Author: Bastian Blank <waldi at debian.org>
Date:   Tue Mar 11 17:44:29 2008 +0000

    lib/kconfigeditor/kconfig/package/files.py
    - Remove options without prompt.
    - Update file sort.
    
    svn path=/people/waldi/utils/kconfigeditor2/; revision=10808
---
 .../lib/kconfigeditor/kconfig/package/files.py              | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/utils/kconfigeditor2/lib/kconfigeditor/kconfig/package/files.py b/utils/kconfigeditor2/lib/kconfigeditor/kconfig/package/files.py
index d8127a4..b4177d6 100644
--- a/utils/kconfigeditor2/lib/kconfigeditor/kconfig/package/files.py
+++ b/utils/kconfigeditor2/lib/kconfigeditor/kconfig/package/files.py
@@ -117,7 +117,8 @@ class File(dict):
                 e = self.get(i.name, None)
                 if e is not None:
                     processed.add(i.name)
-                    ret.append(e)
+                    if i.prompt:
+                        ret.append(e)
         if ret:
             ret[0:0] = ["##", "## file: %s" % f.filename, "##"]
             ret.append('')
@@ -129,6 +130,16 @@ class File(dict):
             os.makedirs(os.path.dirname(filename))
         fd = file(filename, 'w')
 
+        def menufiles_cmp_key(entry):
+            filename_list = entry.filename.split('/')
+            if filename_list[-1] == 'Kconfig':
+                filename_list.pop()
+            else:
+                filename_list[-1] = filename_list[-1].replace('Kconfig.', '')
+            return filename_list
+
+        menufiles.sort(key = menufiles_cmp_key)
+
         ret = []
         processed = set()
         for f in menufiles:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list