All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request v2] Pull request for branch for-master/doc
@ 2013-02-25 21:31 Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 01/11] manual: fix cross-refs Samuel Martin
                   ` (10 more replies)
  0 siblings, 11 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Hello All!

Here is the 2nd round of this doc series.

Changes v1 -> v2:
  - drop the patches 4/9 and 5/9 (adding faq entries about controversial topic,
  they will be handled later);
  - integrate the kconfiglib module in the Buildroot source tree
  - rework gen-manual-lists.py;
  - split doc patches (generator script, makefiles and generated files) in
  distinct patches (hope this will ease the review ;-));
  - integrate the patch from Stephan Hoffmann in this series.


The following changes since commit 9ef10c2cf302a6a45205c998e555dc80b0409884:

  linux-firmware: switch to http url (2013-02-25 19:26:19 +0100)

are available in the git repository at:

  git://github.com/tSed/buildroot.git for-master/doc

for you to fetch changes up to 72489a607185be4b7e1e443ef340fc28395a54a0:

  Manual: add empty line after header in .mk files (2013-02-25 21:52:42 +0100)

----------------------------------------------------------------
Samuel Martin (10):
      manual: fix cross-refs
      manual: minor fix in patch-policy.txt
      manual: misc. post-{build,image} scripts fixes
      working-with: board support
      support: add kconfiglib python module
      support/scripts: add gen-manual-lists.py
      manual: add a make target 'manual-update-lists'
      manual: cleanup appendix.txt
      Makefile: add to the release target a warning about the manual updates.
      manual: update generated lists

Stephan Hoffmann (1):
      Manual: add empty line after header in .mk files

 Makefile                                  |    2 +
 docs/manual/adding-packages-autotools.txt |   33 +-
 docs/manual/adding-packages-cmake.txt     |   33 +-
 docs/manual/adding-packages-generic.txt   |   83 +-
 docs/manual/appendix.txt                  |   29 +-
 docs/manual/configure.txt                 |    3 +
 docs/manual/customize-rootfs.txt          |   30 +-
 docs/manual/customize-store.txt           |    7 +-
 docs/manual/customize-toolchain.txt       |    2 +-
 docs/manual/deprecated-list.txt           |   79 +-
 docs/manual/host-package-list.txt         |   19 +
 docs/manual/manual.mk                     |    8 +-
 docs/manual/package-list.txt              |  930 +++++++
 docs/manual/patch-policy.txt              |   12 +-
 docs/manual/pkg-list.txt                  |  870 -------
 docs/manual/working-with.txt              |    3 +-
 support/pym/kconfiglib.py                 | 3772 +++++++++++++++++++++++++++++
 support/pym/readme                        |   14 +
 support/scripts/gen-manual-lists.py       |  336 +++
 19 files changed, 5250 insertions(+), 1015 deletions(-)
 create mode 100644 docs/manual/host-package-list.txt
 create mode 100644 docs/manual/package-list.txt
 delete mode 100644 docs/manual/pkg-list.txt
 create mode 100644 support/pym/kconfiglib.py
 create mode 100644 support/pym/readme
 create mode 100755 support/scripts/gen-manual-lists.py

Yours,
Samuel

--

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 01/11] manual: fix cross-refs
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-28 21:38   ` Peter Korsgaard
  2013-02-25 21:31 ` [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt Samuel Martin
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/configure.txt           | 3 +++
 docs/manual/customize-store.txt     | 7 ++++++-
 docs/manual/customize-toolchain.txt | 2 +-
 docs/manual/working-with.txt        | 3 ++-
 4 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/docs/manual/configure.txt b/docs/manual/configure.txt
index 86cb173..4f9a6bb 100644
--- a/docs/manual/configure.txt
+++ b/docs/manual/configure.txt
@@ -64,6 +64,7 @@ Type+ option in the +Toolchain+ menu. Once one solution has been
 chosen, a number of configuration options appear, they are detailed in
 the following sections.
 
+[[internal-toolchain-backend]]
 Internal toolchain backend
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -138,6 +139,7 @@ Drawbacks of this backend:
   using the _External toolchain backend_.
 * Limited to the _uClibc_ C library.
 
+[[external-toolchain-backend]]
 External toolchain backend
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -240,6 +242,7 @@ Drawbacks of this backend:
   fix from the toolchain vendor, unless you build your external
   toolchain by yourself using Crosstool-NG.
 
+[[crosstool-ng-toolchain-backend]]
 Crosstool-NG toolchain backend
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/docs/manual/customize-store.txt b/docs/manual/customize-store.txt
index d770f0e..5083339 100644
--- a/docs/manual/customize-store.txt
+++ b/docs/manual/customize-store.txt
@@ -13,10 +13,13 @@ consists of the buildroot configuration, the configuration files for
 packages that you use (kernel, busybox, uClibc, ...), and your rootfs
 modifications.
 
+
+[[customize-store-basics]]
 Basics for storing the configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-[[customize-store-basics]]
 
+
+[[customize-store-buildroot-config]]
 Buildroot configuration
 ^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -35,6 +38,7 @@ Alternatively, you can copy the file to any other place and rebuild with
 +make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+.
 
 
+[[customize-store-package-config]]
 Other package configuration
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -71,6 +75,7 @@ configuration files easier.
   resp. +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
 
 
+[[customize-store-board-support]]
 Creating your own board support
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/docs/manual/customize-toolchain.txt b/docs/manual/customize-toolchain.txt
index 4397979..811a6dc 100644
--- a/docs/manual/customize-toolchain.txt
+++ b/docs/manual/customize-toolchain.txt
@@ -15,7 +15,7 @@ There is no way of tuning an external toolchain since Buildroot does not
 generate it.
 
 It also requires to set the Buildroot settings according to the toolchain ones
-(see xref:external-toolchain[]).
+(see xref:external-toolchain-backend[]).
 
 Using the internal Buildroot toolchain backend
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/docs/manual/working-with.txt b/docs/manual/working-with.txt
index b69d1e2..a57169c 100644
--- a/docs/manual/working-with.txt
+++ b/docs/manual/working-with.txt
@@ -25,4 +25,5 @@ interested in hacking it to add:
 
 * new packages: refer to the xref:adding-packages[Developer guide]
 
-* new board support: refer to the xref:board-support[Developer guide]
+* new board support: refer to the xref:customize-store[], more specifically
+  xref:customize-store-board-support[].
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 01/11] manual: fix cross-refs Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-26  8:29   ` Thomas Petazzoni
  2013-02-25 21:31 ` [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes Samuel Martin
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/patch-policy.txt | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/docs/manual/patch-policy.txt b/docs/manual/patch-policy.txt
index 14c6efc..114c81e 100644
--- a/docs/manual/patch-policy.txt
+++ b/docs/manual/patch-policy.txt
@@ -40,6 +40,14 @@ A +series+ file, as used by +quilt+, may also be added in the
 package directory. In that case, the +series+ file defines the patch
 application order.
 
+.Notes
+- The patch files coming with Buildroot should not contain any package version
+reference in their filename.
+- If a patch does some package version fixes, this should be documented in the
+commit message of the patch itself (or the message prepended to the 'diff'
+itself).
+
+
 How patches are applied
 ~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -56,8 +64,8 @@ How patches are applied
 * If a +series+ file exists in the package directory, then patches are
   applied according to the +series+ file;
 +
-* Otherwise, patch files matching `<packagename>-*.patch` are applied
-  following the +ls+ command order.
+* Otherwise, patch files matching +<packagename>-<description>.patch+
+  are applied following the +ls+ command order.
 
 . Run the +<packagename>_POST_PATCH_HOOKS+ commands if defined.
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 01/11] manual: fix cross-refs Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-26  8:30   ` Thomas Petazzoni
  2013-02-28 21:39   ` Peter Korsgaard
  2013-02-25 21:31 ` [Buildroot] [PATCH 04/11] working-with: board support Samuel Martin
                   ` (7 subsequent siblings)
  10 siblings, 2 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

* update post-build scripts mechanism that now support several scripts
* fix formatting

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Changes since v1:
* rewording and formatting fixes (Arnout)
---
 docs/manual/customize-rootfs.txt | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/docs/manual/customize-rootfs.txt b/docs/manual/customize-rootfs.txt
index 4a4d620..7ff8d8b 100644
--- a/docs/manual/customize-rootfs.txt
+++ b/docs/manual/customize-rootfs.txt
@@ -25,18 +25,18 @@ there are a few ways to customize the resulting target filesystem.
   directories, +.empty+ files and files ending with +~+ are excluded.
   _Among these first 3 methods, this one should be preferred_.
 
-* In the Buildroot configuration, you can specify the path to a
-  *post-build script*, that gets called 'after' Buildroot builds all the
-  selected software, but 'before' the rootfs packages are
-  assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ will allow you to
-  specify the location of your post-build script. This option can be
+* In the Buildroot configuration, you can specify the paths to one or
+  more *post-build scripts*. These scripts are called in the given order,
+  'after' Buildroot builds all the selected software, but 'before' the
+  rootfs images are assembled. The +BR2_ROOTFS_POST_BUILD_SCRIPT+ allows
+  you to specify the location of your post-build scripts. This option can be
   found in the +System configuration+ menu. The destination root
-  filesystem folder is given as the first argument to this script,
-  and this script can then be used to remove or modify any file in your
+  filesystem folder is given as the first argument to these scripts,
+  and these scripts can then be used to remove or modify any file in your
   target filesystem. You should, however, use this feature with care.
   Whenever you find that a certain package generates wrong or unneeded
-  files, you should fix that package rather than work around it with a
-  post-build cleanup script.
+  files, you should fix that package rather than work around it with some
+  post-build cleanup scripts.
   You may also use these variables in your post-build script:
     - +BUILDROOT_CONFIG+: the path to the Buildroot .config file
     - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see
@@ -55,23 +55,25 @@ there are a few ways to customize the resulting target filesystem.
   installation. Note that this method is *not recommended*, as it
   duplicates the entire skeleton, which prevents from taking advantage
   of the fixes or improvements brought to the default Buildroot
-  skeleton. The recommended method is to use the _post-build script_
+  skeleton. The recommended method is to use the _post-build scripts_
   mechanism described in the previous item.
 
-Note also that if you want to perform some specific actions *after*
-all filesystem images have been created (for example to automatically
+Note also that you can use the *post-image scripts*
+if you want to perform some specific actions 'after' all
+filesystem images have been created (for example to automatically
 extract your root filesystem tarball in a location exported by your
 NFS server, or to create a special firmware image that bundles your
 root filesystem and kernel image, or any other custom action), you can
 specify a space-separated list of scripts in the
-+BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option.
++BR2_ROOTFS_POST_IMAGE_SCRIPT+ configuration option. This option can be
+found in the +System configuration+ menu as well.
 
 Each of those scripts will be called with the path to the +images+
 output directory as first and unique argument, and will be executed
 with the main Buildroot source directory as the current
 directory. Those scripts will be executed as the user that executes
 Buildroot, which should normally not be the root user. Therefore, any
-action requiring root permissions in one of these post-image script
+action requiring root permissions in one of these _post-image scripts_
 will require special handling (usage of fakeroot or sudo), which is
 left to the script developer.
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 04/11] working-with: board support
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (2 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-26 17:45   ` Arnout Vandecappelle
  2013-02-28 21:39   ` Peter Korsgaard
  2013-02-25 21:31 ` [Buildroot] [PATCH 05/11] support: add kconfiglib python module Samuel Martin
                   ` (6 subsequent siblings)
  10 siblings, 2 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Changes since v1:
* simplify cross-ref (Arnout)
---
 docs/manual/working-with.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/manual/working-with.txt b/docs/manual/working-with.txt
index a57169c..4432b54 100644
--- a/docs/manual/working-with.txt
+++ b/docs/manual/working-with.txt
@@ -25,5 +25,5 @@ interested in hacking it to add:
 
 * new packages: refer to the xref:adding-packages[Developer guide]
 
-* new board support: refer to the xref:customize-store[], more specifically
-  xref:customize-store-board-support[].
+* new board support: refer to the
+  xref:customize-store-board-support[Developer guide].
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 05/11] support: add kconfiglib python module
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (3 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 04/11] working-with: board support Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-26 20:18   ` Arnout Vandecappelle
  2013-02-25 21:31 ` [Buildroot] [PATCH 06/11] support/scripts: add gen-manual-lists.py Samuel Martin
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 support/pym/kconfiglib.py | 3772 +++++++++++++++++++++++++++++++++++++++++++++
 support/pym/readme        |   14 +
 2 files changed, 3786 insertions(+)
 create mode 100644 support/pym/kconfiglib.py
 create mode 100644 support/pym/readme

diff --git a/support/pym/kconfiglib.py b/support/pym/kconfiglib.py
new file mode 100644
index 0000000..0704cc0
--- /dev/null
+++ b/support/pym/kconfiglib.py
@@ -0,0 +1,3772 @@
+# This is Kconfiglib, a Python library for scripting, debugging, and extracting
+# information from Kconfig-based configuration systems. To view the
+# documentation, run
+#
+#  $ pydoc kconfiglib
+#
+# or, if you prefer HTML,
+#
+#  $ pydoc -w kconfiglib
+#
+# The examples/ subdirectory contains examples, to be run with e.g.
+#
+#  $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py
+#
+# Look in testsuite.py for the test suite.
+
+"""
+Kconfiglib is a Python library for scripting and extracting information from
+Kconfig-based configuration systems. Features include the following:
+
+ - Symbol values and properties can be looked up and values assigned
+   programmatically.
+ - .config files can be read and written.
+ - Expressions can be evaluated in the context of a Kconfig configuration.
+ - Relations between symbols can be quickly determined, such as finding all
+   symbols that reference a particular symbol.
+ - Highly compatible with the scripts/kconfig/*conf utilities. The test suite
+   automatically compares outputs between Kconfiglib and the C implementation
+   for a large number of cases.
+
+For the Linux kernel, scripts are run using
+
+ $ make scriptconfig SCRIPT=<path to script> [SCRIPT_ARG=<arg>]
+
+Running scripts via the 'scriptconfig' target ensures that required environment
+variables (SRCARCH, ARCH, srctree, KERNELVERSION, etc.) are set up correctly.
+Alternative architectures can be specified like for other 'make *config'
+targets:
+
+ $ make scriptconfig ARCH=mips SCRIPT=<path to script> [SCRIPT_ARG=<arg>]
+
+The script will receive the name of the Kconfig file to load in sys.argv[1].
+(As of Linux 3.7.0-rc8 this is always "Kconfig" from the kernel top-level
+directory.) If an argument is provided with SCRIPT_ARG, it will appear in
+sys.argv[2].
+
+To get an interactive Python prompt with Kconfiglib preloaded and a Config
+object 'c' created, use
+
+ $ make iscriptconfig [ARCH=<architecture>]
+
+Kconfiglib requires Python 2. For (i)scriptconfig the command to run the Python
+interpreter can be passed in the environment variable PYTHONCMD (defaults to
+'python'; PyPy works too and is a bit faster).
+
+Look in the examples/ subdirectory for examples, which can be run with e.g.
+
+ $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py
+
+or
+
+ $ make scriptconfig SCRIPT=Kconfiglib/examples/help_grep.py SCRIPT_ARG="kernel"
+
+Look in testsuite.py for the test suite.
+
+Credits: Written by Ulf "Ulfalizer" Magnusson
+
+Send bug reports, suggestions and other feedback to kconfiglib at gmail.com .
+Don't wrestle with internal APIs. Tell me what you need and I might add it in a
+safe way as a client API instead."""
+
+# If you have Psyco installed (32-bit installations, Python <= 2.6 only),
+# setting this to True (right here, not@runtime) might give a nice speedup.
+# (22% faster for parsing arch/x86/Kconfig and 58% faster for evaluating all
+# symbols in it without a .config on my Core Duo.)
+use_psyco = False
+
+import os
+import re
+import string
+import sys
+
+class Config():
+
+    """Represents a Kconfig configuration, e.g. for i386 or ARM. This is the
+    set of symbols and other items appearing in the configuration together with
+    their values. Creating any number of Config objects -- including for
+    different architectures -- is safe; Kconfiglib has no global state."""
+
+    #
+    # Public interface
+    #
+
+    def __init__(self,
+                 filename = "Kconfig",
+                 base_dir = "$srctree",
+                 print_warnings = True,
+                 print_undef_assign = False):
+        """Creates a new Config object, representing a Kconfig configuration.
+        Raises Kconfig_Syntax_Error on syntax errors.
+
+        filename (default: "Kconfig") -- The base Kconfig file of the
+                 configuration. For the Linux kernel, this should usually be be
+                 "Kconfig" from the top-level directory, as environment
+                 variables will make sure the right Kconfig is included from
+                 there (usually arch/<architecture>/Kconfig). If you are using
+                 kconfiglib via 'make scriptconfig' the filename of the
+                 correct Kconfig will be in sys.argv[1].
+
+        base_dir (default: "$srctree") -- The base directory relative to which
+                'source' statements within Kconfig files will work. For the
+                Linux kernel this should be the top-level directory of the
+                kernel tree. $-references to environment variables will be
+                expanded.
+
+                The environment variable 'srctree' is set by the Linux makefiles
+                to the top-level kernel directory. A default of "." would not
+                work if an alternative build directory is used.
+
+        print_warnings (default: True) -- Set to True if warnings related to
+                       this configuration should be printed to stderr. This can
+                       be changed later with Config.set_print_warnings(). It is
+                       provided as a constructor argument since warnings might
+                       be generated during parsing.
+
+        print_undef_assign (default: False) -- Set to True if informational
+                           messages related to assignments to undefined symbols
+                           should be printed to stderr for this configuration.
+                           Can be changed later with
+                           Config.set_print_undef_assign()."""
+
+        # The set of all symbols, indexed by name (a string)
+        self.syms = {}
+
+        # The set of all defined symbols in the configuration in the order they
+        # appear in the Kconfig files. This excludes the special symbols n, m,
+        # and y as well as symbols that are referenced but never defined.
+        self.kconfig_syms = []
+
+        # The set of all named choices (yes, choices can have names), indexed
+        # by name (a string)
+        self.named_choices = {}
+
+        def register_special_symbol(type, name, value):
+            sym = Symbol()
+            sym.is_special_ = True
+            sym.is_defined_ = True
+            sym.config = self
+            sym.name = name
+            sym.type = type
+            sym.cached_value = value
+            self.syms[name] = sym
+            return sym
+
+        # The special symbols n, m and y, used as shorthand for "n", "m" and
+        # "y"
+        self.n = register_special_symbol(TRISTATE, "n", "n")
+        self.m = register_special_symbol(TRISTATE, "m", "m")
+        self.y = register_special_symbol(TRISTATE, "y", "y")
+
+        # DEFCONFIG_LIST uses this
+        register_special_symbol(STRING, "UNAME_RELEASE", os.uname()[2])
+
+        # The symbol with "option defconfig_list" set, containing a list of
+        # default .config files
+        self.defconfig_sym = None
+
+        # See Symbol.get_(src)arch()
+        self.arch    = os.environ.get("ARCH")
+        self.srcarch = os.environ.get("SRCARCH")
+
+        # See Config.__init__(). We need this for get_defconfig_filename().
+        self.srctree = os.environ.get("srctree")
+        if self.srctree is None:
+            self.srctree = "."
+
+        self.filename = filename
+        self.base_dir = _strip_trailing_slash(os.path.expandvars(base_dir))
+
+        # The 'mainmenu' text
+        self.mainmenu_text = None
+
+        # The filename of the most recently loaded .config file
+        self.config_filename = None
+
+        # The textual header of the most recently loaded .config, uncommented
+        self.config_header = None
+
+        self.print_warnings = print_warnings
+        self.print_undef_assign = print_undef_assign
+
+        # Lists containing all choices, menus and comments in the configuration
+
+        self.choices = []
+        self.menus = []
+        self.comments = []
+
+        # For parsing routines that stop when finding a line belonging to a
+        # different construct, these holds that line and the tokenized version
+        # of that line. The purpose is to avoid having to re-tokenize the line,
+        # which is inefficient and causes problems when recording references to
+        # symbols.
+        self.end_line = None
+        self.end_line_tokens = None
+
+        # See the comment in _parse_expr().
+        self.parse_expr_cur_sym_or_choice = None
+        self.parse_expr_line = None
+        self.parse_expr_filename = None
+        self.parse_expr_linenr = None
+        self.parse_expr_transform_m = None
+
+        # Parse the Kconfig files
+        self.top_block = self._parse_file(filename, None, None, None)
+
+        # Build Symbol.dep for all symbols
+        self._build_dep()
+
+    def load_config(self, filename, replace = True):
+        """Loads symbol values from a file in the familiar .config format.
+           Equivalent to calling Symbol.set_user_value() to set each of the
+           values.
+
+           filename -- The .config file to load. $-references to environment
+                       variables will be expanded. For scripts to work even
+                       when an alternative build directory is used with the
+                       Linux kernel, you need to refer to the top-level kernel
+                       directory with "$srctree".
+
+           replace (default: True) -- True if the configuration should replace
+                   the old configuration; False if it should add to it."""
+
+        def warn_override(filename, linenr, name, old_user_val, new_user_val):
+            self._warn("overriding the value of {0}. "
+                       'Old value: "{1}", new value: "{2}".'
+                        .format(name, old_user_val, new_user_val),
+                       filename,
+                       linenr)
+
+        filename = os.path.expandvars(filename)
+
+        # Put this first so that a missing file doesn't screw up our state
+        line_feeder = _FileFeed(_get_lines(filename), filename)
+
+        self.config_filename = filename
+
+        # Invalidate everything. This is usually faster than finding the
+        # minimal set of symbols that needs to be invalidated, as nearly all
+        # symbols will tend to be affected anyway.
+        if replace:
+            self.unset_user_values()
+        else:
+            self._invalidate_all()
+
+        # Read header
+
+        self.config_header = None
+
+        def is_header_line(line):
+            return line.startswith("#") and \
+                   not unset_re.match(line)
+
+        first_line = line_feeder.get_next()
+
+        if first_line is None:
+            return
+
+        if not is_header_line(first_line):
+            line_feeder.go_back()
+        else:
+            self.config_header = first_line[1:]
+
+            # Read remaining header lines
+            while 1:
+                line = line_feeder.get_next()
+
+                if line is None:
+                    break
+
+                if not is_header_line(line):
+                    line_feeder.go_back()
+                    break
+
+                self.config_header += line[1:]
+
+            # Remove trailing newline
+            if self.config_header.endswith("\n"):
+                self.config_header = self.config_header[:-1]
+
+        # Read assignments
+
+        filename = line_feeder.get_filename()
+
+        while 1:
+            line = line_feeder.get_next()
+            if line is None:
+                return
+
+            linenr = line_feeder.get_linenr()
+
+            line = line.strip()
+
+            set_re_match = set_re.match(line)
+            if set_re_match:
+                name, val = set_re_match.groups()
+                # The unescaping producedure below should be safe since " can
+                # only appear as \" inside the string
+                val = _strip_quotes(val, line, filename, linenr)\
+                      .replace('\\"', '"').replace("\\\\", "\\")
+                if name in self.syms:
+                    sym = self.syms[name]
+
+                    old_user_val = sym.user_val
+                    if old_user_val is not None:
+                        warn_override(filename, linenr, name, old_user_val, val)
+
+                    if sym.is_choice_symbol_:
+                        user_mode = sym.parent.user_mode
+                        if user_mode is not None and user_mode != val:
+                            self._warn("assignment to {0} changes mode of containing "
+                                       'choice from "{1}" to "{2}".'
+                                       .format(name, val, user_mode),
+                                       filename,
+                                       linenr)
+
+                    sym._set_user_value_no_invalidate(val, True)
+
+                else:
+                    self._undef_assign('attempt to assign the value "{0}" to the '
+                                       "undefined symbol {1}."
+                                       .format(val, name),
+                                       filename,
+                                       linenr)
+
+            else:
+                unset_re_match = unset_re.match(line)
+                if unset_re_match:
+                    name = unset_re_match.group(1)
+                    if name in self.syms:
+                        sym = self.syms[name]
+
+                        old_user_val = sym.user_val
+                        if old_user_val is not None:
+                            warn_override(filename, linenr, name, old_user_val, "n")
+
+                        sym._set_user_value_no_invalidate("n", True)
+
+    def write_config(self, filename, header = None):
+        """Writes out symbol values in the familiar .config format.
+
+           filename -- The filename under which to save the configuration.
+
+           header (default: None) -- A textual header that will appear at the
+                  beginning of the file, with each line commented out
+                  automatically. None means no header."""
+
+        # already_written is set when _make_conf() is called on a symbol, so
+        # that symbols defined in multiple locations only get one entry in the
+        # .config. We need to reset it prior to writing out a new .config.
+        for sym in self.syms.itervalues():
+            sym.already_written = False
+
+        with open(filename, "w") as f:
+            # Write header
+            if header is not None:
+                f.write(_comment(header))
+                f.write("\n")
+
+            # Write configuration.
+            # (You'd think passing a list around to all the nodes and appending
+            # to it to avoid copying would be faster, but it's actually a lot
+            # slower with PyPy, and about as fast with Python. Passing the file
+            # around is slower too.)
+            f.write("\n".join(self.top_block._make_conf()))
+            f.write("\n")
+
+    def get_kconfig_filename(self):
+        """Returns the name of the (base) kconfig file this configuration was
+        loaded from."""
+        return self.filename
+
+    def get_arch(self):
+        """Returns the value the environment variable ARCH had at the time the
+        Config instance was created, or None if ARCH was not set. For the
+        kernel, this corresponds to the architecture being built for, with
+        values such as "i386" or "mips"."""
+        return self.arch
+
+    def get_srcarch(self):
+        """Returns the value the environment variable SRCARCH had at the time
+        the Config instance was created, or None if SRCARCH was not set. For
+        the kernel, this corresponds to the arch/ subdirectory containing
+        architecture-specific source code."""
+        return self.srcarch
+
+    def get_srctree(self):
+        """Returns the value the environment variable srctree had at the time
+        the Config instance was created, or None if srctree was not defined.
+        This variable points to the source directory and is used when building
+        in a separate directory."""
+        return self.srctree
+
+    def get_config_filename(self):
+        """Returns the name of the most recently loaded configuration file, or
+        None if no configuration has been loaded."""
+        return self.config_filename
+
+    def get_mainmenu_text(self):
+        """Returns the text of the 'mainmenu' statement (with $-references to
+        symbols replaced by symbol values), or None if the configuration has no
+        'mainmenu' statement."""
+        return None if self.mainmenu_text is None else \
+          self._expand_sym_refs(self.mainmenu_text)
+
+    def get_defconfig_filename(self):
+        """Returns the name of the defconfig file, which is the first existing
+        file in the list given in a symbol having 'option defconfig_list' set.
+        $-references to symbols will be expanded ("$FOO bar" -> "foo bar" if
+        FOO has the value "foo"). Returns None in case of no defconfig file.
+        Setting 'option defconfig_list' on multiple symbols currently results
+        in undefined behavior.
+
+        If the environment variable 'srctree' was set when the Config was
+        created, get_defconfig_filename() will first look relative to that
+        directory before looking in the current directory; see
+        Config.__init__()."""
+
+        if self.defconfig_sym is None:
+            return None
+
+        for (filename, cond_expr) in self.defconfig_sym.def_exprs:
+            if self._eval_expr(cond_expr) == "y":
+                filename = self._expand_sym_refs(filename)
+
+                # We first look in $srctree. os.path.join() won't work here as
+                # an absolute path in filename would override $srctree.
+                srctree_filename = os.path.normpath(self.srctree + "/" + filename)
+                if os.path.exists(srctree_filename):
+                    return srctree_filename
+
+                if os.path.exists(filename):
+                    return filename
+
+        return None
+
+    def get_symbol(self, name):
+        """Returns the symbol with name 'name', or None if no such symbol
+        appears in the configuration. An alternative shorthand is conf[name],
+        where conf is a Config instance, though that will instead raise
+        KeyError if the symbol does not exist."""
+        return self.syms.get(name)
+
+    def get_top_level_items(self):
+        """Returns a list containing the items (symbols, menus, choice
+        statements and comments) at the top level of the configuration -- that
+        is, all items that do not appear within a menu or choice. The items
+        appear in the same order as within the configuration."""
+        return self.top_block.get_items()
+
+    def get_symbols(self, all_symbols = True):
+        """Returns a list of symbols from the configuration. An alternative for
+        iterating over all defined symbols (in the order of definition) is
+
+        for sym in config:
+            ...
+
+        which relies on Config implementing __iter__() and is equivalent to
+
+        for sym in config.get_symbols(False):
+            ...
+
+        all_symbols (default: True) -- If True, all symbols - including special
+                    and undefined symbols - will be included in the result, in
+                    an undefined order. If False, only symbols actually defined
+                    and not merely referred to in the configuration will be
+                    included in the result, and will appear in the order that
+                    they are defined within the Kconfig configuration files."""
+        return self.syms.values() if all_symbols else self.kconfig_syms
+
+    def get_choices(self):
+        """Returns a list containing all choice statements in the
+        configuration, in the order they appear in the Kconfig files."""
+        return self.choices
+
+    def get_menus(self):
+        """Returns a list containing all menus in the configuration, in the
+        order they appear in the Kconfig files."""
+        return self.menus
+
+    def get_comments(self):
+        """Returns a list containing all comments in the configuration, in the
+        order they appear in the Kconfig files."""
+        return self.comments
+
+    def eval(self, s):
+        """Returns the value of the expression 's' -- where 's' is represented
+        as a string -- in the context of the configuration. Raises
+        Kconfig_Syntax_Error if syntax errors are detected in 's'.
+
+        For example, if FOO and BAR are tristate symbols at least one of which
+        has the value "y", then config.eval("y && (FOO || BAR)") => "y"
+
+        This functions always yields a tristate value. To get the value of
+        non-bool, non-tristate symbols, use Symbol.get_value().
+
+        The result of this function is consistent with how evaluation works for
+        conditional expressions in the configuration as well as in the C
+        implementation. "m" and m are rewritten as '"m" && MODULES' and 'm &&
+        MODULES', respectively, and a result of "m" will get promoted to "y" if
+        we're running without modules."""
+        return self._eval_expr(self._parse_expr(self._tokenize(s, True), # Feed
+                                                None, # Current symbol or choice
+                                                s))   # line
+
+    def get_config_header(self):
+        """Returns the (uncommented) textual header of the .config file most
+        recently loaded with load_config(). Returns None if no .config file has
+        been loaded or if the most recently loaded .config file has no header.
+        The header comprises all lines up to but not including the first line
+        that either
+
+        1. Does not start with "#"
+        2. Has the form "# CONFIG_FOO is not set."
+        """
+        return self.config_header
+
+    def get_base_dir(self):
+        """Returns the base directory relative to which 'source' statements
+        will work, passed as an argument to Config.__init__()."""
+        return self.base_dir
+
+    def set_print_warnings(self, print_warnings):
+        """Determines whether warnings related to this configuration (for
+        things like attempting to assign illegal values to symbols with
+        Symbol.set_user_value()) should be printed to stderr.
+
+        print_warnings -- True if warnings should be
+                          printed, otherwise False."""
+        self.print_warnings = print_warnings
+
+    def set_print_undef_assign(self, print_undef_assign):
+        """Determines whether informational messages related to assignments to
+        undefined symbols should be printed to stderr for this configuration.
+
+        print_undef_assign -- If True, such messages will be printed."""
+        self.print_undef_assign = print_undef_assign
+
+    def __getitem__(self, key):
+        """Returns the symbol with name 'name'. Raises KeyError if the symbol
+        does not appear in the configuration."""
+        return self.syms[key]
+
+    def __iter__(self):
+        """Convenience function for iterating over the set of all defined
+        symbols in the configuration, used like
+
+        for sym in conf:
+            ...
+
+        The iteration happens in the order of definition within the Kconfig
+        configuration files. Symbols only referred to but not defined will not
+        be included, nor will the special symbols n, m, and y. If you want to
+        include such symbols as well, see config.get_symbols()."""
+        return iter(self.kconfig_syms)
+
+    def unset_user_values(self):
+        """Resets the values of all symbols, as if Config.load_config() or
+        Symbol.set_user_value() had never been called."""
+        for sym in self.syms.itervalues():
+            sym._unset_user_value_no_recursive_invalidate()
+
+    def __str__(self):
+        """Returns a string containing various information about the Config."""
+        return _sep_lines("Configuration",
+                          "File                                   : " + self.filename,
+                          "Base directory                         : " + self.base_dir,
+                          "Value of $ARCH at creation time        : " +
+                            ("(not set)" if self.arch is None else self.arch),
+                          "Value of $SRCARCH at creation time     : " +
+                            ("(not set)" if self.srcarch is None else self.srcarch),
+                          "Source tree (derived from $srctree;",
+                          "defaults to '.' if $srctree isn't set) : " + self.srctree,
+                          "Most recently loaded .config           : " +
+                            ("(no .config loaded)" if self.config_filename is None else
+                             self.config_filename),
+                          "Print warnings                         : " +
+                            bool_str[self.print_warnings],
+                          "Print assignments to undefined symbols : " +
+                            bool_str[self.print_undef_assign])
+
+
+    #
+    # Private methods
+    #
+
+    def _invalidate_all(self):
+        for sym in self.syms.itervalues():
+            sym._invalidate()
+
+    def _tokenize(self,
+                  s,
+                  for_eval = False,
+                  filename = None,
+                  linenr = None):
+        """Returns a _Feed instance containing tokens derived from the string
+        's'. Registers any new symbols encountered (via _sym_lookup()).
+
+        (I experimented with a pure regular expression implementation, but it
+        came out slower, less readable, and wouldn't have been as flexible.)
+
+        for_eval -- True when parsing an expression for a call to
+                    Config.eval(), in which case we should not treat the first
+                    token specially nor register new symbols."""
+        s = s.lstrip()
+        if s == "" or s[0] == "#":
+            return _Feed([])
+
+        if for_eval:
+            i = 0 # The current index in the string being tokenized
+            previous = None # The previous token seen
+            tokens = []
+        else:
+            # The initial word on a line is parsed specially. Let
+            # command_chars = [A-Za-z0-9_]. Then
+            #  - leading non-command_chars characters on the line are ignored, and
+            #  - the first token consists the following one or more command_chars
+            #    characters.
+            # This is why things like "----help--" are accepted.
+
+            initial_token_match = initial_token_re.match(s)
+            if initial_token_match is None:
+                return _Feed([])
+            # The current index in the string being tokenized
+            i = initial_token_match.end()
+
+            keyword = keywords.get(initial_token_match.group(1))
+            if keyword is None:
+                # We expect a keyword as the first token
+                _tokenization_error(s, len(s), filename, linenr)
+            if keyword == T_HELP:
+                # Avoid junk after "help", e.g. "---", being registered as a
+                # symbol
+                return _Feed([T_HELP])
+            tokens = [keyword]
+            previous = keyword
+
+        # _tokenize() is a hotspot during parsing, and this speeds things up a
+        # bit
+        strlen = len(s)
+        append = tokens.append
+
+        # Main tokenization loop. (Handles tokens past the first one.)
+        while i < strlen:
+            # Test for an identifier/keyword preceded by whitespace first; this
+            # is the most common case.
+            id_keyword_match = id_keyword_re.match(s, i)
+            if id_keyword_match:
+                # We have an identifier or keyword. The above also stripped any
+                # whitespace for us.
+                name = id_keyword_match.group(1)
+                # Jump past it
+                i = id_keyword_match.end()
+
+                # Keyword?
+                keyword = keywords.get(name)
+                if keyword is not None:
+                    append(keyword)
+                # What would ordinarily be considered a name is treated as a
+                # string after certain tokens.
+                elif previous in string_lex:
+                    append(name)
+                else:
+                    # We're dealing with a symbol. _sym_lookup() will take care
+                    # of allocating a new Symbol instance if it's the first
+                    # time we see it.
+                    sym = self._sym_lookup(name, not for_eval)
+
+                    if previous == T_CONFIG or previous == T_MENUCONFIG:
+                        # If the previous token is T_(MENU)CONFIG
+                        # ("(menu)config"), we're tokenizing the first line of
+                        # a symbol definition, and should remember this as a
+                        # location where the symbol is defined.
+                        sym.def_locations.append((filename, linenr))
+                    else:
+                        # Otherwise, it's a reference to the symbol
+                        sym.ref_locations.append((filename, linenr))
+
+                    append(sym)
+
+            else:
+                # This restrips whitespace that could have been stripped in the
+                # regex above, but it's worth it since identifiers/keywords are
+                # more common
+                s = s[i:].lstrip()
+                if s == "":
+                    break
+                strlen = len(s)
+                i = 0
+                c = s[0]
+
+                # String literal (constant symbol)
+                if c == '"' or c == "'":
+                    i += 1
+
+                    if "\\" in s:
+                        # Slow path: This could probably be sped up, but it's a
+                        # very unusual case anyway.
+                        quote = c
+                        value = ""
+                        while 1:
+                            if i >= strlen:
+                                _tokenization_error(s, strlen, filename,
+                                                    linenr)
+                            c = s[i]
+                            if c == quote:
+                                break
+                            if c == "\\":
+                                if i + 1 >= strlen:
+                                    _tokenization_error(s, strlen, filename,
+                                                        linenr)
+                                value += s[i + 1]
+                                i += 2
+                            else:
+                                value += c
+                                i += 1
+                        i += 1
+                        append(value)
+                    else:
+                        # Fast path: If the string contains no backslashes (almost
+                        # always) we can simply look for the matching quote.
+                        end = s.find(c, i)
+                        if end == -1:
+                            _tokenization_error(s, strlen, filename, linenr)
+                        append(s[i:end])
+                        i = end + 1
+
+                elif c == "&":
+                    if i + 1 >= strlen:
+                        # Invalid characters are ignored
+                        continue
+                    if s[i + 1] != "&":
+                        # Invalid characters are ignored
+                        i += 1
+                        continue
+                    append(T_AND)
+                    i += 2
+
+                elif c == "|":
+                    if i + 1 >= strlen:
+                        # Invalid characters are ignored
+                        continue
+                    if s[i + 1] != "|":
+                        # Invalid characters are ignored
+                        i += 1
+                        continue
+                    append(T_OR)
+                    i += 2
+
+                elif c == "!":
+                    if i + 1 >= strlen:
+                        _tokenization_error(s, strlen, filename, linenr)
+                    if s[i + 1] == "=":
+                        append(T_UNEQUAL)
+                        i += 2
+                    else:
+                        append(T_NOT)
+                        i += 1
+
+                elif c == "=":
+                    append(T_EQUAL)
+                    i += 1
+
+                elif c == "(":
+                    append(T_OPEN_PAREN)
+                    i += 1
+
+                elif c == ")":
+                    append(T_CLOSE_PAREN)
+                    i += 1
+
+                elif c == "#":
+                    break
+
+                else:
+                    # Invalid characters are ignored
+                    i += 1
+                    continue
+
+            previous = tokens[-1]
+
+        return _Feed(tokens)
+
+    #
+    # Parsing
+    #
+
+    # Expression grammar:
+    #
+    # <expr> -> <symbol>
+    #           <symbol> '=' <symbol>
+    #           <symbol> '!=' <symbol>
+    #           '(' <expr> ')'
+    #           '!' <expr>
+    #           <expr> '&&' <expr>
+    #           <expr> '||' <expr>
+
+    def _parse_expr(self,
+                    feed,
+                    cur_sym_or_choice,
+                    line,
+                    filename = None,
+                    linenr = None,
+                    transform_m = True):
+        """Parse an expression from the tokens in 'feed' using a simple
+        top-down approach. The result has the form (<operator>, <list
+        containing parsed operands>).
+
+        feed -- _Feed instance containing the tokens for the expression.
+
+        cur_sym_or_choice -- The symbol or choice currently being parsed, or
+                             None if we're not parsing a symbol or choice.
+                             Used for recording references to symbols.
+
+        line -- The line containing the expression being parsed.
+
+        filename (default: None) -- The file containing the expression.
+
+        linenr (default: None) -- The line number containing the expression.
+
+        transform_m (default: False) -- Determines if 'm' should be rewritten to
+                                        'm && MODULES' -- see
+                                        parse_val_and_cond()."""
+
+        # Use instance variables to avoid having to pass these as arguments
+        # through the top-down parser in _parse_expr_2(), which is tedious and
+        # obfuscates the code. A profiler run shows no noticeable performance
+        # difference.
+        self.parse_expr_cur_sym_or_choice = cur_sym_or_choice
+        self.parse_expr_line = line
+        self.parse_expr_filename = filename
+        self.parse_expr_linenr = linenr
+        self.parse_expr_transform_m = transform_m
+
+        return self._parse_expr_2(feed)
+
+    def _parse_expr_2(self, feed):
+        or_terms = [self._parse_or_term(feed)]
+        # Keep parsing additional terms while the lookahead is '||'
+        while feed.check(T_OR):
+            or_terms.append(self._parse_or_term(feed))
+
+        return or_terms[0] if len(or_terms) == 1 else (OR, or_terms)
+
+    def _parse_or_term(self, feed):
+        and_terms = [self._parse_factor(feed)]
+        # Keep parsing additional terms while the lookahead is '&&'
+        while feed.check(T_AND):
+            and_terms.append(self._parse_factor(feed))
+
+        return and_terms[0] if len(and_terms) == 1 else (AND, and_terms)
+
+    def _parse_factor(self, feed):
+        if feed.check(T_OPEN_PAREN):
+            expr_parse = self._parse_expr_2(feed)
+
+            if not feed.check(T_CLOSE_PAREN):
+                _parse_error(self.parse_expr_line,
+                             "missing end parenthesis.",
+                             self.parse_expr_filename,
+                             self.parse_expr_linenr)
+
+            return expr_parse
+
+        if feed.check(T_NOT):
+            return (NOT, self._parse_factor(feed))
+
+        sym_or_string = feed.get_next()
+
+        if not isinstance(sym_or_string, (Symbol, str)):
+            _parse_error(self.parse_expr_line,
+                         "malformed expression.",
+                         self.parse_expr_filename,
+                         self.parse_expr_linenr)
+
+        if self.parse_expr_cur_sym_or_choice is not None and \
+           isinstance(sym_or_string, Symbol):
+            self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string)
+
+        next_token = feed.peek_next()
+
+        # For conditional expressions ('depends on <expr>', '... if <expr>',
+        # etc.), "m" and m are rewritten to "m" && MODULES.
+        if next_token != T_EQUAL and next_token != T_UNEQUAL:
+            if self.parse_expr_transform_m and (sym_or_string is self.m or
+                                                sym_or_string == "m"):
+                return (AND, ["m", self._sym_lookup("MODULES")])
+            return sym_or_string
+
+        relation = EQUAL if (feed.get_next() == T_EQUAL) else UNEQUAL
+        sym_or_string_2 = feed.get_next()
+
+        if self.parse_expr_cur_sym_or_choice is not None and \
+           isinstance(sym_or_string_2, Symbol):
+            self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string_2)
+
+        if sym_or_string is self.m:
+            sym_or_string = "m"
+
+        if sym_or_string_2 is self.m:
+            sym_or_string_2 = "m"
+
+        return (relation, sym_or_string, sym_or_string_2)
+
+    def _parse_file(self, filename, parent, deps, visible_if_deps, res = None):
+        """Parse the Kconfig file 'filename'. The result is a _Block with all
+        items from the file. See _parse_block() for the meaning of the
+        parameters."""
+        line_feeder = _FileFeed(_get_lines(filename), filename)
+        return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res)
+
+    def _parse_block(self, line_feeder, end_marker, parent, deps,
+                     visible_if_deps = None, res = None):
+        """Parses a block, which is the contents of either a file or an if,
+        menu, or choice statement. The result is a _Block with the items from
+        the block.
+
+        end_marker -- The token that ends the block, e.g. T_ENDIF ("endif") for
+                      if's. None for files.
+
+        parent -- The enclosing menu, choice or if, or None if we're at the top
+                  level.
+
+        deps -- Dependencies from enclosing menus, choices and if's.
+
+        visible_if_deps (default: None) -- 'visible if' dependencies from
+                        enclosing menus.
+
+        res (default: None) -- The _Block to add items to. If None, a new
+                               _Block is created to hold the items."""
+
+        block = _Block() if res is None else res
+
+        filename = line_feeder.get_filename()
+
+        while 1:
+
+            # Do we already have a tokenized line that we determined wasn't
+            # part of whatever we were parsing earlier? See comment in
+            # Config.__init__().
+            if self.end_line is not None:
+                assert self.end_line_tokens is not None
+                tokens = self.end_line_tokens
+                tokens.go_to_start()
+
+                line = self.end_line
+                linenr = line_feeder.get_linenr()
+
+                self.end_line = None
+                self.end_line_tokens = None
+
+            else:
+                line = line_feeder.get_next()
+                if line is None:
+                    if end_marker is not None:
+                        raise Kconfig_Syntax_Error, (
+                                "Unexpected end of file {0}."
+                                .format(line_feeder.get_filename()))
+                    return block
+
+                linenr = line_feeder.get_linenr()
+
+                tokens = self._tokenize(line, False, filename, linenr)
+
+            if tokens.is_empty():
+                continue
+
+            t0 = tokens.get_next()
+
+            # Have we reached the end of the block?
+            if t0 == end_marker:
+                return block
+
+            if t0 == T_CONFIG or t0 == T_MENUCONFIG:
+                # The tokenizer will automatically allocate a new Symbol object
+                # for any new names it encounters, so we don't need to worry
+                # about that here.
+                sym = tokens.get_next()
+
+                # Symbols defined in multiple places get the parent of their
+                # first definition. However, for symbols whose parents are choice
+                # statements, the choice statement takes precedence.
+                if not sym.is_defined_ or isinstance(parent, Choice):
+                    sym.parent = parent
+
+                sym.is_defined_ = True
+
+                self.kconfig_syms.append(sym)
+                block.add_item(sym)
+
+                self._parse_properties(line_feeder, sym, deps, visible_if_deps)
+
+            elif t0 == T_MENU:
+                menu = Menu()
+                self.menus.append(menu)
+                menu.config = self
+                menu.parent = parent
+                menu.title = tokens.get_next()
+
+                menu.filename = filename
+                menu.linenr = linenr
+
+                # Parse properties and contents
+                self._parse_properties(line_feeder, menu, deps, visible_if_deps)
+                menu.block = self._parse_block(line_feeder,
+                                               T_ENDMENU,
+                                               menu,
+                                               menu.dep_expr,
+                                               _make_and(visible_if_deps,
+                                                         menu.visible_if_expr))
+
+                block.add_item(menu)
+
+            elif t0 == T_IF:
+                # If statements are treated as syntactic sugar for adding
+                # dependencies to enclosed items and do not have an explicit
+                # object representation.
+
+                dep_expr = self._parse_expr(tokens, None, line, filename, linenr)
+                self._parse_block(line_feeder,
+                                  T_ENDIF,
+                                  parent,
+                                  _make_and(dep_expr, deps),
+                                  visible_if_deps,
+                                  block) # Add items to the same block
+
+            elif t0 == T_CHOICE:
+                # We support named choices
+                already_defined = False
+                name = None
+                if len(tokens) > 1 and isinstance(tokens[1], str):
+                    name = tokens[1]
+                    already_defined = name in self.named_choices
+
+                if already_defined:
+                    choice = self.named_choices[name]
+                else:
+                    choice = Choice()
+                    self.choices.append(choice)
+                    if name is not None:
+                        choice.name = name
+                        self.named_choices[name] = choice
+
+                choice.config = self
+                choice.parent = parent
+
+                choice.def_locations.append((filename, linenr))
+
+                # Parse properties and contents
+                self._parse_properties(line_feeder, choice, deps, visible_if_deps)
+                choice.block = self._parse_block(line_feeder,
+                                                 T_ENDCHOICE,
+                                                 choice,
+                                                 None,
+                                                 visible_if_deps)
+
+                choice._determine_actual_symbols()
+
+                # If no type is set for the choice, its type is that of the first
+                # choice item
+                if choice.type == UNKNOWN:
+                    for item in choice.get_symbols():
+                        if item.type != UNKNOWN:
+                            choice.type = item.type
+                            break
+
+                # Each choice item of UNKNOWN type gets the type of the choice
+                for item in choice.get_symbols():
+                    if item.type == UNKNOWN:
+                        item.type = choice.type
+
+                # For named choices defined in multiple locations, only record
+                # at the first definition
+                if not already_defined:
+                    block.add_item(choice)
+
+            elif t0 == T_COMMENT:
+                comment = Comment()
+                comment.config = self
+                comment.parent = parent
+
+                comment.filename = filename
+                comment.linenr = linenr
+
+                comment.text = tokens.get_next()
+                self._parse_properties(line_feeder, comment, deps, visible_if_deps)
+
+                block.add_item(comment)
+                self.comments.append(comment)
+
+            elif t0 == T_SOURCE:
+                kconfig_file = tokens.get_next()
+                exp_kconfig_file = self._expand_sym_refs(kconfig_file)
+                f = os.path.join(self.base_dir, exp_kconfig_file)
+
+                if not os.path.exists(f):
+                    raise IOError, ('{0}:{1}: sourced file "{2}" (expands to\n'
+                                    '"{3}") not found. Perhaps base_dir\n'
+                                    '(argument to Config.__init__(), currently\n'
+                                    '"{4}") is set to the wrong value.'
+                                    .format(filename,
+                                            linenr,
+                                            kconfig_file,
+                                            exp_kconfig_file,
+                                            self.base_dir))
+
+                # Add items to the same block
+                self._parse_file(f, parent, deps, visible_if_deps, block)
+
+            elif t0 == T_MAINMENU:
+                text = tokens.get_next()
+
+                if self.mainmenu_text is not None:
+                    self._warn("overriding 'mainmenu' text. "
+                               'Old value: "{0}", new value: "{1}".'
+                                .format(self.mainmenu_text, text),
+                               filename,
+                               linenr)
+
+                self.mainmenu_text = text
+
+            else:
+                _parse_error(line, "unrecognized construct.", filename, linenr)
+
+    def _parse_properties(self, line_feeder, stmt, deps, visible_if_deps):
+        """Parsing of properties for symbols, menus, choices, and comments."""
+
+        def parse_val_and_cond(tokens, line, filename, linenr):
+            """Parses '<expr1> if <expr2>' constructs, where the 'if' part is
+            optional. Returns a tuple containing the parsed expressions, with
+            None as the second element if the 'if' part is missing."""
+            val = self._parse_expr(tokens, stmt, line, filename, linenr, False)
+
+            if tokens.check(T_IF):
+                return (val, self._parse_expr(tokens, stmt, line, filename, linenr))
+
+            return (val, None)
+
+        # In case the symbol is defined in multiple locations, we need to
+        # remember what prompts, defaults, and selects are new for this
+        # definition, as "depends on" should only apply to the local
+        # definition.
+        new_prompt = None
+        new_def_exprs = []
+        new_selects = []
+
+        # Dependencies from 'depends on' statements
+        depends_on_expr = None
+
+        while 1:
+            line = line_feeder.get_next()
+            if line is None:
+                break
+
+            filename = line_feeder.get_filename()
+            linenr = line_feeder.get_linenr()
+
+            tokens = self._tokenize(line, False, filename, linenr)
+
+            if tokens.is_empty():
+                continue
+
+            t0 = tokens.get_next()
+
+            if t0 == T_HELP:
+                # Find first non-empty line and get its indentation
+
+                line_feeder.remove_while(str.isspace)
+                line = line_feeder.get_next()
+
+                if line is None:
+                    stmt.help = ""
+                    break
+
+                indent = _indentation(line)
+
+                # If the first non-empty lines has zero indent, there is no
+                # help text
+                if indent == 0:
+                    stmt.help = ""
+                    line_feeder.go_back()
+                    break
+
+                help_lines = [_deindent(line, indent)]
+
+                # The help text goes on till the first non-empty line with less
+                # indent
+                while 1:
+                    line = line_feeder.get_next()
+                    if (line is None) or \
+                       (not line.isspace() and _indentation(line) < indent):
+                        stmt.help = "".join(help_lines)
+                        break
+
+                    help_lines.append(_deindent(line, indent))
+
+                if line is None:
+                    break
+
+                line_feeder.go_back()
+
+            elif t0 == T_PROMPT:
+                # 'prompt' properties override each other within a single
+                # definition of a symbol, but additional prompts can be added
+                # by defining the symbol multiple times; hence 'new_prompt'
+                # instead of 'prompt'.
+                new_prompt = parse_val_and_cond(tokens, line, filename, linenr)
+
+            elif t0 == T_DEFAULT:
+                new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_DEPENDS:
+                if not tokens.check(T_ON):
+                    _parse_error(line, 'expected "on" after "depends".', filename, linenr)
+
+                parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr)
+
+                if isinstance(stmt, (Menu, Comment)):
+                    stmt.dep_expr = _make_and(stmt.dep_expr, parsed_deps)
+                else:
+                    depends_on_expr = _make_and(depends_on_expr, parsed_deps)
+
+            elif t0 == T_VISIBLE:
+                if not tokens.check(T_IF):
+                    _parse_error(line, 'expected "if" after "visible".', filename, linenr)
+                if not isinstance(stmt, Menu):
+                    _parse_error(line,
+                                 "'visible if' is only valid for menus.",
+                                 filename,
+                                 linenr)
+
+                parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr)
+                stmt.visible_if_expr = _make_and(stmt.visible_if_expr, parsed_deps)
+
+            elif t0 == T_SELECT:
+                target = tokens.get_next()
+
+                stmt.referenced_syms.add(target)
+                stmt.selected_syms.add(target)
+
+                if tokens.check(T_IF):
+                    new_selects.append((target,
+                                        self._parse_expr(tokens, stmt, line, filename, linenr)))
+                else:
+                    new_selects.append((target, None))
+
+            elif t0 in (T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING):
+                stmt.type = token_to_type[t0]
+
+                if len(tokens) > 1:
+                    new_prompt = parse_val_and_cond(tokens, line, filename, linenr)
+
+            elif t0 == T_RANGE:
+                lower = tokens.get_next()
+                upper = tokens.get_next()
+                stmt.referenced_syms.add(lower)
+                stmt.referenced_syms.add(upper)
+
+                if tokens.check(T_IF):
+                    stmt.ranges.append((lower, upper,
+                                        self._parse_expr(tokens, stmt, line, filename, linenr)))
+                else:
+                    stmt.ranges.append((lower, upper, None))
+
+            elif t0 == T_DEF_BOOL:
+                stmt.type = BOOL
+
+                if len(tokens) > 1:
+                    new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_DEF_TRISTATE:
+                stmt.type = TRISTATE
+
+                if len(tokens) > 1:
+                    new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr))
+
+            elif t0 == T_OPTIONAL:
+                if not isinstance(stmt, Choice):
+                    _parse_error(line,
+                                 '"optional" is only valid for choices.',
+                                 filename,
+                                 linenr)
+                stmt.optional = True
+
+            elif t0 == T_OPTION:
+                if tokens.check(T_ENV) and tokens.check(T_EQUAL):
+                    env_var = tokens.get_next()
+
+                    stmt.is_special_ = True
+                    stmt.is_from_env = True
+
+                    if env_var not in os.environ:
+                        self._warn("""
+The symbol {0} references the non-existent environment variable {1} and will
+get the empty string as its value.
+
+If you're using kconfiglib via 'make (i)scriptconfig' it should have set up the
+environment correctly for you. If you still got this message, that might be an
+error, and you should e-mail kconfiglib at gmail.com.
+."""                               .format(stmt.name, env_var),
+                                   filename,
+                                   linenr)
+
+                        stmt.cached_value = ""
+                    else:
+                        stmt.cached_value = os.environ[env_var]
+
+                elif tokens.check(T_DEFCONFIG_LIST):
+                    self.defconfig_sym = stmt
+
+                elif tokens.check(T_MODULES):
+                    self._warn("the 'modules' option is not supported. "
+                               "Let me know if this is a problem for you; "
+                               "it shouldn't be that hard to implement.",
+                               filename,
+                               linenr)
+
+                else:
+                    _parse_error(line, "unrecognized option.", filename, linenr)
+
+            else:
+                # See comment in Config.__init__()
+                self.end_line = line
+                self.end_line_tokens = tokens
+                break
+
+        # Propagate dependencies from enclosing menus and if's.
+
+        # For menus and comments..
+        if isinstance(stmt, (Menu, Comment)):
+            stmt.orig_deps = stmt.dep_expr
+            stmt.deps_from_containing = deps
+            stmt.dep_expr = _make_and(stmt.dep_expr, deps)
+
+            stmt.all_referenced_syms = \
+              stmt.referenced_syms | _get_expr_syms(deps)
+
+        # For symbols and choices..
+        else:
+
+            # See comment for 'menu_dep'
+            stmt.menu_dep = depends_on_expr
+
+            # Propagate dependencies specified with 'depends on' to any new
+            # default expressions, prompts, and selections. ("New" since a
+            # symbol might be defined in multiple places and the dependencies
+            # should only apply to the local definition.)
+
+            new_def_exprs = [(val_expr, _make_and(cond_expr, depends_on_expr))
+                             for (val_expr, cond_expr) in new_def_exprs]
+
+            new_selects = [(target, _make_and(cond_expr, depends_on_expr))
+                           for (target, cond_expr) in new_selects]
+
+            if new_prompt is not None:
+                prompt, cond_expr = new_prompt
+
+                # 'visible if' dependencies from enclosing menus get propagated
+                # to prompts
+                if visible_if_deps is not None:
+                    cond_expr = _make_and(cond_expr, visible_if_deps)
+
+                new_prompt = (prompt, _make_and(cond_expr, depends_on_expr))
+
+            # We save the original expressions -- before any menu and if
+            # conditions have been propagated -- so these can be retrieved
+            # later.
+
+            stmt.orig_def_exprs.extend(new_def_exprs)
+            if new_prompt is not None:
+                stmt.orig_prompts.append(new_prompt)
+
+            # Only symbols can select
+            if isinstance(stmt, Symbol):
+                stmt.orig_selects.extend(new_selects)
+
+            # Save dependencies from enclosing menus and if's
+            stmt.deps_from_containing = deps
+
+            # The set of symbols referenced directly by the symbol/choice plus
+            # all symbols referenced by enclosing menus and if's.
+            stmt.all_referenced_syms = \
+              stmt.referenced_syms | _get_expr_syms(deps)
+
+            # Propagate dependencies from enclosing menus and if's
+
+            stmt.def_exprs.extend([(val_expr, _make_and(cond_expr, deps))
+                                   for (val_expr, cond_expr) in new_def_exprs])
+
+            for (target, cond) in new_selects:
+                target.rev_dep = _make_or(target.rev_dep,
+                                          _make_and(stmt,
+                                                    _make_and(cond, deps)))
+
+            if new_prompt is not None:
+                prompt, cond_expr = new_prompt
+                stmt.prompts.append((prompt, _make_and(cond_expr, deps)))
+
+    #
+    # Symbol table manipulation
+    #
+
+    def _sym_lookup(self, name, add_sym_if_not_exists = True):
+        """Fetches the symbol 'name' from the symbol table, optionally adding
+        it if it does not exist (this is usually what we want)."""
+        if name in self.syms:
+            return self.syms[name]
+
+        new_sym = Symbol()
+        new_sym.config = self
+        new_sym.name = name
+
+        if add_sym_if_not_exists:
+            self.syms[name] = new_sym
+        else:
+            # This warning is generated while evaluating an expression
+            # containing undefined symbols using Config.eval()
+            self._warn("no symbol {0} in configuration".format(name))
+
+        return new_sym
+
+    #
+    # Evaluation of symbols and expressions
+    #
+
+    def _eval_expr(self, expr):
+        """Evaluates an expression and returns one of the tristate values "n",
+        "m" or "y"."""
+        res = self._eval_expr_2(expr)
+
+        # Promote "m" to "y" if we're running without modules. Internally, "m"
+        # is often rewritten to "m" && MODULES by both the C implementation and
+        # kconfiglib, which takes care of cases where "m" should be false if
+        # we're running without modules.
+        if res == "m" and not self._has_modules():
+            return "y"
+
+        return res
+
+    def _eval_expr_2(self, expr):
+        if expr is None:
+            return "y"
+
+        if isinstance(expr, Symbol):
+            # Non-bool/tristate symbols are always "n" in a tristate sense,
+            # regardless of their value
+            if expr.type != BOOL and expr.type != TRISTATE:
+                return "n"
+            return expr.get_value()
+
+        if isinstance(expr, str):
+            return expr if (expr == "y" or expr == "m") else "n"
+
+        first_expr = expr[0]
+
+        if first_expr == OR:
+            res = "n"
+
+            for subexpr in expr[1]:
+                ev = self._eval_expr_2(subexpr)
+
+                # Return immediately upon discovering a "y" term
+                if ev == "y":
+                    return "y"
+
+                if ev == "m":
+                    res = "m"
+
+            # 'res' is either "n" or "m" here; we already handled the
+            # short-circuiting "y" case in the loop.
+            return res
+
+        if first_expr == AND:
+            res = "y"
+
+            for subexpr in expr[1]:
+                ev = self._eval_expr_2(subexpr)
+
+                # Return immediately upon discovering an "n" term
+                if ev == "n":
+                    return "n"
+
+                if ev == "m":
+                    res = "m"
+
+            # 'res' is either "m" or "y" here; we already handled the
+            # short-circuiting "n" case in the loop.
+            return res
+
+        if first_expr == NOT:
+            ev = self._eval_expr_2(expr[1])
+
+            if ev == "y":
+                return "n"
+
+            return "y" if (ev == "n") else "m"
+
+        if first_expr == EQUAL:
+            return "y" if (self._get_str_value(expr[1]) ==
+                           self._get_str_value(expr[2])) else "n"
+
+        if first_expr == UNEQUAL:
+            return "y" if (self._get_str_value(expr[1]) !=
+                           self._get_str_value(expr[2])) else "n"
+
+        _internal_error("Internal error while evaluating expression: "
+                        "unknown operation {0}.".format(first_expr))
+
+    def _get_str_value(self, obj):
+        if isinstance(obj, str):
+            return obj
+        # obj is a Symbol
+        return obj.get_value()
+
+    def _eval_min(self, e1, e2):
+        e1_eval = self._eval_expr(e1)
+        e2_eval = self._eval_expr(e2)
+
+        return e1_eval if tri_less(e1_eval, e2_eval) else e2_eval
+
+    def _eval_max(self, e1, e2):
+        e1_eval = self._eval_expr(e1)
+        e2_eval = self._eval_expr(e2)
+
+        return e1_eval if tri_greater(e1_eval, e2_eval) else e2_eval
+
+    #
+    # Methods related to the MODULES symbol
+    #
+
+    def _has_modules(self):
+        modules_sym = self.syms.get("MODULES")
+        return (modules_sym is not None) and (modules_sym.get_value() == "y")
+
+    #
+    # Dependency tracking
+    #
+
+    def _build_dep(self):
+        """Populates the Symbol.dep sets, linking the symbol to the symbols
+        that immediately depend on it in the sense that changing the value of
+        the symbol might affect the values of those other symbols. This is used
+        for caching/invalidation purposes. The calculated sets might be larger
+        than necessary as we don't do any complicated analysis of the
+        expressions."""
+        for sym in self.syms.itervalues():
+            sym.dep = set()
+
+        # Adds 'sym' as a directly dependent symbol to all symbols that appear
+        # in the expression 'e'
+        def add_expr_deps(e, sym):
+            for s in _get_expr_syms(e):
+                s.dep.add(sym)
+
+        # The directly dependent symbols of a symbol are:
+        #  - Any symbols whose prompts, default values, rev_dep (select
+        #    condition), or ranges depend on the symbol
+        #  - Any symbols that belong to the same choice statement as the symbol
+        #    (these won't be included in 'dep' as that makes the dependency
+        #    graph unwieldy, but Symbol._get_dependent() will include them)
+        #  - Any symbols in a choice statement that depends on the symbol
+        for sym in self.syms.itervalues():
+            for (_, e) in sym.prompts:
+                add_expr_deps(e, sym)
+
+            for (v, e) in sym.def_exprs:
+                add_expr_deps(v, sym)
+                add_expr_deps(e, sym)
+
+            add_expr_deps(sym.rev_dep, sym)
+
+            for (l, u, e) in sym.ranges:
+                add_expr_deps(l, sym)
+                add_expr_deps(u, sym)
+                add_expr_deps(e, sym)
+
+            if sym.is_choice_symbol_:
+                choice = sym.parent
+
+                for (_, e) in choice.prompts:
+                    add_expr_deps(e, sym)
+
+                for (_, e) in choice.def_exprs:
+                    add_expr_deps(e, sym)
+
+    def _expr_val_str(self, expr, no_value_str = "(none)", get_val_instead_of_eval = False):
+        # Since values are valid expressions, _expr_to_str() will get a nice
+        # string representation for those as well.
+
+        if expr is None:
+            return no_value_str
+
+        if get_val_instead_of_eval:
+            if isinstance(expr, str):
+                return _expr_to_str(expr)
+            val = expr.get_value()
+        else:
+            val = self._eval_expr(expr)
+
+        return "{0} (value: {1})".format(_expr_to_str(expr), _expr_to_str(val))
+
+    def _expand_sym_refs(self, s):
+        """Expands $-references to symbols in 's' to symbol values, or to the
+        empty string for undefined symbols."""
+
+        while 1:
+            sym_ref_re_match = sym_ref_re.search(s)
+            if sym_ref_re_match is None:
+                return s
+
+            sym_name = sym_ref_re_match.group(0)[1:]
+            sym = self.syms.get(sym_name)
+            expansion = "" if sym is None else sym.get_value()
+
+            s = s[:sym_ref_re_match.start()] + \
+                expansion + \
+                s[sym_ref_re_match.end():]
+
+    def _get_sym_or_choice_str(self, sc):
+        """Symbols and choices have many properties in common, so we factor out
+        common __str__() stuff here. "sc" is short for "symbol or choice"."""
+
+        # As we deal a lot with string representations here, use some
+        # convenient shorthand:
+        s = _expr_to_str
+
+        #
+        # Common symbol/choice properties
+        #
+
+        user_value_str = "(no user value)" if sc.user_val is None else s(sc.user_val)
+
+        visibility_str = s(sc.get_visibility())
+
+        # Build prompts string
+        if sc.prompts == []:
+            prompts_str = " (no prompts)"
+        else:
+            prompts_str_rows = []
+
+            for (prompt, cond_expr) in sc.orig_prompts:
+                if cond_expr is None:
+                    prompts_str_rows.append(' "{0}"'.format(prompt))
+                else:
+                    prompts_str_rows.append(' "{0}" if '.format(prompt) +
+                                            self._expr_val_str(cond_expr))
+
+            prompts_str = "\n".join(prompts_str_rows)
+
+        # Build locations string
+        if sc.def_locations == []:
+            locations_str = "(no locations)"
+        else:
+            locations_str = " ".join(["{0}:{1}".format(filename, linenr) for
+                                      (filename, linenr) in sc.def_locations])
+
+        # Build additional-dependencies-from-menus-and-if's string
+        additional_deps_str = " " + self._expr_val_str(sc.deps_from_containing,
+                                                       "(no additional dependencies)")
+
+        #
+        # Symbol-specific stuff
+        #
+
+        if isinstance(sc, Symbol):
+
+            # Build value string
+            value_str = s(sc.get_value())
+
+            # Build ranges string
+            if isinstance(sc, Symbol):
+                if sc.ranges == []:
+                    ranges_str = " (no ranges)"
+                else:
+                    ranges_str_rows = []
+
+                    for (l, u, cond_expr) in sc.ranges:
+                        if cond_expr is None:
+                            ranges_str_rows.append(" [{0}, {1}]".format(s(l), s(u)))
+                        else:
+                            ranges_str_rows.append(" [{0}, {1}] if {2}"
+                                                   .format(s(l), s(u), self._expr_val_str(cond_expr)))
+
+                    ranges_str = "\n".join(ranges_str_rows)
+
+            # Build default values string
+            if sc.def_exprs == []:
+                defaults_str = " (no default values)"
+            else:
+                defaults_str_rows = []
+
+                for (val_expr, cond_expr) in sc.orig_def_exprs:
+                    row_str = " " + self._expr_val_str(val_expr, "(none)", sc.type == STRING)
+                    defaults_str_rows.append(row_str)
+                    defaults_str_rows.append("  Condition: " + self._expr_val_str(cond_expr))
+
+                defaults_str = "\n".join(defaults_str_rows)
+
+            # Build selects string
+            if sc.orig_selects == []:
+                selects_str = " (no selects)"
+            else:
+                selects_str_rows = []
+
+                for (target, cond_expr) in sc.orig_selects:
+                    if cond_expr is None:
+                        selects_str_rows.append(" {0}".format(target.name))
+                    else:
+                        selects_str_rows.append(" {0} if ".format(target.name) +
+                                                self._expr_val_str(cond_expr))
+
+                selects_str = "\n".join(selects_str_rows)
+
+            # Build reverse dependencies string
+            if sc.rev_dep == "n":
+                rev_dep_str = " (no reverse dependencies)"
+            else:
+                rev_dep_str = " " + self._expr_val_str(sc.rev_dep)
+
+            res = _sep_lines("Symbol " + (sc.name if sc.name is not None else "(no name)"),
+                             "Type           : " + typename[sc.type],
+                             "Value          : " + value_str,
+                             "User value     : " + user_value_str,
+                             "Visibility     : " + visibility_str,
+                             "Is choice item : " + bool_str[sc.is_choice_symbol_],
+                             "Is defined     : " + bool_str[sc.is_defined_],
+                             "Is from env.   : " + bool_str[sc.is_from_env],
+                             "Is special     : " + bool_str[sc.is_special_] + "\n")
+
+            if sc.ranges != []:
+                res += _sep_lines("Ranges:",
+                                  ranges_str + "\n")
+
+            res += _sep_lines("Prompts:",
+                              prompts_str,
+                              "Default values:",
+                              defaults_str,
+                              "Selects:",
+                              selects_str,
+                              "Reverse dependencies:",
+                              rev_dep_str,
+                              "Additional dependencies from enclosing menus and if's:",
+                              additional_deps_str,
+                              "Locations: " + locations_str)
+
+            return res
+
+        #
+        # Choice-specific stuff
+        #
+
+        # Build name string (for named choices)
+        if sc.name is None:
+            name_str = "(no name)"
+        else:
+            name_str = sc.name
+
+        # Build selected symbol string
+        sel = sc.get_selection()
+        if sel is None:
+            sel_str = "(no selection)"
+        else:
+            sel_str = sel.name
+
+        # Build mode string
+        mode_str = s(sc.get_mode())
+
+        # Build default values string
+        if sc.def_exprs == []:
+            defaults_str = " (no default values)"
+        else:
+            defaults_str_rows = []
+
+            for (sym, cond_expr) in sc.orig_def_exprs:
+                if cond_expr is None:
+                    defaults_str_rows.append(" {0}".format(sym.name))
+                else:
+                    defaults_str_rows.append(" {0} if ".format(sym.name) +
+                                             self._expr_val_str(cond_expr))
+
+            defaults_str = "\n".join(defaults_str_rows)
+
+        # Build contained symbols string
+        names = [sym.name for sym in sc.get_symbols()]
+
+        if names == []:
+            syms_string = "(empty)"
+        else:
+            syms_string = " ".join(names)
+
+        return _sep_lines("Choice",
+                          "Name (for named choices): " + name_str,
+                          "Type            : " + typename[sc.type],
+                          "Selected symbol : " + sel_str,
+                          "User value      : " + user_value_str,
+                          "Mode            : " + mode_str,
+                          "Visibility      : " + visibility_str,
+                          "Optional        : " + bool_str[sc.optional],
+                          "Prompts:",
+                          prompts_str,
+                          "Defaults:",
+                          defaults_str,
+                          "Choice symbols:",
+                          " " + syms_string,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Locations: " + locations_str)
+
+    def _expr_depends_on(self, expr, sym):
+        """Reimplementation of expr_depends_symbol() from mconf.c. Used to
+        determine if a submenu should be implicitly created, which influences what
+        items inside choice statements are considered choice items."""
+        if expr is None:
+            return False
+
+        def rec(expr):
+            if isinstance(expr, str):
+                return False
+
+            if isinstance(expr, Symbol):
+                return expr is sym
+
+            e0 = expr[0]
+
+            if e0 == EQUAL or e0 == UNEQUAL:
+                return self._eq_to_sym(expr) is sym
+
+            if e0 == AND:
+                for and_expr in expr[1]:
+                    if rec(and_expr):
+                        return True
+
+            return False
+
+        return rec(expr)
+
+    def _eq_to_sym(self, eq):
+        """_expr_depends_on() helper. For (in)equalities of the form sym = y/m
+        or sym != n, returns sym. For other (in)equalities, returns None."""
+        relation, left, right = eq
+
+        left  = self._transform_n_m_y(left)
+        right = self._transform_n_m_y(right)
+
+        # Make sure the symbol (if any) appears to the left
+        if not isinstance(left, Symbol):
+            left, right = right, left
+
+        if not isinstance(left, Symbol):
+            return None
+
+        if (relation == EQUAL   and (right == "m" or right == "y")) or \
+           (relation == UNEQUAL and right == "n"):
+            return left
+
+        return None
+
+    def _transform_n_m_y(self, item):
+        """_eq_to_sym() helper. Translates the symbols n, m, and y to their
+        string equivalents."""
+        if item is self.n:
+            return "n"
+        if item is self.m:
+            return "m"
+        if item is self.y:
+            return "y"
+        return item
+
+    def _warn(self, msg, filename = None, linenr = None):
+        """For printing warnings to stderr."""
+        if self.print_warnings:
+            self._warn_or_undef_assign(msg, WARNING, filename, linenr)
+
+    def _undef_assign(self, msg, filename = None, linenr = None):
+        """For printing informational messages related to assignments
+        to undefined variables to stderr."""
+        if self.print_undef_assign:
+            self._warn_or_undef_assign(msg, UNDEF_ASSIGN, filename, linenr)
+
+    def _warn_or_undef_assign(self, msg, msg_type, filename, linenr):
+        if filename is not None:
+            sys.stderr.write("{0}:".format(_clean_up_path(filename)))
+        if linenr is not None:
+            sys.stderr.write("{0}:".format(linenr))
+
+        if msg_type == WARNING:
+            sys.stderr.write("warning: ")
+        elif msg_type == UNDEF_ASSIGN:
+            sys.stderr.write("info: ")
+        else:
+            _internal_error('Internal error while printing warning: unknown warning type "{0}".'
+                            .format(msg_type))
+
+        sys.stderr.write(msg + "\n")
+
+def _get_expr_syms(expr):
+    """Returns the set() of symbols appearing in expr."""
+    res = set()
+    if expr is None:
+        return res
+
+    def rec(expr):
+        if isinstance(expr, Symbol):
+            res.add(expr)
+            return
+
+        if isinstance(expr, str):
+            return
+
+        e0 = expr[0]
+
+        if e0 == OR or e0 == AND:
+            for term in expr[1]:
+                rec(term)
+
+        elif e0 == NOT:
+            rec(expr[1])
+
+        elif e0 == EQUAL or e0 == UNEQUAL:
+            _, v1, v2 = expr
+
+            if isinstance(v1, Symbol):
+                res.add(v1)
+
+            if isinstance(v2, Symbol):
+                res.add(v2)
+
+        else:
+            _internal_error("Internal error while fetching symbols from an "
+                            "expression with token stream {0}.".format(expr))
+
+    rec(expr)
+    return res
+
+
+#
+# Construction of expressions
+#
+
+# These functions as well as the _eval_min/max() functions above equate
+# None with "y", which is usually what we want, but needs to be kept in
+# mind.
+
+def _make_or(e1, e2):
+    # Perform trivial simplification and avoid None's (which
+    # correspond to y's)
+    if e1 is None or e2 is None or \
+       e1 == "y" or e2 == "y":
+        return "y"
+
+    if e1 == "n":
+        return e2
+
+    if e2 == "n":
+        return e1
+
+    # Prefer to merge/update argument list if possible instead of creating
+    # a new OR node
+
+    if isinstance(e1, tuple) and e1[0] == OR:
+        if isinstance(e2, tuple) and e2[0] == OR:
+            return (OR, e1[1] + e2[1])
+        return (OR, e1[1] + [e2])
+
+    if isinstance(e2, tuple) and e2[0] == OR:
+        return (OR, e2[1] + [e1])
+
+    return (OR, [e1, e2])
+
+# Note: returns None if e1 == e2 == None
+
+def _make_and(e1, e2):
+    if e1 == "n" or e2 == "n":
+        return "n"
+
+    if e1 is None or e1 == "y":
+        return e2
+
+    if e2 is None or e2 == "y":
+        return e1
+
+    # Prefer to merge/update argument list if possible instead of creating
+    # a new AND node
+
+    if isinstance(e1, tuple) and e1[0] == AND:
+        if isinstance(e2, tuple) and e2[0] == AND:
+            return (AND, e1[1] + e2[1])
+        return (AND, e1[1] + [e2])
+
+    if isinstance(e2, tuple) and e2[0] == AND:
+        return (AND, e2[1] + [e1])
+
+    return (AND, [e1, e2])
+
+#
+# Constants and functions related to types, parsing, evaluation and printing,
+# put globally to unclutter the Config class a bit.
+#
+
+# Tokens
+(T_OR, T_AND, T_NOT,
+ T_OPEN_PAREN, T_CLOSE_PAREN,
+ T_EQUAL, T_UNEQUAL,
+ T_MAINMENU, T_MENU, T_ENDMENU,
+ T_SOURCE, T_CHOICE, T_ENDCHOICE,
+ T_COMMENT, T_CONFIG, T_MENUCONFIG,
+ T_HELP, T_IF, T_ENDIF, T_DEPENDS, T_ON,
+ T_OPTIONAL, T_PROMPT, T_DEFAULT,
+ T_BOOL, T_TRISTATE, T_HEX, T_INT, T_STRING,
+ T_DEF_BOOL, T_DEF_TRISTATE,
+ T_SELECT, T_RANGE, T_OPTION, T_ENV,
+ T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(0, 38)
+
+# Keyword to token map
+keywords = {
+        "mainmenu"       : T_MAINMENU,
+        "menu"           : T_MENU,
+        "endmenu"        : T_ENDMENU,
+        "endif"          : T_ENDIF,
+        "endchoice"      : T_ENDCHOICE,
+        "source"         : T_SOURCE,
+        "choice"         : T_CHOICE,
+        "config"         : T_CONFIG,
+        "comment"        : T_COMMENT,
+        "menuconfig"     : T_MENUCONFIG,
+        "help"           : T_HELP,
+        "if"             : T_IF,
+        "depends"        : T_DEPENDS,
+        "on"             : T_ON,
+        "optional"       : T_OPTIONAL,
+        "prompt"         : T_PROMPT,
+        "default"        : T_DEFAULT,
+        "bool"           : T_BOOL,
+        "boolean"        : T_BOOL,
+        "tristate"       : T_TRISTATE,
+        "int"            : T_INT,
+        "hex"            : T_HEX,
+        "def_bool"       : T_DEF_BOOL,
+        "def_tristate"   : T_DEF_TRISTATE,
+        "string"         : T_STRING,
+        "select"         : T_SELECT,
+        "range"          : T_RANGE,
+        "option"         : T_OPTION,
+        "env"            : T_ENV,
+        "defconfig_list" : T_DEFCONFIG_LIST,
+        "modules"        : T_MODULES,
+        "visible"        : T_VISIBLE }
+
+# Strings to use for True and False
+bool_str = { False : "false", True : "true" }
+
+# Tokens after which identifier-like lexemes are treated as strings. T_CHOICE
+# is included to avoid symbols being registered for named choices.
+string_lex = frozenset((T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING, T_CHOICE,
+                        T_PROMPT, T_MENU, T_COMMENT, T_SOURCE, T_MAINMENU))
+
+# Matches the initial token on a line; see _tokenize().
+initial_token_re = re.compile(r"[^\w]*(\w+)")
+
+# Matches an identifier/keyword optionally preceded by whitespace
+id_keyword_re = re.compile(r"\s*([\w./-]+)")
+
+# Regular expressions for parsing .config files
+set_re   = re.compile(r"CONFIG_(\w+)=(.*)")
+unset_re = re.compile(r"# CONFIG_(\w+) is not set")
+
+# Regular expression for finding $-references to symbols in strings
+sym_ref_re = re.compile(r"\$[A-Za-z_]+")
+
+# Integers representing symbol types
+UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(0, 6)
+
+# Strings to use for types
+typename = {
+        UNKNOWN  : "unknown",
+        BOOL     : "bool",
+        TRISTATE : "tristate",
+        STRING   : "string",
+        HEX      : "hex",
+        INT      : "int" }
+
+# Token to type mapping
+token_to_type = { T_BOOL     : BOOL,
+                  T_TRISTATE : TRISTATE,
+                  T_STRING   : STRING,
+                  T_INT      : INT,
+                  T_HEX      : HEX }
+
+# Default values for symbols of different types (the value the symbol gets if
+# it is not assigned a user value and none of its 'default' clauses kick in)
+default_value = { BOOL     : "n",
+                  TRISTATE : "n",
+                  STRING   : "",
+                  INT      : "",
+                  HEX      : "" }
+
+# Indicates that no item is selected in a choice statement
+NO_SELECTION = 0
+
+# Integers representing expression types
+OR, AND, NOT, EQUAL, UNEQUAL = range(0, 5)
+
+# Map from tristate values to integers
+tri_to_int = { "n" : 0, "m" : 1, "y" : 2 }
+
+# Printing-related stuff
+
+op_to_str = { AND     : " && ",
+              OR      : " || ",
+              EQUAL   : " = ",
+              UNEQUAL : " != " }
+
+precedence = { OR : 0, AND : 1, NOT : 2 }
+
+# Types of informational messages
+WARNING = 0
+UNDEF_ASSIGN = 1
+
+def _intersperse(lst, op):
+    """_expr_to_str() helper. Gets the string representation of each expression in lst
+    and produces a list where op has been inserted between the elements."""
+    if lst == []:
+        return ""
+
+    res = []
+
+    def handle_sub_expr(expr):
+        no_parens = isinstance(expr, (str, Symbol)) or \
+                    expr[0] in (EQUAL, UNEQUAL) or \
+                    precedence[op] <= precedence[expr[0]]
+        if not no_parens:
+            res.append("(")
+        res.extend(_expr_to_str_rec(expr))
+        if not no_parens:
+            res.append(")")
+
+    op_str = op_to_str[op]
+
+    handle_sub_expr(lst[0])
+    for expr in lst[1:]:
+        res.append(op_str)
+        handle_sub_expr(expr)
+
+    return res
+
+def _expr_to_str(expr):
+    s = "".join(_expr_to_str_rec(expr))
+    return s
+
+def _sym_str_string(sym_or_str):
+    if isinstance(sym_or_str, str):
+        return '"{0}"'.format(sym_or_str)
+    return sym_or_str.name
+
+def _expr_to_str_rec(expr):
+    if expr is None:
+        return [""]
+
+    if isinstance(expr, (Symbol, str)):
+        return [_sym_str_string(expr)]
+
+    e0 = expr[0]
+
+    if e0 == OR or e0 == AND:
+        return _intersperse(expr[1], expr[0])
+
+    if e0 == NOT:
+        need_parens = not isinstance(expr[1], (str, Symbol))
+
+        res = ["!"]
+        if need_parens:
+            res.append("(")
+        res.extend(_expr_to_str_rec(expr[1]))
+        if need_parens:
+            res.append(")")
+        return res
+
+    if e0 == EQUAL or e0 == UNEQUAL:
+        return [_sym_str_string(expr[1]),
+                op_to_str[expr[0]],
+                _sym_str_string(expr[2])]
+
+class _Block:
+
+    """Represents a list of items (symbols, menus, choice statements and
+    comments) appearing at the top-level of a file or witin a menu, choice or
+    if statement."""
+
+    def __init__(self):
+        self.items = []
+
+    def get_items(self):
+        return self.items
+
+    def add_item(self, item):
+        self.items.append(item)
+
+    def _make_conf(self):
+        # Collect the substrings in a list and later use join() instead of +=
+        # to build the final .config contents. With older Python versions, this
+        # yields linear instead of quadratic complexity.
+        strings = []
+        for item in self.items:
+            strings.extend(item._make_conf())
+
+        return strings
+
+    def add_depend_expr(self, expr):
+        for item in self.items:
+            item.add_depend_expr(expr)
+
+class Item():
+
+    """Base class for symbols and other Kconfig constructs. Subclasses are
+    Symbol, Choice, Menu, and Comment."""
+
+    def is_symbol(self):
+        """Returns True if the item is a symbol, otherwise False. Short for
+        isinstance(item, kconfiglib.Symbol)."""
+        return isinstance(self, Symbol)
+
+    def is_choice(self):
+        """Returns True if the item is a choice, otherwise False. Short for
+        isinstance(item, kconfiglib.Choice)."""
+        return isinstance(self, Choice)
+
+    def is_menu(self):
+        """Returns True if the item is a menu, otherwise False. Short for
+        isinstance(item, kconfiglib.Menu)."""
+        return isinstance(self, Menu)
+
+    def is_comment(self):
+        """Returns True if the item is a comment, otherwise False. Short for
+        isinstance(item, kconfiglib.Comment)."""
+        return isinstance(self, Comment)
+
+class _HasVisibility():
+
+    """Base class for elements that have a "visibility" that acts as an upper
+    limit on the values a user can set for them. Subclasses are Symbol and
+    Choice (which supply some of the attributes)."""
+
+    def __init__(self):
+        self.cached_visibility = None
+        self.prompts = []
+
+    def _invalidate(self):
+        self.cached_visibility = None
+
+    def _get_visibility(self):
+        if self.cached_visibility is None:
+            vis = "n"
+            for (prompt, cond_expr) in self.prompts:
+                vis = self.config._eval_max(vis, cond_expr)
+
+            if isinstance(self, Symbol) and self.is_choice_symbol_:
+                vis = self.config._eval_min(vis, self.parent._get_visibility())
+
+            # Promote "m" to "y" if we're dealing with a non-tristate
+            if vis == "m" and self.type != TRISTATE:
+                vis = "y"
+
+            self.cached_visibility = vis
+
+        return self.cached_visibility
+
+class Symbol(Item, _HasVisibility):
+
+    """Represents a configuration symbol - e.g. FOO for
+
+    config FOO
+        ..."""
+
+    #
+    # Public interface
+    #
+
+    def get_value(self):
+        """Calculate and return the value of the symbol. See also
+        Symbol.set_user_value()."""
+
+        if self.cached_value is not None:
+            return self.cached_value
+
+        self.write_to_conf = False
+
+        # As a quirk of Kconfig, undefined symbols get their name as their
+        # value. This is why things like "FOO = bar" work for seeing if FOO has
+        # the value "bar".
+        if self.type == UNKNOWN:
+            self.cached_value = self.name
+            return self.name
+
+        new_val = default_value[self.type]
+
+        vis = self._get_visibility()
+
+        if self.type == BOOL or self.type == TRISTATE:
+            # The visibility and mode (modules-only or single-selection) of
+            # choice items will be taken into account in self._get_visibility()
+
+            if self.is_choice_symbol_:
+                if vis != "n":
+                    choice = self.parent
+                    mode = choice.get_mode()
+
+                    self.write_to_conf = (mode != "n")
+
+                    if mode == "y":
+                        new_val = "y" if (choice.get_selection() is self) else "n"
+                    elif mode == "m":
+                        if self.user_val == "m" or self.user_val == "y":
+                            new_val = "m"
+
+            else:
+                use_defaults = True
+
+                if vis != "n":
+                    # If the symbol is visible and has a user value, use that.
+                    # Otherwise, look@defaults.
+                    self.write_to_conf = True
+
+                    if self.user_val is not None:
+                        new_val = self.config._eval_min(self.user_val, vis)
+                        use_defaults = False
+
+                if use_defaults:
+                    for (val_expr, cond_expr) in self.def_exprs:
+                        cond_eval = self.config._eval_expr(cond_expr)
+
+                        if cond_eval != "n":
+                            self.write_to_conf = True
+                            new_val = self.config._eval_min(val_expr, cond_eval)
+                            break
+
+                # Reverse dependencies take precedence
+                rev_dep_val = self.config._eval_expr(self.rev_dep)
+
+                if rev_dep_val != "n":
+                    self.write_to_conf = True
+                    new_val = self.config._eval_max(new_val, rev_dep_val)
+
+            # Promote "m" to "y" for booleans
+            if new_val == "m" and self.type == BOOL:
+                new_val = "y"
+
+        elif self.type == STRING:
+            use_defaults = True
+
+            if vis != "n":
+                self.write_to_conf = True
+                if self.user_val is not None:
+                    new_val = self.user_val
+                    use_defaults = False
+
+            if use_defaults:
+                for (val_expr, cond_expr) in self.def_exprs:
+                    if self.config._eval_expr(cond_expr) != "n":
+                        self.write_to_conf = True
+                        new_val = self.config._get_str_value(val_expr)
+                        break
+
+        elif self.type == HEX or self.type == INT:
+            has_active_range = False
+            low = None
+            high = None
+            use_defaults = True
+
+            base = 16 if self.type == HEX else 10
+
+            for(l, h, cond_expr) in self.ranges:
+                if self.config._eval_expr(cond_expr) != "n":
+                    has_active_range = True
+
+                    low_str = self.config._get_str_value(l)
+                    high_str = self.config._get_str_value(h)
+
+                    low = int(low_str, base) if \
+                      _is_base_n(low_str, base) else 0
+                    high = int(high_str, base) if \
+                      _is_base_n(high_str, base) else 0
+
+                    break
+
+            if vis != "n":
+                self.write_to_conf = True
+
+                if self.user_val is not None and \
+                   _is_base_n(self.user_val, base) and \
+                   (not has_active_range or
+                    low <= int(self.user_val, base) <= high):
+
+                    # If the user value is OK, it is stored in exactly the same
+                    # form as specified in the assignment (with or without
+                    # "0x", etc).
+
+                    use_defaults = False
+                    new_val = self.user_val
+
+            if use_defaults:
+                for (val_expr, cond_expr) in self.def_exprs:
+                    if self.config._eval_expr(cond_expr) != "n":
+                        self.write_to_conf = True
+
+                        # If the default value is OK, it is stored in exactly
+                        # the same form as specified. Otherwise, it is clamped
+                        # to the range, and the output has "0x" as appropriate
+                        # for the type.
+
+                        new_val = self.config._get_str_value(val_expr)
+
+                        if _is_base_n(new_val, base):
+                            new_val_num = int(new_val, base)
+                            if has_active_range:
+                                clamped_val = None
+
+                                if new_val_num < low:
+                                    clamped_val = low
+                                elif new_val_num > high:
+                                    clamped_val = high
+
+                                if clamped_val is not None:
+                                    new_val = (hex(clamped_val) if \
+                                      self.type == HEX else str(clamped_val))
+
+                            break
+                else: # For the for loop
+                    # If no user value or default kicks in but the hex/int has
+                    # an active range, then the low end of the range is used,
+                    # provided it's > 0, with "0x" prepended as appropriate.
+
+                    if has_active_range and low > 0:
+                        new_val = (hex(low) if self.type == HEX else str(low))
+
+        self.cached_value = new_val
+        return new_val
+
+    def set_user_value(self, v):
+        """Sets the user value of the symbol.
+
+        Equal in effect to assigning the value to the symbol within a .config
+        file. Use get_lower/upper_bound() or get_assignable_values() to find
+        the range of currently assignable values for bool and tristate symbols;
+        setting values outside this range will cause the user value to differ
+        from the result of Symbol.get_value() (be truncated). Values that are
+        invalid for the type (such as a_bool.set_user_value("foo")) are
+        ignored, and a warning is emitted if an attempt is made to assign such
+        a value.
+
+        For any type of symbol, is_modifiable() can be used to check if a user
+        value will currently have any effect on the symbol, as determined by
+        its visibility and range of assignable values. Any value that is valid
+        for the type (bool, tristate, etc.) will end up being reflected in
+        get_user_value() though, and might have an effect later if conditions
+        change. To get rid of the user value, use unset_user_value().
+
+        Any symbols dependent on the symbol are (recursively) invalidated, so
+        things will just work with regards to dependencies.
+
+        v -- The user value to give to the symbol."""
+        self._set_user_value_no_invalidate(v, False)
+
+        # There might be something more efficient you could do here, but play
+        # it safe.
+        if self.name == "MODULES":
+            self.config._invalidate_all()
+            return
+
+        self._invalidate()
+        self._invalidate_dependent()
+
+    def unset_user_value(self):
+        """Resets the user value of the symbol, as if the symbol had never
+        gotten a user value via Config.load_config() or
+        Symbol.set_user_value()."""
+        self._unset_user_value_no_recursive_invalidate()
+        self._invalidate_dependent()
+
+    def get_user_value(self):
+        """Returns the value assigned to the symbol in a .config or via
+        Symbol.set_user_value() (provided the value was valid for the type of the
+        symbol). Returns None in case of no user value."""
+        return self.user_val
+
+    def get_name(self):
+        """Returns the name of the symbol."""
+        return self.name
+
+    def get_upper_bound(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns None.
+
+        Otherwise, returns the highest value the symbol can be set to with
+        Symbol.set_user_value() (that will not be truncated): one of "m" or "y",
+        arranged from lowest to highest. This corresponds to the highest value
+        the symbol could be given in e.g. the 'make menuconfig' interface.
+
+        See also the tri_less*() and tri_greater*() functions, which could come
+        in handy."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return None
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        vis = self._get_visibility()
+        if (tri_to_int[vis] - tri_to_int[rev_dep]) > 0:
+            return vis
+        return None
+
+    def get_lower_bound(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns None.
+
+        Otherwise, returns the lowest value the symbol can be set to with
+        Symbol.set_user_value() (that will not be truncated): one of "n" or "m",
+        arranged from lowest to highest. This corresponds to the lowest value
+        the symbol could be given in e.g. the 'make menuconfig' interface.
+
+        See also the tri_less*() and tri_greater*() functions, which could come
+        in handy."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return None
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        if (tri_to_int[self._get_visibility()] - tri_to_int[rev_dep]) > 0:
+            return rev_dep
+        return None
+
+    def get_assignable_values(self):
+        """For string/hex/int symbols and for bool and tristate symbols that
+        cannot be modified (see is_modifiable()), returns the empty list.
+
+        Otherwise, returns a list containing the user values that can be
+        assigned to the symbol (that won't be truncated). Usage example:
+
+        if "m" in sym.get_assignable_values():
+            sym.set_user_value("m")
+
+        This is basically a more convenient interface to
+        get_lower/upper_bound() when wanting to test if a particular tristate
+        value can be assigned."""
+        if self.type != BOOL and self.type != TRISTATE:
+            return []
+        rev_dep = self.config._eval_expr(self.rev_dep)
+        # A bool selected to "m" gets promoted to "y"
+        if self.type == BOOL and rev_dep == "m":
+            rev_dep = "y"
+        res = ["n", "m", "y"][tri_to_int[rev_dep] :
+                              tri_to_int[self._get_visibility()] + 1]
+        return res if len(res) > 1 else []
+
+    def get_type(self):
+        """Returns the type of the symbol: one of UNKNOWN, BOOL, TRISTATE,
+        STRING, HEX, or INT. These are defined at the top level of the module,
+        so you'd do something like
+
+        if sym.get_type() == kconfiglib.STRING:
+            ..."""
+        return self.type
+
+    def get_visibility(self):
+        """Returns the visibility of the symbol: one of "n", "m" or "y". For
+        bool and tristate symbols, this is an upper bound on the value users
+        can set for the symbol. For other types of symbols, a visibility of "n"
+        means the user value will be ignored. A visibility of "n" corresponds
+        to not being visible in the 'make *config' interfaces.
+
+        Example (assuming we're running with modules enabled -- i.e., MODULES
+        set to 'y'):
+
+        # Assume this has been assigned 'n'
+        config N_SYM
+            tristate "N_SYM"
+
+        # Assume this has been assigned 'm'
+        config M_SYM
+            tristate "M_SYM"
+
+        # Has visibility 'n'
+        config A
+            tristate "A"
+            depends on N_SYM
+
+        # Has visibility 'm'
+        config B
+            tristate "B"
+            depends on M_SYM
+
+        # Has visibility 'y'
+        config C
+            tristate "C"
+
+        # Has no prompt, and hence visibility 'n'
+        config D
+            tristate
+
+        Having visibility be tri-valued ensures that e.g. a symbol cannot be
+        set to "y" by the user if it depends on a symbol with value "m", which
+        wouldn't be safe.
+
+        You should probably look at get_lower/upper_bound(),
+        get_assignable_values() and is_modifiable() before using this."""
+        return self._get_visibility()
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the symbol, or
+        None if the symbol is at the top level. Note that if statements are
+        treated as syntactic and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """Returns the set() of all symbols referenced by this symbol. For
+        example, the symbol defined by
+
+        config FOO
+            bool
+            prompt "foo" if A && B
+            default C if D
+            depends on E
+            select F if G
+
+        references the symbols A through G.
+
+        refs_from_enclosing (default: False) -- If True, the symbols
+                            referenced by enclosing menus and if's will be
+                            included in the result."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_selected_symbols(self):
+        """Returns the set() of all symbols X for which this symbol has a
+        'select X' or 'select X if Y' (regardless of whether Y is satisfied or
+        not). This is a subset of the symbols returned by
+        get_referenced_symbols()."""
+        return self.selected_syms
+
+    def get_help(self):
+        """Returns the help text of the symbol, or None if the symbol has no
+        help text."""
+        return self.help
+
+    def get_config(self):
+        """Returns the Config instance this symbol is from."""
+        return self.config
+
+    def get_def_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the symbol is defined. For
+        the vast majority of symbols this list will only contain one element.
+        For the following Kconfig, FOO would get two entries: the lines marked
+        with *.
+
+        config FOO *
+            bool "foo prompt 1"
+
+        config FOO *
+            bool "foo prompt 2"
+        """
+        return self.def_locations
+
+    def get_ref_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the symbol is referenced in
+        the configuration. For example, the lines marked by * would be included
+        for FOO below:
+
+        config A
+            bool
+            default BAR || FOO *
+
+        config B
+            tristate
+            depends on FOO *
+            default m if FOO *
+
+        if FOO *
+            config A
+                bool "A"
+        endif
+
+        config FOO (definition not included)
+            bool
+        """
+        return self.ref_locations
+
+    def is_modifiable(self):
+        """Returns True if the value of the symbol could be modified by calling
+        Symbol.set_user_value() and False otherwise.
+
+        For bools and tristates, this corresponds to the symbol being visible
+        in the 'make menuconfig' interface and not already being pinned to a
+        specific value (e.g. because it is selected by another symbol).
+
+        For strings and numbers, this corresponds to just being visible. (See
+        Symbol.get_visibility().)"""
+        if self.is_special_:
+            return False
+        if self.type == BOOL or self.type == TRISTATE:
+            rev_dep = self.config._eval_expr(self.rev_dep)
+            # A bool selected to "m" gets promoted to "y"
+            if self.type == BOOL and rev_dep == "m":
+                rev_dep = "y"
+            return (tri_to_int[self._get_visibility()] -
+                    tri_to_int[rev_dep]) > 0
+        return self._get_visibility() != "n"
+
+    def is_defined(self):
+        """Returns False if the symbol is referred to in the Kconfig but never
+        actually defined, otherwise True."""
+        return self.is_defined_
+
+    def is_special(self):
+        """Returns True if the symbol is one of the special symbols n, m, y, or
+        UNAME_RELEASE, or gets its value from the environment. Otherwise,
+        returns False."""
+        return self.is_special_
+
+    def is_from_environment(self):
+        """Returns True if the symbol gets its value from the environment.
+        Otherwise, returns False."""
+        return self.is_from_env
+
+    def has_ranges(self):
+        """Returns True if the symbol is of type INT or HEX and has ranges that
+        limits what values it can take on, otherwise False."""
+        return self.ranges != []
+
+    def is_choice_symbol(self):
+        """Returns True if the symbol is in a choice statement and is an actual
+        choice symbol (see Choice.get_symbols()); otherwise, returns
+        False."""
+        return self.is_choice_symbol_
+
+    def is_choice_selection(self):
+        """Returns True if the symbol is contained in a choice statement and is
+        the selected item, otherwise False. Equivalent to 'sym.is_choice_symbol()
+        and sym.get_parent().get_selection() is sym'."""
+        return self.is_choice_symbol_ and self.parent.get_selection() is self
+
+    def __str__(self):
+        """Returns a string containing various information about the symbol."""
+        return self.config._get_sym_or_choice_str(self)
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Symbol constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        # Set default values
+        _HasVisibility.__init__(self)
+
+        self.config = None
+
+        self.parent = None
+        self.name = None
+        self.type = UNKNOWN
+
+        self.def_exprs = []
+        self.ranges = []
+        self.rev_dep = "n"
+
+        # The prompt, default value and select conditions without any
+        # dependencies from menus or if's propagated to them
+
+        self.orig_prompts = []
+        self.orig_def_exprs = []
+        self.orig_selects = []
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        self.help = None
+
+        # The set of symbols referenced by this symbol (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # The set of symbols selected by this symbol (see
+        # get_selected_symbols())
+        self.selected_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = set()
+
+        # This is set to True for "actual" choice symbols. See
+        # Choice._determine_actual_symbols(). The trailing underscore avoids a
+        # collision with is_choice_symbol().
+        self.is_choice_symbol_ = False
+
+        # This records only dependencies specified with 'depends on'. Needed
+        # when determining actual choice items (hrrrr...). See also
+        # Choice._determine_actual_symbols().
+        self.menu_dep = None
+
+        # See Symbol.get_ref/def_locations().
+        self.def_locations = []
+        self.ref_locations = []
+
+        self.user_val = None
+
+        # Flags
+
+        # Should the symbol get an entry in .config?
+        self.write_to_conf = False
+
+        # Caches the calculated value
+        self.cached_value = None
+
+        # Note: An instance variable 'self.dep' gets set on the Symbol in
+        # Config._build_dep(), linking the symbol to the symbols that
+        # immediately depend on it (in a caching/invalidation sense). The total
+        # set of dependent symbols for the symbol (the transitive closure) is
+        # calculated on an as-needed basis in _get_dependent().
+
+        # Caches the total list of dependent symbols. Calculated in
+        # _get_dependent().
+        self.cached_deps = None
+
+        # Does the symbol have an entry in the Kconfig file? The trailing
+        # underscore avoids a collision with is_defined().
+        self.is_defined_ = False
+
+        # Does the symbol get its value in some special way, e.g. from the
+        # environment or by being one of the special symbols n, m, and y? If
+        # so, the value is stored in self.cached_value, which is never
+        # invalidated. The trailing underscore avoids a collision with
+        # is_special().
+        self.is_special_ = False
+
+        # Does the symbol get its value from the environment?
+        self.is_from_env = False
+
+    def _invalidate(self):
+        if self.is_special_:
+            return
+
+        if self.is_choice_symbol_:
+            self.parent._invalidate()
+
+        _HasVisibility._invalidate(self)
+
+        self.write_to_conf = False
+        self.cached_value = None
+
+    def _invalidate_dependent(self):
+        for sym in self._get_dependent():
+            sym._invalidate()
+
+    def _set_user_value_no_invalidate(self, v, suppress_load_warnings):
+        """Like set_user_value(), but does not invalidate any symbols.
+
+        suppress_load_warnings --
+          some warnings are annoying when loading a .config that can be helpful
+          when manually invoking set_user_value(). This flag is set to True to
+          suppress such warnings.
+
+          Perhaps this could be made optional for load_config() instead."""
+
+        if self.is_special_:
+            if self.is_from_env:
+                self.config._warn('attempt to assign the value "{0}" to the '
+                                  'symbol {1}, which gets its value from the '
+                                  'environment. Assignment ignored.'
+                                  .format(v, self.name))
+            else:
+                self.config._warn('attempt to assign the value "{0}" to the '
+                                  'special symbol {1}. Assignment ignored.'
+                                  .format(v, self.name))
+
+            return
+
+
+        if not self.is_defined_:
+            filename, linenr = self.ref_locations[0]
+
+            self.config._undef_assign('attempt to assign the value "{0}" to {1}, '
+                                      "which is referenced at {2}:{3} but never "
+                                      "defined. Assignment ignored."
+                                      .format(v, self.name, filename, linenr))
+            return
+
+        # Check if the value is valid for our type
+
+        if not (( self.type == BOOL     and (v == "n" or v == "y")    ) or
+                ( self.type == TRISTATE and (v == "n" or v == "m" or
+                                             v == "y")                ) or
+                ( self.type == STRING                                 ) or
+                ( self.type == INT      and _is_base_n(v, 10)         ) or
+                ( self.type == HEX      and _is_base_n(v, 16)         )):
+
+            self.config._warn('the value "{0}" is invalid for {1}, which has type {2}. '
+                              "Assignment ignored."
+                              .format(v, self.name, typename[self.type]))
+            return
+
+        if self.prompts == [] and not suppress_load_warnings:
+            self.config._warn('assigning "{0}" to the symbol {1} which '
+                              'lacks prompts and thus has visibility "n". '
+                              'The assignment will have no effect.'
+                              .format(v, self.name))
+
+        self.user_val = v
+
+        if self.is_choice_symbol_ and (self.type == BOOL or
+                                       self.type == TRISTATE):
+            choice = self.parent
+            if v == "y":
+                choice.user_val = self
+                choice.user_mode = "y"
+            elif v == "m":
+                choice.user_val = None
+                choice.user_mode = "m"
+
+    def _unset_user_value_no_recursive_invalidate(self):
+        self._invalidate()
+        self.user_val = None
+
+        if self.is_choice_symbol_:
+            self.parent._unset_user_value()
+
+    def _make_conf(self):
+        if self.already_written:
+            return []
+
+        self.already_written = True
+
+        # Note: write_to_conf is determined in get_value()
+        val = self.get_value()
+        if not self.write_to_conf:
+            return []
+
+        if self.type == BOOL or self.type == TRISTATE:
+            if val == "m" or val == "y":
+                return ["CONFIG_{0}={1}".format(self.name, val)]
+            return ["# CONFIG_{0} is not set".format(self.name)]
+
+        elif self.type == STRING:
+            # Escape \ and "
+            return ['CONFIG_{0}="{1}"'
+                    .format(self.name,
+                            val.replace("\\", "\\\\").replace('"', '\\"'))]
+
+        elif self.type == INT or self.type == HEX:
+            return ["CONFIG_{0}={1}".format(self.name, val)]
+
+        else:
+            _internal_error('Internal error while creating .config: unknown type "{0}".'
+                            .format(self.type))
+
+    def _get_dependent(self):
+        """Returns the set of symbols that should be invalidated if the value
+        of the symbol changes, because they might be affected by the change.
+        Note that this is an internal API -- it's probably of limited
+        usefulness to clients."""
+        if self.cached_deps is not None:
+            return self.cached_deps
+
+        res = set()
+
+        self._add_dependent_ignore_siblings(res)
+        if self.is_choice_symbol_:
+            for s in self.parent.get_symbols():
+                if s is not self:
+                    res.add(s)
+                    s._add_dependent_ignore_siblings(res)
+
+        self.cached_deps = res
+        return res
+
+    def _add_dependent_ignore_siblings(self, to):
+        """Calculating dependencies gets a bit tricky for choice items as they
+        all depend on each other, potentially leading to infinite recursion.
+        This helper function calculates dependencies ignoring the other symbols
+        in the choice. It also works fine for symbols that are not choice
+        items."""
+        for s in self.dep:
+            to.add(s)
+            to |= s._get_dependent()
+
+    def _has_auto_menu_dep_on(self, on):
+        """See Choice._determine_actual_symbols()."""
+        if not isinstance(self.parent, Choice):
+            _internal_error("Attempt to determine auto menu dependency for symbol ouside of choice.")
+
+        if self.prompts == []:
+            # If we have no prompt, use the menu dependencies instead (what was
+            # specified with 'depends on')
+            return self.menu_dep is not None and \
+                   self.config._expr_depends_on(self.menu_dep, on)
+
+        for (_, cond_expr) in self.prompts:
+            if self.config._expr_depends_on(cond_expr, on):
+                return True
+
+        return False
+
+class Menu(Item):
+
+    """Represents a menu statement."""
+
+    #
+    # Public interface
+    #
+
+    def get_config(self):
+        """Return the Config instance this menu is from."""
+        return self.config
+
+    def get_visibility(self):
+        """Returns the visibility of the menu. This also affects the visibility
+        of subitems. See also Symbol.get_visibility()."""
+        return self.config._eval_expr(self.dep_expr)
+
+    def get_visible_if_visibility(self):
+        """Returns the visibility the menu gets from its 'visible if'
+        condition. "y" if the menu has no 'visible if' condition."""
+        return self.config._eval_expr(self.visible_if_expr)
+
+    def get_items(self, recursive = False):
+        """Returns a list containing the items (symbols, menus, choice
+        statements and comments) in in the menu, in the same order that the
+        items appear within the menu.
+
+        recursive (default: False) -- True if items contained in items within
+                                      the menu should be included
+                                      recursively (preorder)."""
+
+        if not recursive:
+            return self.block.get_items()
+
+        res = []
+        for item in self.block.get_items():
+            res.append(item)
+            if isinstance(item, Menu):
+                res.extend(item.get_items(True))
+            elif isinstance(item, Choice):
+                res.extend(item.get_items())
+        return res
+
+    def get_symbols(self, recursive = False):
+        """Returns a list containing the symbols in the menu, in the same order
+        that they appear within the menu.
+
+        recursive (default: False) -- True if symbols contained in items within
+                                      the menu should be included
+                                      recursively."""
+
+        return [item for item in self.get_items(recursive) if isinstance(item, Symbol)]
+
+    def get_title(self):
+        """Returns the title text of the menu."""
+        return self.title
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the menu, or
+        None if the menu is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_location(self):
+        """Returns the location of the menu as a (filename, linenr) tuple,
+        where filename is a string and linenr an int."""
+        return (self.filename, self.linenr)
+
+    def __str__(self):
+        """Returns a string containing various information about the menu."""
+        depends_on_str = self.config._expr_val_str(self.orig_deps,
+                                                   "(no dependencies)")
+        visible_if_str = self.config._expr_val_str(self.visible_if_expr,
+                                                   "(no dependencies)")
+
+        additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing,
+                                                              "(no additional dependencies)")
+
+        return _sep_lines("Menu",
+                          "Title                     : " + self.title,
+                          "'depends on' dependencies : " + depends_on_str,
+                          "'visible if' dependencies : " + visible_if_str,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Location: {0}:{1}".format(self.filename, self.linenr))
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Menu constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        self.config = None
+
+        self.parent = None
+        self.title = None
+        self.block = None
+        self.dep_expr = None
+
+        # Dependency expression without dependencies from enclosing menus and
+        # if's propagated
+        self.orig_deps = None
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # The 'visible if' expression
+        self.visible_if_expr = None
+
+        # The set of symbols referenced by this menu (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = None
+
+        self.filename = None
+        self.linenr = None
+
+    def _make_conf(self):
+        item_conf = self.block._make_conf()
+
+        if self.config._eval_expr(self.dep_expr) != "n" and \
+           self.config._eval_expr(self.visible_if_expr) != "n":
+            return ["\n#\n# {0}\n#".format(self.title)] + item_conf
+        return item_conf
+
+class Choice(Item, _HasVisibility):
+
+    """Represents a choice statement. A choice can be in one of three modes:
+
+    "n" - The choice is not visible and no symbols can be selected.
+
+    "m" - Any number of symbols can be set to "m". The rest will be "n". This
+          is safe since potentially conflicting options don't actually get
+          compiled into the kernel simultaneously with "m".
+
+    "y" - One symbol will be "y" while the rest are "n".
+
+    Only tristate choices can be in "m" mode, and the visibility of the choice
+    is an upper bound on the mode, so that e.g. a choice that depends on a
+    symbol with value "m" will be in "m" mode.
+
+    The mode changes automatically when a value is assigned to a symbol within
+    the choice.
+
+    See Symbol.get_visibility() too."""
+
+    #
+    # Public interface
+    #
+
+    def get_selection(self):
+        """Returns the symbol selected (either by the user or through
+        defaults), or None if either no symbol is selected or the mode is not
+        "y"."""
+        if self.cached_selection is not None:
+            if self.cached_selection == NO_SELECTION:
+                return None
+            return self.cached_selection
+
+        if self.get_mode() != "y":
+            return self._cache_ret(None)
+
+        # User choice available?
+        if self.user_val is not None and \
+           self.user_val._get_visibility() == "y":
+            return self._cache_ret(self.user_val)
+
+        if self.optional:
+            return self._cache_ret(None)
+
+        return self._cache_ret(self.get_selection_from_defaults())
+
+    def get_selection_from_defaults(self):
+        """Like Choice.get_selection(), but acts as if no symbol has been
+        selected by the user and no 'optional' flag is in effect."""
+
+        if self.actual_symbols == []:
+            return None
+
+        for (symbol, cond_expr) in self.def_exprs:
+            if self.config._eval_expr(cond_expr) != "n":
+                chosen_symbol = symbol
+                break
+        else:
+            chosen_symbol = self.actual_symbols[0]
+
+        # Is the chosen symbol visible?
+        if chosen_symbol._get_visibility() != "n":
+            return chosen_symbol
+        # Otherwise, pick the first visible symbol
+        for sym in self.actual_symbols:
+            if sym._get_visibility() != "n":
+                return sym
+        return None
+
+    def get_user_selection(self):
+        """If the choice is in "y" mode and has a user-selected symbol, returns
+        that symbol. Otherwise, returns None."""
+        return self.user_val
+
+    def get_config(self):
+        """Returns the Config instance this choice is from."""
+        return self.config
+
+    def get_name(self):
+        """For named choices, returns the name. Returns None for unnamed
+        choices. No named choices appear anywhere in the kernel Kconfig files
+        as of Linux 3.7.0-rc8."""
+        return self.name
+
+    def get_help(self):
+        """Returns the help text of the choice, or None if the choice has no
+        help text."""
+        return self.help
+
+    def get_type(self):
+        """Returns the type of the choice. See Symbol.get_type()."""
+        return self.type
+
+    def get_items(self):
+        """Gets all items contained in the choice in the same order as within
+        the configuration ("items" instead of "symbols" since choices and
+        comments might appear within choices. This only happens in one place as
+        of Linux 3.7.0-rc8, in drivers/usb/gadget/Kconfig)."""
+        return self.block.get_items()
+
+    def get_symbols(self):
+        """Returns a list containing the choice's symbols.
+
+        A quirk (perhaps a bug) of Kconfig is that you can put items within a
+        choice that will not be considered members of the choice insofar as
+        selection is concerned. This happens for example if one symbol within a
+        choice 'depends on' the symbol preceding it, or if you put non-symbol
+        items within choices.
+
+        As of Linux 3.7.0-rc8, this seems to be used intentionally in one
+        place: drivers/usb/gadget/Kconfig.
+
+        This function returns the "proper" symbols of the choice in the order
+        they appear in the choice, excluding such items. If you want all items
+        in the choice, use get_items()."""
+        return self.actual_symbols
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the choice, or
+        None if the choice is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_def_locations(self):
+        """Returns a list of (filename, linenr) tuples, where filename (string)
+        and linenr (int) represent a location where the choice is defined. For
+        the vast majority of choices (all of them as of Linux 3.7.0-rc8) this
+        list will only contain one element, but its possible for named choices
+        to be defined in multiple locations."""
+        return self.def_locations
+
+    def get_visibility(self):
+        """Returns the visibility of the choice statement: one of "n", "m" or
+        "y". This acts as an upper limit on the mode of the choice (though bool
+        choices can only have the mode "y"). See the class documentation for an
+        explanation of modes."""
+        return self._get_visibility()
+
+    def get_mode(self):
+        """Returns the mode of the choice. See the class documentation for
+        an explanation of modes."""
+        minimum_mode = "n" if self.optional else "m"
+        mode = self.user_mode if self.user_mode is not None else minimum_mode
+        mode = self.config._eval_min(mode, self._get_visibility())
+
+        # Promote "m" to "y" for boolean choices
+        if mode == "m" and self.type == BOOL:
+            return "y"
+
+        return mode
+
+    def is_optional(self):
+        """Returns True if the symbol has the optional flag set (and so will default
+        to "n" mode). Otherwise, returns False."""
+        return self.optional
+
+    def __str__(self):
+        """Returns a string containing various information about the choice
+        statement."""
+        return self.config._get_sym_or_choice_str(self)
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Choice constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        _HasVisibility.__init__(self)
+
+        self.config = None
+
+        self.parent = None
+        self.name = None # Yes, choices can be named
+        self.type = UNKNOWN
+        self.def_exprs = []
+        self.help = None
+        self.optional = False
+        self.block = None
+
+        # The prompts and default values without any dependencies from
+        # enclosing menus or if's propagated
+
+        self.orig_prompts = []
+        self.orig_def_exprs = []
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # We need to filter out symbols that appear within the choice block but
+        # are not considered choice items (see
+        # Choice._determine_actual_symbols()) This list holds the "actual" choice
+        # items.
+        self.actual_symbols = []
+
+        # The set of symbols referenced by this choice (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = set()
+
+        # See Choice.get_def_locations()
+        self.def_locations = []
+
+        self.user_val = None
+        self.user_mode = None
+
+        self.cached_selection = None
+
+    def _determine_actual_symbols(self):
+        """If a symbol's visibility depends on the preceding symbol within a
+        choice, it is no longer viewed as a choice item (quite possibly a bug,
+        but some things consciously use it.. ugh. It stems from automatic
+        submenu creation). In addition, it's possible to have choices and
+        comments within choices, and those shouldn't be considered as choice
+        items either. Only drivers/usb/gadget/Kconfig seems to depend on any of
+        this. This method computes the "actual" items in the choice and sets
+        the is_choice_symbol_ flag on them (retrieved via is_choice_symbol()).
+
+        Don't let this scare you: an earlier version simply checked for a
+        sequence of symbols where all symbols after the first appeared in the
+        'depends on' expression of the first, and that worked fine.  The added
+        complexity is to be future-proof in the event that
+        drivers/usb/gadget/Kconfig turns even more sinister. It might very well
+        be overkilling things (especially if that file is refactored ;)."""
+
+        items = self.block.get_items()
+
+        # Items might depend on each other in a tree structure, so we need a
+        # stack to keep track of the current tentative parent
+        stack = []
+
+        for item in items:
+            if not isinstance(item, Symbol):
+                stack = []
+                continue
+
+            while stack != []:
+                if item._has_auto_menu_dep_on(stack[-1]):
+                    # The item should not be viewed as a choice item, so don't
+                    # set item.is_choice_symbol_.
+                    stack.append(item)
+                    break
+                else:
+                    stack.pop()
+            else:
+                item.is_choice_symbol_ = True
+                self.actual_symbols.append(item)
+                stack.append(item)
+
+    def _cache_ret(self, selection):
+        # As None is used to indicate the lack of a cached value we can't use
+        # that to cache the fact that the choice has no selection. Instead, we
+        # use the symbolic constant NO_SELECTION.
+        if selection is None:
+            self.cached_selection = NO_SELECTION
+        else:
+            self.cached_selection = selection
+
+        return selection
+
+    def _invalidate(self):
+        _HasVisibility._invalidate(self)
+        self.cached_selection = None
+
+    def _unset_user_value(self):
+        self._invalidate()
+        self.user_val = None
+        self.user_mode = None
+
+    def _make_conf(self):
+        return self.block._make_conf()
+
+class Comment(Item):
+
+    """Represents a comment statement."""
+
+    #
+    # Public interface
+    #
+
+    def get_config(self):
+        """Returns the Config instance this comment is from."""
+        return self.config
+
+    def get_visibility(self):
+        """Returns the visibility of the comment. See also
+        Symbol.get_visibility()."""
+        return self.config._eval_expr(self.dep_expr)
+
+    def get_text(self):
+        """Returns the text of the comment."""
+        return self.text
+
+    def get_parent(self):
+        """Returns the menu or choice statement that contains the comment, or
+        None if the comment is at the top level. Note that if statements are
+        treated as syntactic sugar and do not have an explicit class
+        representation."""
+        return self.parent
+
+    def get_referenced_symbols(self, refs_from_enclosing = False):
+        """See Symbol.get_referenced_symbols()."""
+        return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms
+
+    def get_location(self):
+        """Returns the location of the comment as a (filename, linenr) tuple,
+        where filename is a string and linenr an int."""
+        return (self.filename, self.linenr)
+
+    def __str__(self):
+        """Returns a string containing various information about the comment."""
+        dep_str = self.config._expr_val_str(self.orig_deps, "(no dependencies)")
+
+        additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing,
+                                                              "(no additional dependencies)")
+
+        return _sep_lines("Comment",
+                          "Text: "         + str(self.text),
+                          "Dependencies: " + dep_str,
+                          "Additional dependencies from enclosing menus and if's:",
+                          additional_deps_str,
+                          "Location: {0}:{1}".format(self.filename, self.linenr))
+
+    #
+    # Private methods
+    #
+
+    def __init__(self):
+        """Comment constructor -- not intended to be called directly by
+        kconfiglib clients."""
+
+        self.config = None
+
+        self.parent = None
+        self.text = None
+        self.dep_expr = None
+
+        # Dependency expression without dependencies from enclosing menus and
+        # if's propagated
+        self.orig_deps = None
+
+        # Dependencies inherited from containing menus and if's
+        self.deps_from_containing = None
+
+        # The set of symbols referenced by this comment (see
+        # get_referenced_symbols())
+        self.referenced_syms = set()
+
+        # Like 'referenced_syms', but includes symbols from
+        # dependencies inherited from enclosing menus and if's
+        self.all_referenced_syms = None
+
+        self.filename = None
+        self.linenr = None
+
+    def _make_conf(self):
+        if self.config._eval_expr(self.dep_expr) != "n":
+            return ["\n#\n# {0}\n#".format(self.text)]
+        return []
+
+class _Feed:
+
+    """Class for working with sequences in a stream-like fashion; handy for tokens."""
+
+    def __init__(self, items):
+        self.items = items
+        self.length = len(self.items)
+        self.i = 0
+
+    def get_next(self):
+        if self.i >= self.length:
+            return None
+
+        item = self.items[self.i]
+        self.i += 1
+        return item
+
+    def peek_next(self):
+        return None if self.i >= self.length else self.items[self.i]
+
+    def go_to_start(self):
+        self.i = 0
+
+    def __getitem__(self, index):
+        return self.items[index]
+
+    def __len__(self):
+        return len(self.items)
+
+    def is_empty(self):
+        return self.items == []
+
+    def check(self, token):
+        """Check if the next token is 'token'. If so, remove it from the token
+        feed and return True. Otherwise, leave it in and return False."""
+        if self.i >= self.length:
+            return None
+
+        if self.items[self.i] == token:
+            self.i += 1
+            return True
+
+        return False
+
+    def remove_while(self, pred):
+        while self.i < self.length and pred(self.items[self.i]):
+            self.i += 1
+
+    def go_back(self):
+        if self.i <= 0:
+            _internal_error("Attempt to move back in Feed while already@the beginning.")
+        self.i -= 1
+
+class _FileFeed(_Feed):
+
+    """Feed subclass that keeps track of the current filename and line
+    number."""
+
+    def __init__(self, lines, filename):
+        self.filename = _clean_up_path(filename)
+        _Feed.__init__(self, lines)
+
+    def get_filename(self):
+        return self.filename
+
+    def get_linenr(self):
+        return self.i
+
+#
+# Misc. public global utility functions
+#
+
+def tri_less(v1, v2):
+    """Returns True if the tristate v1 is less than the tristate v2, where "n",
+    "m" and "y" are ordered from lowest to highest. Otherwise, returns
+    False."""
+    return tri_to_int[v1] < tri_to_int[v2]
+
+def tri_less_eq(v1, v2):
+    """Returns True if the tristate v1 is less than or equal to the tristate
+    v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise,
+    returns False."""
+    return tri_to_int[v1] <= tri_to_int[v2]
+
+def tri_greater(v1, v2):
+    """Returns True if the tristate v1 is greater than the tristate v2, where
+    "n", "m" and "y" are ordered from lowest to highest. Otherwise, returns
+    False."""
+    return tri_to_int[v1] > tri_to_int[v2]
+
+def tri_greater_eq(v1, v2):
+    """Returns True if the tristate v1 is greater than or equal to the tristate
+    v2, where "n", "m" and "y" are ordered from lowest to highest. Otherwise,
+    returns False."""
+    return tri_to_int[v1] >= tri_to_int[v2]
+
+#
+# Helper functions, mostly related to text processing
+#
+
+def _strip_quotes(s, line, filename, linenr):
+    """Removes any quotes surrounding 's' if it has them; otherwise returns 's'
+    unmodified."""
+    s = s.strip()
+    if not s:
+        return ""
+    if s[0] == '"' or s[0] == "'":
+        if len(s) < 2 or s[-1] != s[0]:
+            _parse_error(line,
+                         "malformed string literal",
+                         filename,
+                         linenr)
+        return s[1:-1]
+    return s
+
+def _indentation(line):
+    """Returns the indentation of the line, treating tab stops as being spaced
+    8 characters apart."""
+    if line.isspace():
+        _internal_error("Attempt to take indentation of blank line.")
+    indent = 0
+    for c in line:
+        if c == " ":
+            indent += 1
+        elif c == "\t":
+            # Go to the next tab stop
+            indent = (indent + 8) & ~7
+        else:
+            return indent
+
+def _deindent(line, indent):
+    """Deindent 'line' by 'indent' spaces."""
+    line = line.expandtabs()
+    if len(line) <= indent:
+        return line
+    return line[indent:]
+
+def _is_base_n(s, n):
+    try:
+        int(s, n)
+        return True
+    except ValueError:
+        return False
+
+def _sep_lines(*args):
+    """Returns a string comprised of all arguments, with newlines inserted
+    between them."""
+    return "\n".join(args)
+
+def _comment(s):
+    """Returns a new string with "#" inserted before each line in 's'."""
+    if not s:
+        return "#"
+    res = "".join(["#" + line for line in s.splitlines(True)])
+    if s.endswith("\n"):
+        return res + "#"
+    return res
+
+def _get_lines(filename):
+    """Returns a list of lines from 'filename', joining any line ending in \\
+    with the following line."""
+    with open(filename, "r") as f:
+        lines = []
+        accum = ""
+        while 1:
+            line = f.readline()
+
+            if line == "":
+                return lines
+
+            if line.endswith("\\\n"):
+                accum += line[:-2]
+            else:
+                accum += line
+                lines.append(accum)
+                accum = ""
+
+def _strip_trailing_slash(path):
+    """Removes any trailing slash from 'path'."""
+    return path[:-1] if path.endswith("/") else path
+
+def _clean_up_path(path):
+    """Strips any initial "./" and trailing slash from 'path'."""
+    if path.startswith("./"):
+        path = path[2:]
+    return _strip_trailing_slash(path)
+
+#
+# Error handling
+#
+
+class Kconfig_Syntax_Error(Exception):
+    """Exception raised for syntax errors."""
+    pass
+
+class Internal_Error(Exception):
+    """Exception raised for internal errors."""
+    pass
+
+def _tokenization_error(s, index, filename, linenr):
+    if filename is not None:
+        assert linenr is not None
+        sys.stderr.write("{0}:{1}:\n".format(filename, linenr))
+
+    if s.endswith("\n"):
+        s = s[:-1]
+
+    # Calculate the visual offset corresponding to index 'index' in 's'
+    # assuming tabstops are spaced 8 characters apart
+    vis_index = 0
+    for c in s[:index]:
+        if c == "\t":
+            vis_index = (vis_index + 8) & ~7
+        else:
+            vis_index += 1
+
+    # Don't output actual tabs to be independent of how the terminal renders
+    # them
+    s = s.expandtabs()
+
+    raise Kconfig_Syntax_Error, (
+        _sep_lines("Error during tokenization at location indicated by caret.\n",
+                   s,
+                   " " * vis_index + "^\n"))
+
+def _parse_error(s, msg, filename, linenr):
+    error_str = ""
+
+    if filename is not None:
+        assert linenr is not None
+        error_str += "{0}:{1}: ".format(filename, linenr)
+
+    if s.endswith("\n"):
+        s = s[:-1]
+
+    error_str += 'Error while parsing "{0}"'.format(s) + \
+      ("." if msg is None else ": " + msg)
+
+    raise Kconfig_Syntax_Error, error_str
+
+def _internal_error(msg):
+    msg += "\nSorry! You may want to send an email to kconfiglib@gmail.com " \
+           "to tell me about this. Include the message above and the stack " \
+           "trace and describe what you were doing."
+
+    raise Internal_Error, msg
+
+if use_psyco:
+    import psyco
+
+    Config._tokenize  = psyco.proxy(Config._tokenize)
+    Config._eval_expr = psyco.proxy(Config._eval_expr)
+
+    _indentation = psyco.proxy(_indentation)
+    _get_lines   = psyco.proxy(_get_lines)
diff --git a/support/pym/readme b/support/pym/readme
new file mode 100644
index 0000000..f44609c
--- /dev/null
+++ b/support/pym/readme
@@ -0,0 +1,14 @@
+Readme
+======
+
+Kconfiglib
+----------
+
+This is a python module fetched from:
+
+https://github.com/ulfalizer/Kconfiglib
+commit: 417d62d1bf5fbfc7271c9d9b8dc2661b6332e288
+
+This module is not released under any explicit license, but it is a fair
+asumption kconfiglib is released under the same license as the linux kernel,
+i.e. GPLv2.
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 06/11] support/scripts: add gen-manual-lists.py
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (4 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 05/11] support: add kconfiglib python module Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 07/11] manual: add a make target 'manual-update-lists' Samuel Martin
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Script generating the target and host package tables, and the deprecated
stuff list as well. These tables and lists are generated parsing the
Config.in files.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Changes since v1:
* many improvements, fixes, refactoring and cleanup (Arnout)
---
 support/scripts/gen-manual-lists.py | 336 ++++++++++++++++++++++++++++++++++++
 1 file changed, 336 insertions(+)
 create mode 100755 support/scripts/gen-manual-lists.py

diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py
new file mode 100755
index 0000000..dd58547
--- /dev/null
+++ b/support/scripts/gen-manual-lists.py
@@ -0,0 +1,336 @@
+#!/usr/bin/env python2
+##
+## gen-manual-lists.py
+##
+## This script generates the following Buildroot manual appendices:
+##  - the package tables (one for the target, the other for host tools);
+##  - the deprecated items.
+##
+## Author(s):
+##  - Samuel Martin <s.martin49@gmail.com>
+##
+## Copyright (C) 2013 Samuel Martin
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+
+## Note about python2.
+##
+## This script can currently only be run using python2 interpreter due to
+## its kconfiglib dependency (which is not yet python3 friendly).
+
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import os
+import re
+import sys
+import datetime
+from argparse import ArgumentParser
+import kconfiglib
+
+
+def get_symbol_subset(root, filter_func):
+    """ Return a generator of kconfig items.
+
+    :param root_item:   Root item of the generated subset of items
+    :param filter_func: Filter function
+
+    """
+    if hasattr(root, "get_items"):
+        get_items = root.get_items
+    elif hasattr(root, "get_top_level_items"):
+        get_items = root.get_top_level_items
+    else:
+        message = "The symbol does not contain any subset of symbols"
+        raise Exception(message)
+    for item in get_items():
+        if item.is_symbol():
+            if not item.prompts:
+                continue
+            if not filter_func(item):
+                continue
+            yield item
+        elif item.is_menu() or item.is_choice():
+            for i in get_symbol_subset(item, filter_func):
+                yield i
+
+
+def get_symbol_parents(item, root=None, enable_choice=False):
+    """ Return the list of the item's parents. The lasst item of the list is
+    the closest parent, the first the furthest.
+
+    :param item:          Item from which the the parent list is generated
+    :param root:          Root item stopping the search (not included in the
+                          parent list)
+    :param enable_choice: Flag enabling choices to appear in the parent list
+
+    """
+    parent = item.get_parent()
+    parents = []
+    while parent and parent != root:
+        if parent.is_menu():
+            parents.append(parent.get_title())
+        elif enable_choice and parent.is_choice():
+            parents.append(parent.prompts[0][0])
+        parent = parent.get_parent()
+    if isinstance(root, kconfiglib.Menu) or \
+            (enable_choice and isinstance(root, kconfiglib.Choice)):
+        parents.append(".")
+    parents.reverse()
+    return parents
+
+
+def format_asciidoc_table(root, get_label_func, filter_func=lambda x: True,
+                          enable_choice=False, sorted=True):
+    """ Return the asciidoc formatted table of the items and their location.
+
+    :param root:           Root item of the item subset
+    :param get_label_func: Item's label getter function
+    :param filter_func:    Filter function to apply on the item subset
+    :param enable_choice:  Enable choices to appear as part of the item's
+                           location
+    :param sorted:         Flag to alphabetically sort the table
+
+    """
+    def _format_entry(label, parents):
+        """ Format an asciidoc table entry.
+
+        """
+        return "| {0:<40} | {1}\n".format(label, " -> ".join(parents))
+
+    lines = []
+    for item in get_symbol_subset(root, filter_func):
+        if not item.is_symbol() or not item.prompts:
+            continue
+        loc = get_symbol_parents(item, root, enable_choice=enable_choice)
+        lines.append(_format_entry(get_label_func(item), loc))
+    if sorted:
+        lines.sort(key=lambda x: x.lower())
+    if hasattr(root, "get_title"):
+        loc_label = get_symbol_parents(root, None, enable_choice=enable_choice)
+        loc_label += [root.get_title(), "..."]
+    else:
+        loc_label = ["Location"]
+    table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n"
+    table += "|===================================================\n"
+    table += _format_entry("Packages", loc_label)
+    table += "\n" + "".join(lines) + "\n"
+    table += "|===================================================\n"
+    return table
+
+
+class Buildroot:
+    """ Buildroot configuration object.
+
+    """
+    root_config = "Config.in"
+    package_dirname = "package"
+    package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"]
+    re_pkg_prefix = re.compile(r"^(" + "|".join(package_prefixes) + ").*")
+    deprecated_symbol = "BR2_DEPRECATED"
+
+    list_template = """\
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot {br_version_full}
+// Generation date: {gen_date}
+//
+
+{table}
+"""
+
+    list_info = {
+        'target-packages': {
+            'filename': "package-list",
+            'root_menu': "Package Selection for the target",
+            'filter': "_is_package",
+            'sorted': True,
+        },
+        'host-packages': {
+            'filename': "host-package-list",
+            'root_menu': "Host utilities",
+            'filter': "_is_package",
+            'sorted': True,
+        },
+        'deprecated': {
+            'filename': "deprecated-list",
+            'root_menu': None,
+            'filter': "_is_deprecated",
+            'sorted': False,
+        },
+    }
+
+    use_generator = False
+
+    def __init__(self):
+        self.base_dir = os.environ.get("TOPDIR")
+        self.package_dir = os.path.join(self.base_dir, self.package_dirname)
+        # The kconfiglib requires an environment variable named "srctree" to
+        # load the configuration, so set it.
+        os.environ.update({'srctree': self.base_dir})
+        self.config = kconfiglib.Config(os.path.join(self.base_dir,
+                                                     self.root_config))
+        self._deprecated = self.config.get_symbol(self.deprecated_symbol)
+        self.br_version_full = os.environ.get("BR2_VERSION_FULL")
+        self.generation_date = str(datetime.datetime.utcnow())
+
+    def _get_package_symbols(self, package_name):
+        """ Return a tuple containing the target and host package symbol.
+
+        """
+        symbols = re.sub("[-+.]", "_", package_name)
+        symbols = symbols.upper()
+        symbols = tuple([prefix + symbols for prefix in self.package_prefixes])
+        return symbols
+
+    def _is_deprecated(self, symbol):
+        """ Return True if the symbol is marked as deprecated, otherwise False.
+
+        """
+        return self._deprecated in symbol.get_referenced_symbols()
+
+    def _is_package(self, symbol):
+        """ Return True if the symbol is a package or a host package, otherwise
+        False.
+
+        """
+        if not self.re_pkg_prefix.match(symbol.get_name()):
+            return False
+        pkg_name = re.sub("BR2_PACKAGE_(HOST_)?(.*)", r"\2", symbol.get_name())
+
+        pattern = "^(HOST_)?" + pkg_name + "$"
+        pattern = re.sub("_", ".", pattern)
+        pattern = re.compile(pattern, re.IGNORECASE)
+        # Here, we cannot just check for the location of the Config.in because
+        # of the "virtual" package.
+        #
+        # So, to check that a symbol is a package (not a package option or
+        # anything else), we check for the existence of the package *.mk file.
+        #
+        # By the way, to actually check for a package, we should grep all *.mk
+        # files for the following regex:
+        # "\$\(eval \$\((host-)?(generic|autotools|cmake)-package\)\)"
+        #
+        # Implementation details:
+        #
+        # * The package list is generated from the *.mk file existence, the
+        #   first time this function is called. Despite the memory consumtion,
+        #   this list is stored because the execution time of this script is
+        #   noticebly shorter than re-scannig the package sub-tree for each
+        #   symbol.
+        if not hasattr(self, "_package_list"):
+            pkg_list = []
+            for _, _, files in os.walk(self.package_dir):
+                for file_ in (f for f in files if f.endswith(".mk")):
+                    pkg_list.append(re.sub(r"(.*?)\.mk", r"\1", file_))
+            setattr(self, "_package_list", pkg_list)
+        for pkg in getattr(self, "_package_list"):
+            if pattern.match(pkg):
+                return True
+        return False
+
+    def _get_symbol_label(self, symbol, mark_deprecated=True):
+        """ Return the label (a.k.a. prompt text) of the symbol.
+
+        :param symbol:          The symbol
+        :param mark_deprecated: Append a 'deprecated' to the label
+
+        """
+        label = symbol.prompts[0][0]
+        if self._is_deprecated(symbol) and mark_deprecated:
+            label += " *(deprecated)*"
+        return label
+
+    def print_list(self, list_type, enable_choice=True, enable_deprecated=True,
+                   dry_run=False, output=None):
+        """ Print the requested list. If not dry run, then the list is
+        automatically written in its own file.
+
+        :param list_type:         The list type to be generated
+        :param enable_choice:     Flag enabling choices to appear in the list
+        :param enable_deprecated: Flag enabling deprecated items to appear in
+                                  the package lists
+        :param dry_run:           Dry run (print the list in stdout instead of
+                                  writing the list file
+
+        """
+        def _get_menu(title):
+            """ Return the first symbol menu matching the given title.
+
+            """
+            menus = self.config.get_menus()
+            menu = [m for m in menus if m.get_title().lower() == title.lower()]
+            if not menu:
+                message = "No such menu: '{0}'".format(title)
+                raise Exception(message)
+            return menu[0]
+
+        list_config = self.list_info[list_type]
+        root_title = list_config.get('root_menu')
+        if root_title:
+            root_item = _get_menu(root_title)
+        else:
+            root_item = self.config
+        filter_ = getattr(self, list_config.get('filter'))
+        filter_func = lambda x: filter_(x)
+        if not enable_deprecated and list_type != "deprecated":
+            filter_func = lambda x: filter_(x) and not self._is_deprecated(x)
+        mark_depr = list_type != "deprecated"
+        get_label = lambda x: \
+                        self._get_symbol_label(x, mark_deprecated=mark_depr)
+
+        table = format_asciidoc_table(root_item, get_label,
+                                      filter_func=filter_func,
+                                      enable_choice=enable_choice,
+                                      sorted=list_config.get('sorted'))
+
+        content = self.list_template.format(
+            gen_date=self.generation_date,
+            br_version_full=self.br_version_full,
+            table=table)
+
+        if dry_run:
+            print(content)
+            return
+        if not output:
+            output = os.path.join(self.base_dir, "docs", "manual",
+                                  list_config.get('filename') + ".txt")
+        print("Writing the {0} list in:\n\t{1}".format(list_type, output))
+        with open(output, 'w') as fout:
+            fout.write(content)
+
+
+if __name__ == '__main__':
+    list_types = ['target-packages', 'host-packages', 'deprecated']
+    parser = ArgumentParser()
+    parser.add_argument("list_type", nargs="?", choices=list_types,
+                        help="""\
+Generate the given list (generate all lists if unspecified)""")
+    parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true',
+                        help="Output the generated list to stdout")
+    parser.add_argument("--output-target", dest="output_target",
+                        help="Output target package file")
+    parser.add_argument("--output-host", dest="output_host",
+                        help="Output host package file")
+    parser.add_argument("--output-deprecated", dest="output_deprecated",
+                        help="Output deprecated file")
+    args = parser.parse_args()
+    lists = [args.list_type] if args.list_type else list_types
+    buildroot = Buildroot()
+    for list_name in lists:
+        output = getattr(args, "output_" + list_name.split("-", 1)[0])
+        buildroot.print_list(list_name, dry_run=args.dry_run,
+                             output=output)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 07/11] manual: add a make target 'manual-update-lists'
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (5 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 06/11] support/scripts: add gen-manual-lists.py Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 08/11] manual: cleanup appendix.txt Samuel Martin
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Changes since v1:
* add manual-update-lists target to the .PHONY one (Arnout)
* misc. fixes/updates
---
 docs/manual/manual.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
index aa20534..281be29 100644
--- a/docs/manual/manual.mk
+++ b/docs/manual/manual.mk
@@ -24,6 +24,11 @@ $$(O)/docs/$(1)/$(1).$(4): docs/$(1)/$(1).txt $$($(call UPPERCASE,$(1))_SOURCES)
 	  -D $$(@D) $$<
 endef
 
+manual-update-lists:
+	@$(call MESSAGE,"Updating the manual lists...")
+	$(Q)BR2_DEFCONFIG="" PYTHONPATH=$(TOPDIR)/support/pym TOPDIR=$(TOPDIR) \
+		$(TOPDIR)/support/scripts/gen-manual-lists.py
+
 ################################################################################
 # GENDOC -- generates the make targets needed to build asciidoc documentation.
 #
@@ -41,8 +46,9 @@ $(call GENDOC_INNER,$(1),epub,epub,epub,EPUB)
 clean: $(1)-clean
 $(1)-clean:
 	$(Q)$(RM) -rf $(O)/docs/$(1)
-.PHONY: $(1) $(1)-clean
+.PHONY: $(1) $(1)-clean manual-update-lists
 endef
 
 MANUAL_SOURCES = $(wildcard docs/manual/*.txt) $(wildcard docs/images/*)
 $(eval $(call GENDOC,manual))
+
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 08/11] manual: cleanup appendix.txt
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (6 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 07/11] manual: add a make target 'manual-update-lists' Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 09/11] Makefile: add to the release target a warning about the manual updates Samuel Martin
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
Changes since v1:
* move the surrounding text of the list back in appendix.txt (Arnout)
---
 docs/manual/appendix.txt | 29 ++++++++++++++++++++---------
 1 file changed, 20 insertions(+), 9 deletions(-)

diff --git a/docs/manual/appendix.txt b/docs/manual/appendix.txt
index ef34169..ce54b99 100644
--- a/docs/manual/appendix.txt
+++ b/docs/manual/appendix.txt
@@ -6,15 +6,26 @@ Appendix
 
 include::makedev-syntax.txt[]
 
+
+// Automatically generated lists:
+
 [[package-list]]
-Available packages
-------------------
-// docs/manaual/pkg-list.txt is generated using the following command:
-// $ git grep -E '\((autotools|cmake|generic)-package\)' package/ |  \
-//     cut -d':' -f1 | grep '\.mk$' | \
-//     sed -e 's;.*\?/\(.*\?\).mk;* \1;' | \
-//     sort > docs/manual/pkg-list.txt
-
-include::pkg-list.txt[]
+Package Selection for the target
+--------------------------------
+
+include::package-list.txt[]
+
+[[host-package-list]]
+Host utilities
+--------------
+
+include::host-package-list.txt[]
+
+[[deprecated-list]]
+Deprecated stuff
+----------------
+
+The following stuff are marked as _deprecated_ in Buildroot due to
+their status either too old or unmaintained.
 
 include::deprecated-list.txt[]
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 09/11] Makefile: add to the release target a warning about the manual updates.
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (7 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 08/11] manual: cleanup appendix.txt Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 10/11] manual: update generated lists Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files Samuel Martin
  10 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

The manual-update-lists target is not added to the dependencies of the
release target to allow editing the generated files.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 3bab855..f965a05 100644
--- a/Makefile
+++ b/Makefile
@@ -815,6 +815,8 @@ release: OUT=buildroot-$(BR2_VERSION)
 # Create release tarballs. We need to fiddle a bit to add the generated
 # documentation to the git output
 release:
+	$(warning Make sure the manual is up-to-date. To update the manual, run:)
+	$(warning $$ make manual-update-lists)
 	git archive --format=tar --prefix=$(OUT)/ master > $(OUT).tar
 	$(MAKE) O=$(OUT) manual-html manual-txt manual-pdf
 	tar rf $(OUT).tar $(OUT)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 10/11] manual: update generated lists
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (8 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 09/11] Makefile: add to the release target a warning about the manual updates Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-25 21:31 ` [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files Samuel Martin
  10 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/deprecated-list.txt   |  79 ++--
 docs/manual/host-package-list.txt |  19 +
 docs/manual/package-list.txt      | 930 ++++++++++++++++++++++++++++++++++++++
 docs/manual/pkg-list.txt          | 870 -----------------------------------
 4 files changed, 985 insertions(+), 913 deletions(-)
 create mode 100644 docs/manual/host-package-list.txt
 create mode 100644 docs/manual/package-list.txt
 delete mode 100644 docs/manual/pkg-list.txt

diff --git a/docs/manual/deprecated-list.txt b/docs/manual/deprecated-list.txt
index 6dc87a4..7bef3c8 100644
--- a/docs/manual/deprecated-list.txt
+++ b/docs/manual/deprecated-list.txt
@@ -1,46 +1,39 @@
-// -*- mode:doc -*- ;
-
-[[deprecated]]
-Deprecated list
----------------
-
-The following stuff are marked as _deprecated_ in Buildroot due to
-their status either too old or unmaintained.
-
-// list generated using the followings command:
-// $ git grep -EB4 'depends on BR2_DEPRECATED'
-// and
-// $ git grep -EB4 'depends on BR2_DEPRECATED' | \
-//     grep -Eo '(:|-).*?(config|comment) BR2_.*'
 //
-// Need manual checks and sorting.
-
-* Packages:
-
-** +busybox+ 1.18.x
-** +customize+
-** +lzma+
-** +microperl+
-** +netkitbase+
-** +netkittelnet+
-** +pkg-config+
-** +squashfs3+
-** +ttcp+
-
-* Toolchain:
-
-** +gdb+ 6.8
-** +gdb+ 7.0.1
-** +gdb+ 7.1
-** +kernel headers+ 2.6.37
-** +kernel headers+ 2.6.38
-** +kernel headers+ 2.6.39
-
-* Bootloaders:
-
-** +u-boot+ 2011-06
-** +u-boot+ 2011-09
+// Automatically generated list for Buildroot manual.
+// Buildroot 2013.02-rc2-00028-g4564f78-dirty
+// Generation date: 2013-02-25 19:45:02.967339
+//
 
-* Output images:
+[width="90%",cols="^1,4",options="header"]
+|===================================================
+| Packages                                 | Location
+
+| documentation on the target              | Build options
+| development files in target filesystem   | Build options
+| Linux 3.1.x kernel headers               | Toolchain -> Kernel Headers
+| Linux 3.3.x kernel headers               | Toolchain -> Kernel Headers
+| Linux 3.5.x kernel headers               | Toolchain -> Kernel Headers
+| uClibc 0.9.31.x                          | Toolchain -> uClibc C library Version
+| binutils 2.20                            | Toolchain -> Binutils Version
+| Build gdb debugger for the Target        | Toolchain
+| gdb 7.2.x                                | Toolchain -> GDB debugger Version
+| gdb 7.3.x                                | Toolchain -> GDB debugger Version
+| lzma                                     | Package Selection for the target -> Compressors and decompressors
+| autoconf                                 | Package Selection for the target -> Development tools
+| automake                                 | Package Selection for the target -> Development tools
+| ccache                                   | Package Selection for the target -> Development tools
+| gcc                                      | Package Selection for the target -> Development tools
+| make                                     | Package Selection for the target -> Development tools
+| pkg-config                               | Package Selection for the target -> Development tools
+| xstroke                                  | Package Selection for the target -> Graphic libraries and applications (graphic/text)
+| squashfs3                                | Package Selection for the target -> Filesystem and flash utilities
+| microperl                                | Package Selection for the target -> Interpreter languages and scripting
+| netkitbase                               | Package Selection for the target -> Networking applications
+| netkittelnet                             | Package Selection for the target -> Networking applications
+| ttcp                                     | Package Selection for the target -> Networking applications
+| 3.x                                      | Filesystem images -> SquashFS version
+| 2011.09                                  | Bootloaders -> U-Boot Version
+| 2011.06                                  | Bootloaders -> U-Boot Version
+
+|===================================================
 
-** squashfs3 image
diff --git a/docs/manual/host-package-list.txt b/docs/manual/host-package-list.txt
new file mode 100644
index 0000000..3e52740
--- /dev/null
+++ b/docs/manual/host-package-list.txt
@@ -0,0 +1,19 @@
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot 2013.02-rc2-00028-g4564f78-dirty
+// Generation date: 2013-02-25 19:45:02.967339
+//
+
+[width="90%",cols="^1,4",options="header"]
+|===================================================
+| Packages                                 | Host utilities -> ...
+
+| host dfu-util                            | .
+| host lpc3250loader                       | .
+| host omap-u-boot-utils                   | .
+| host openocd                             | .
+| host sam-ba                              | .
+| host u-boot tools                        | .
+
+|===================================================
+
diff --git a/docs/manual/package-list.txt b/docs/manual/package-list.txt
new file mode 100644
index 0000000..94375ab
--- /dev/null
+++ b/docs/manual/package-list.txt
@@ -0,0 +1,930 @@
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot 2013.02-rc2-00028-g4564f78-dirty
+// Generation date: 2013-02-25 19:45:02.967339
+//
+
+[width="90%",cols="^1,4",options="header"]
+|===================================================
+| Packages                                 | Package Selection for the target -> ...
+
+| acl                                      | . -> System tools
+| acpid                                    | . -> Hardware handling
+| alsa-lib                                 | . -> Libraries -> Audio/Sound
+| alsa-utils                               | . -> Audio and video applications
+| alsamixergui                             | . -> Graphic libraries and applications (graphic/text)
+| applewmproto                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| appres                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| apr                                      | . -> Libraries -> Other
+| apr-util                                 | . -> Libraries -> Other
+| argp-standalone                          | . -> Libraries -> Other
+| argus                                    | . -> Networking applications
+| arptables                                | . -> Networking applications
+| at                                       | . -> Shell and utilities
+| atk                                      | . -> Libraries -> Graphics
+| attr                                     | . -> System tools
+| audiofile                                | . -> Libraries -> Audio/Sound
+| aumix                                    | . -> Audio and video applications
+| autoconf *(deprecated)*                  | . -> Development tools
+| automake *(deprecated)*                  | . -> Development tools
+| avahi                                    | . -> Networking applications
+| axel                                     | . -> Networking applications
+| b43-firmware                             | . -> Hardware handling -> Misc devices firmwares
+| bash                                     | . -> Shell and utilities
+| bdftopcf                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| beecrypt                                 | . -> Libraries -> Crypto
+| beforelight                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| bellagio                                 | . -> Audio and video applications
+| berkeleydb                               | . -> Libraries -> Database
+| bigreqsproto                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| bind                                     | . -> Networking applications
+| binutils                                 | . -> Development tools
+| bison                                    | . -> Development tools
+| bitmap                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| blackbox                                 | . -> Graphic libraries and applications (graphic/text)
+| bluez-utils                              | . -> Networking applications
+| bmon                                     | . -> Networking applications
+| boa                                      | . -> Networking applications
+| bonnie++                                 | . -> Debugging, profiling and benchmark
+| boost                                    | . -> Libraries -> Other
+| bootutils                                | . -> System tools
+| bridge-utils                             | . -> Networking applications
+| bsdiff                                   | . -> Development tools
+| bustle                                   | . -> Development tools
+| BusyBox                                  | .
+| bwm-ng                                   | . -> System tools
+| bzip2                                    | . -> Compressors and decompressors
+| cache-calibrator                         | . -> Debugging, profiling and benchmark
+| cairo                                    | . -> Libraries -> Graphics
+| can-utils                                | . -> Networking applications
+| ccache *(deprecated)*                    | . -> Development tools
+| ccid                                     | . -> Libraries -> Hardware handling
+| cdrkit                                   | . -> Hardware handling
+| cegui06                                  | . -> Graphic libraries and applications (graphic/text)
+| cgilua                                   | . -> Interpreter languages and scripting -> LUA libraries/modules
+| cifs-utils                               | . -> Filesystem and flash utilities
+| cJSON                                    | . -> Libraries -> JSON/XML
+| classpath                                | . -> Libraries -> Other
+| collectd                                 | . -> Miscellaneous
+| compositeproto                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| connman                                  | . -> Networking applications
+| conntrack-tools                          | . -> Networking applications
+| copas                                    | . -> Interpreter languages and scripting -> LUA libraries/modules
+| coreutils                                | . -> Development tools
+| coxpcall                                 | . -> Interpreter languages and scripting -> LUA libraries/modules
+| cpanminus                                | . -> Interpreter languages and scripting -> Perl libraries/modules
+| cpuload                                  | . -> System tools
+| cramfs                                   | . -> Filesystem and flash utilities
+| ctorrent                                 | . -> Networking applications
+| cups                                     | . -> Networking applications
+| curlftpfs (FUSE)                         | . -> Filesystem and flash utilities
+| cvs                                      | . -> Development tools
+| damageproto                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| dash                                     | . -> Shell and utilities
+| dbus                                     | . -> Hardware handling
+| dbus-glib                                | . -> Hardware handling
+| dbus-python                              | . -> Hardware handling
+| devmem2                                  | . -> Hardware handling
+| dhcpdump                                 | . -> Networking applications
+| dhrystone                                | . -> Debugging, profiling and benchmark
+| dialog                                   | . -> Shell and utilities
+| diffutils                                | . -> Development tools
+| directfb                                 | . -> Graphic libraries and applications (graphic/text)
+| directfb examples                        | . -> Graphic libraries and applications (graphic/text)
+| directfb virtual input extension         | . -> Graphic libraries and applications (graphic/text)
+| distcc                                   | . -> Development tools
+| dmalloc                                  | . -> Debugging, profiling and benchmark
+| dmidecode                                | . -> Hardware handling
+| dmraid                                   | . -> Hardware handling
+| dmxproto                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| dnsmasq                                  | . -> Networking applications
+| docker                                   | . -> Graphic libraries and applications (graphic/text)
+| dosfstools                               | . -> Filesystem and flash utilities
+| dri2proto                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| dropbear                                 | . -> Networking applications
+| dsp-tools                                | . -> System tools
+| dstat                                    | . -> Debugging, profiling and benchmark
+| dvb-apps (transponders data)             | . -> Hardware handling
+| dvbsnoop                                 | . -> Hardware handling
+| e2fsprogs                                | . -> Filesystem and flash utilities
+| ebtables                                 | . -> Networking applications
+| ed                                       | . -> Text editors and viewers
+| editres                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| eeprog                                   | . -> Hardware handling
+| elfutils                                 | . -> Libraries -> Other
+| empty                                    | . -> Miscellaneous
+| enchant                                  | . -> Libraries -> Text and terminal handling
+| encodings                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| enlightenment                            | . -> Graphic libraries and applications (graphic/text)
+| Enlightenment Foundation Libraries       | . -> Graphic libraries and applications (graphic/text)
+| erlang                                   | . -> Interpreter languages and scripting
+| ethtool                                  | . -> Networking applications
+| evtest                                   | . -> Hardware handling
+| expat                                    | . -> Libraries -> JSON/XML
+| expedite                                 | . -> Graphic libraries and applications (graphic/text)
+| explorercanvas                           | . -> Libraries -> Javascript
+| ezxml                                    | . -> Libraries -> JSON/XML
+| faad2                                    | . -> Audio and video applications
+| fb-test-app                              | . -> Graphic libraries and applications (graphic/text)
+| fbdump (Framebuffer Capture Tool)        | . -> Graphic libraries and applications (graphic/text)
+| fbgrab                                   | . -> Graphic libraries and applications (graphic/text)
+| fbset                                    | . -> Graphic libraries and applications (graphic/text)
+| fbterm                                   | . -> Graphic libraries and applications (graphic/text)
+| fbv                                      | . -> Graphic libraries and applications (graphic/text)
+| fconfig                                  | . -> Hardware handling
+| feh                                      | . -> Graphic libraries and applications (graphic/text)
+| ffmpeg                                   | . -> Audio and video applications
+| fftw                                     | . -> Libraries -> Other
+| file                                     | . -> Shell and utilities
+| findutils                                | . -> Development tools
+| firmware-imx                             | . -> Hardware handling -> Misc devices firmwares
+| fis                                      | . -> Hardware handling
+| fixesproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| flac                                     | . -> Audio and video applications
+| flashbench                               | . -> Filesystem and flash utilities
+| flashrom                                 | . -> Hardware handling
+| flex                                     | . -> Development tools
+| flot                                     | . -> Libraries -> Javascript
+| fltk                                     | . -> Libraries -> Graphics
+| fluxbox                                  | . -> Graphic libraries and applications (graphic/text)
+| fmtools                                  | . -> Hardware handling
+| font-adobe-100dpi                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-adobe-75dpi                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-adobe-utopia-100dpi                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-adobe-utopia-75dpi                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-adobe-utopia-type1                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-alias                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-arabic-misc                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-100dpi                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-75dpi                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-lucidatypewriter-100dpi          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-lucidatypewriter-75dpi           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-ttf                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bh-type1                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bitstream-100dpi                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bitstream-75dpi                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bitstream-speedo                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-bitstream-type1                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-cronyx-cyrillic                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-cursor-misc                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-daewoo-misc                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-dec-misc                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-ibm-type1                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-isas-misc                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-jis-misc                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-micro-misc                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-misc-cyrillic                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-misc-ethiopic                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-misc-meltho                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-misc-misc                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-mutt-misc                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-schumacher-misc                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-screen-cyrillic                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-sony-misc                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-sun-misc                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-util                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-winitzki-cyrillic                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| font-xfree86-type1                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Fonts
+| fontcacheproto                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| fontconfig                               | . -> Libraries -> Graphics
+| fontsproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| fonttosfnt                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| freerdp                                  | . -> Graphic libraries and applications (graphic/text)
+| freetype                                 | . -> Libraries -> Graphics
+| fslsfonts                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| fstobdf                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| fxload                                   | . -> Hardware handling
+| gadgetfs-test                            | . -> Hardware handling
+| gamin                                    | . -> Libraries -> Filesystem
+| gawk                                     | . -> Development tools
+| gd                                       | . -> Libraries -> Graphics
+| gdbm                                     | . -> Libraries -> Database
+| gdisk                                    | . -> Hardware handling
+| gdk-pixbuf                               | . -> Libraries -> Graphics
+| genext2fs                                | . -> Filesystem and flash utilities
+| genromfs                                 | . -> Filesystem and flash utilities
+| gesftpserver                             | . -> Networking applications
+| gettext                                  | . -> Development tools
+| giblib                                   | . -> Libraries -> Graphics
+| glib-networking                          | . -> Libraries -> Networking
+| glproto                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| gmp                                      | . -> Development tools
+| gmpc                                     | . -> Graphic libraries and applications (graphic/text)
+| gnuchess                                 | . -> Games
+| gnupg                                    | . -> Shell and utilities
+| gnutls                                   | . -> Libraries -> Crypto
+| gob2                                     | . -> Graphic libraries and applications (graphic/text)
+| Google font directory                    | . -> Miscellaneous
+| gperf                                    | . -> Development tools
+| gpsd                                     | . -> Hardware handling
+| gqview                                   | . -> Graphic libraries and applications (graphic/text)
+| grantlee                                 | . -> Graphic libraries and applications (graphic/text)
+| grep                                     | . -> Development tools
+| gsl                                      | . -> Libraries -> Other
+| gst-dsp                                  | . -> Audio and video applications
+| gst-ffmpeg                               | . -> Audio and video applications
+| gst-fsl-plugins                          | . -> Audio and video applications
+| gst-omapfb                               | . -> Audio and video applications
+| gst-plugins-bad                          | . -> Audio and video applications
+| gst-plugins-base                         | . -> Audio and video applications
+| gst-plugins-good                         | . -> Audio and video applications
+| gst-plugins-ugly                         | . -> Audio and video applications
+| gstreamer                                | . -> Audio and video applications
+| gtk engines                              | . -> Libraries -> Graphics
+| gtkperf (performance test for GTK2)      | . -> Graphic libraries and applications (graphic/text)
+| gvfs                                     | . -> Hardware handling
+| gzip                                     | . -> Compressors and decompressors
+| haserl                                   | . -> Interpreter languages and scripting
+| hdparm                                   | . -> Hardware handling
+| heirloom-mailx                           | . -> Networking applications
+| hiawatha                                 | . -> Networking applications
+| hicolor (default theme)                  | . -> Libraries -> Graphics -> GTK Themes
+| hostapd                                  | . -> Networking applications
+| htop                                     | . -> System tools
+| httping                                  | . -> Networking applications
+| hwdata                                   | . -> Hardware handling
+| i2c-tools                                | . -> Hardware handling
+| iceauth                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| ico                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| icu                                      | . -> Libraries -> Text and terminal handling
+| ifplugd                                  | . -> Networking applications
+| iftop                                    | . -> Networking applications
+| igh-ethercat                             | . -> Networking applications
+| imagemagick                              | . -> Graphic libraries and applications (graphic/text)
+| imlib2                                   | . -> Libraries -> Graphics
+| imx-lib                                  | . -> Libraries -> Hardware handling
+| inadyn                                   | . -> Networking applications
+| infozip                                  | . -> Compressors and decompressors
+| inotify-tools                            | . -> Shell and utilities
+| input-event-daemon                       | . -> Hardware handling
+| input-tools                              | . -> Hardware handling
+| inputproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| intltool                                 | . -> Development tools
+| iostat                                   | . -> Hardware handling
+| iperf                                    | . -> Networking applications
+| ipkg                                     | . -> Package managers
+| iproute2                                 | . -> Networking applications
+| ipsec-tools                              | . -> Networking applications
+| ipset                                    | . -> Networking applications
+| iptables                                 | . -> Networking applications
+| irda-utils                               | . -> Hardware handling
+| isc dhcp                                 | . -> Networking applications
+| iw                                       | . -> Networking applications
+| jamvm                                    | . -> Interpreter languages and scripting
+| jpeg                                     | . -> Libraries -> Graphics -> jpeg variant
+| jpeg support                             | . -> Libraries -> Graphics
+| jpeg-turbo                               | . -> Libraries -> Graphics -> jpeg variant
+| jQuery                                   | . -> Libraries -> Javascript
+| jQuery-Sparkline                         | . -> Libraries -> Javascript
+| jQuery-Validation                        | . -> Libraries -> Javascript
+| jsmin                                    | . -> Libraries -> Javascript
+| json-c                                   | . -> Libraries -> JSON/XML
+| kbd                                      | . -> Hardware handling
+| kbproto                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| kexec                                    | . -> Debugging, profiling and benchmark
+| keyutils                                 | . -> System tools
+| kismet                                   | . -> Networking applications
+| kmod                                     | . -> System tools
+| lame                                     | . -> Audio and video applications
+| latencytop                               | . -> Debugging, profiling and benchmark
+| lcdapi                                   | . -> Libraries -> Hardware handling
+| lcdproc                                  | . -> Hardware handling
+| leafpad                                  | . -> Graphic libraries and applications (graphic/text)
+| less                                     | . -> Text editors and viewers
+| libaio                                   | . -> Libraries -> Hardware handling
+| libao                                    | . -> Libraries -> Audio/Sound
+| libarchive                               | . -> Libraries -> Compression and decompression
+| libargtable2                             | . -> Libraries -> Other
+| libart                                   | . -> Libraries -> Graphics
+| libatasmart                              | . -> Libraries -> Hardware handling
+| libatomic_ops                            | . -> Libraries -> Other
+| libcap                                   | . -> Libraries -> Other
+| libcap-ng                                | . -> Libraries -> Other
+| libcdaudio                               | . -> Libraries -> Audio/Sound
+| libcgi                                   | . -> Libraries -> Networking
+| libcgicc                                 | . -> Libraries -> Networking
+| libcofi                                  | . -> Libraries -> Other
+| libconfig                                | . -> Libraries -> Filesystem
+| libconfuse                               | . -> Libraries -> Filesystem
+| libcue                                   | . -> Libraries -> Audio/Sound
+| libcuefile                               | . -> Libraries -> Audio/Sound
+| libcurl                                  | . -> Libraries -> Networking
+| libdaemon                                | . -> Libraries -> Other
+| libdmtx                                  | . -> Libraries -> Graphics
+| libdmx                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libdnet                                  | . -> Libraries -> Networking
+| libdrm                                   | . -> Libraries -> Graphics
+| libdvdnav                                | . -> Libraries -> Multimedia
+| libdvdread                               | . -> Libraries -> Multimedia
+| libebml                                  | . -> Libraries -> Multimedia
+| libecore                                 | . -> Graphic libraries and applications (graphic/text)
+| libedbus                                 | . -> Graphic libraries and applications (graphic/text)
+| libedje                                  | . -> Graphic libraries and applications (graphic/text)
+| libeet                                   | . -> Graphic libraries and applications (graphic/text)
+| libefreet                                | . -> Graphic libraries and applications (graphic/text)
+| libeina                                  | . -> Graphic libraries and applications (graphic/text)
+| libeio                                   | . -> Graphic libraries and applications (graphic/text)
+| libelementary                            | . -> Graphic libraries and applications (graphic/text)
+| libelf                                   | . -> Libraries -> Other
+| libembryo                                | . -> Graphic libraries and applications (graphic/text)
+| Liberation (Free fonts)                  | . -> Graphic libraries and applications (graphic/text)
+| libesmtp                                 | . -> Libraries -> Networking
+| libethumb                                | . -> Graphic libraries and applications (graphic/text)
+| libev                                    | . -> Libraries -> Other
+| libevas                                  | . -> Graphic libraries and applications (graphic/text)
+| libevas generic loaders                  | . -> Graphic libraries and applications (graphic/text)
+| libevent                                 | . -> Libraries -> Other
+| libexif                                  | . -> Libraries -> Graphics
+| libeXosip2                               | . -> Libraries -> Networking
+| libfcgi                                  | . -> Libraries -> Networking
+| libffi                                   | . -> Libraries -> Other
+| libfontenc                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libfreefare                              | . -> Libraries -> Hardware handling
+| libfribidi                               | . -> Libraries -> Text and terminal handling
+| libFS                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libfslcodec                              | . -> Libraries -> Multimedia
+| libfslparser                             | . -> Libraries -> Multimedia
+| libfslvpuwrap                            | . -> Libraries -> Multimedia
+| libftdi                                  | . -> Libraries -> Hardware handling
+| libfuse                                  | . -> Libraries -> Filesystem
+| libgail                                  | . -> Libraries -> Graphics
+| libgcrypt                                | . -> Libraries -> Crypto
+| libgeotiff                               | . -> Libraries -> Graphics
+| libglade                                 | . -> Libraries -> Graphics
+| libglib2                                 | . -> Libraries -> Other
+| libgpg-error                             | . -> Libraries -> Crypto
+| libgsasl                                 | . -> Libraries -> Networking
+| libgtk2                                  | . -> Libraries -> Graphics
+| libhid                                   | . -> Libraries -> Hardware handling
+| libical                                  | . -> Libraries -> Other
+| libICE                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libiconv                                 | . -> Libraries -> Text and terminal handling
+| libid3tag                                | . -> Libraries -> Audio/Sound
+| libidn                                   | . -> Libraries -> Networking
+| libiqrf                                  | . -> Libraries -> Hardware handling
+| libiscsi                                 | . -> Libraries -> Networking
+| liblo                                    | . -> Libraries -> Audio/Sound
+| liblockfile                              | . -> Libraries -> Filesystem
+| liblog4c-localtime                       | . -> Libraries -> Other
+| libmad                                   | . -> Libraries -> Audio/Sound
+| libmatroska                              | . -> Libraries -> Multimedia
+| libmbus                                  | . -> Libraries -> Networking
+| libmcrypt                                | . -> Libraries -> Crypto
+| libmhash                                 | . -> Libraries -> Crypto
+| libmicrohttpd                            | . -> Libraries -> Networking
+| libmms                                   | . -> Libraries -> Multimedia
+| libmnl                                   | . -> Libraries -> Networking
+| libmodbus                                | . -> Libraries -> Networking
+| libmpd                                   | . -> Libraries -> Audio/Sound
+| libmpeg2                                 | . -> Libraries -> Multimedia
+| libneon                                  | . -> Libraries -> Networking
+| libnetfilter_acct                        | . -> Libraries -> Networking
+| libnetfilter_conntrack                   | . -> Libraries -> Networking
+| libnetfilter_cthelper                    | . -> Libraries -> Networking
+| libnetfilter_cttimeout                   | . -> Libraries -> Networking
+| libnetfilter_log                         | . -> Libraries -> Networking
+| libnetfilter_queue                       | . -> Libraries -> Networking
+| libnfc                                   | . -> Libraries -> Hardware handling
+| libnfc-llcp                              | . -> Libraries -> Hardware handling
+| libnfnetlink                             | . -> Libraries -> Networking
+| libnl                                    | . -> Libraries -> Networking
+| libnspr                                  | . -> Libraries -> Other
+| libnss                                   | . -> Libraries -> Crypto
+| liboauth                                 | . -> Libraries -> Networking
+| libogg                                   | . -> Libraries -> Multimedia
+| liboldX                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| liboping                                 | . -> Libraries -> Networking
+| libosip2                                 | . -> Libraries -> Networking
+| libpcap                                  | . -> Libraries -> Networking
+| libpciaccess                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libplayer                                | . -> Libraries -> Multimedia
+| libpng                                   | . -> Libraries -> Graphics
+| libpthread-stubs                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libraw                                   | . -> Libraries -> Graphics
+| libraw1394                               | . -> Libraries -> Hardware handling
+| libreplaygain                            | . -> Libraries -> Audio/Sound
+| librsvg                                  | . -> Libraries -> Graphics
+| librsync                                 | . -> Libraries -> Networking
+| libsamplerate                            | . -> Libraries -> Audio/Sound
+| libseccomp                               | . -> Libraries -> Other
+| libsexy                                  | . -> Graphic libraries and applications (graphic/text)
+| libsha1                                  | . -> Libraries -> Crypto
+| libsigc++                                | . -> Libraries -> Other
+| libSM                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libsndfile                               | . -> Libraries -> Audio/Sound
+| libsoup                                  | . -> Libraries -> Networking
+| libsvgtiny                               | . -> Libraries -> Graphics
+| libsysfs                                 | . -> Libraries -> Filesystem
+| libtheora                                | . -> Libraries -> Multimedia
+| libtirpc                                 | . -> Libraries -> Networking
+| libtool                                  | . -> Development tools
+| libtorrent                               | . -> Libraries -> Networking
+| libtpl                                   | . -> Libraries -> Other
+| libts - The Touchscreen tslib Library    | . -> Libraries -> Hardware handling
+| libungif                                 | . -> Libraries -> Graphics
+| libupnp                                  | . -> Libraries -> Networking
+| liburcu                                  | . -> Libraries -> Other
+| libusb                                   | . -> Libraries -> Hardware handling
+| libusb-compat                            | . -> Libraries -> Hardware handling
+| libv4l                                   | . -> Libraries -> Hardware handling
+| libvncserver                             | . -> Libraries -> Networking
+| libvorbis                                | . -> Libraries -> Audio/Sound
+| libX11                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXau                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXaw                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libxcb                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXcomposite                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXcursor                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXdamage                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXdmcp                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXext                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXfixes                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXfont                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXfontcache                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXft                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXi                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXinerama                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libxkbfile                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libxkbui                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libxml-parser-perl                       | . -> Libraries -> JSON/XML
+| libxml2                                  | . -> Libraries -> JSON/XML
+| libXmu                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXp                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXpm                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXprintAppUtil                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXprintUtil                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXrandr                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXrender                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXres                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXScrnSaver                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libxslt                                  | . -> Libraries -> JSON/XML
+| libXt                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXtst                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXv                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXvMC                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXxf86dga                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libXxf86vm                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| libyaml                                  | . -> Libraries -> JSON/XML
+| lighttpd                                 | . -> Networking applications
+| linenoise                                | . -> Libraries -> Text and terminal handling
+| links                                    | . -> Networking applications
+| linphone                                 | . -> Networking applications
+| linux-firmware                           | . -> Hardware handling -> Misc devices firmwares
+| linux-fusion communication layer for DirectFB multi | . -> Graphic libraries and applications (graphic/text)
+| linux-pam                                | . -> Libraries -> Other
+| listres                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| LiTE (toolbox engine)                    | . -> Graphic libraries and applications (graphic/text)
+| live555                                  | . -> Libraries -> Multimedia
+| lm-sensors                               | . -> Hardware handling
+| lmbench                                  | . -> Debugging, profiling and benchmark
+| lockfile programs                        | . -> Shell and utilities
+| logrotate                                | . -> Shell and utilities
+| logsurfer                                | . -> Shell and utilities
+| lrzsz                                    | . -> Networking applications
+| lshw                                     | . -> Hardware handling
+| lsof                                     | . -> Debugging, profiling and benchmark
+| lsuio                                    | . -> Hardware handling
+| ltp-testsuite                            | . -> Debugging, profiling and benchmark
+| ltrace                                   | . -> Debugging, profiling and benchmark
+| lttng-babeltrace                         | . -> Debugging, profiling and benchmark
+| lttng-libust                             | . -> Libraries -> Other
+| lttng-modules                            | . -> Debugging, profiling and benchmark
+| lttng-tools                              | . -> Debugging, profiling and benchmark
+| lua                                      | . -> Interpreter languages and scripting
+| lua-msgpack-native                       | . -> Interpreter languages and scripting -> LUA libraries/modules
+| luacjson                                 | . -> Interpreter languages and scripting -> LUA libraries/modules
+| luaexpat                                 | . -> Interpreter languages and scripting -> LUA libraries/modules
+| luafilesystem                            | . -> Interpreter languages and scripting -> LUA libraries/modules
+| luajit                                   | . -> Interpreter languages and scripting
+| luasocket                                | . -> Interpreter languages and scripting -> LUA libraries/modules
+| luit                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| lvm2 & device mapper                     | . -> Hardware handling
+| lzma *(deprecated)*                      | . -> Compressors and decompressors
+| lzo                                      | . -> Libraries -> Compression and decompression
+| lzop                                     | . -> Compressors and decompressors
+| m4                                       | . -> Development tools
+| macchanger                               | . -> Networking applications
+| madplay                                  | . -> Audio and video applications
+| make *(deprecated)*                      | . -> Development tools
+| makedepend                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Utilities
+| makedevs                                 | . -> Filesystem and flash utilities
+| Matchbox Desktop                         | . -> Graphic libraries and applications (graphic/text)
+| Matchbox Panel                           | . -> Graphic libraries and applications (graphic/text)
+| Matchbox session common files            | . -> Graphic libraries and applications (graphic/text)
+| Matchbox Virtual Keyboard                | . -> Graphic libraries and applications (graphic/text)
+| MatchBox Window Manager                  | . -> Graphic libraries and applications (graphic/text)
+| mcookie                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Utilities
+| mcrypt                                   | . -> Miscellaneous
+| mdadm                                    | . -> Hardware handling
+| media-ctl                                | . -> Hardware handling
+| mediastreamer                            | . -> Libraries -> Multimedia
+| memstat                                  | . -> Debugging, profiling and benchmark
+| memtester                                | . -> Hardware handling
+| Mesa 3D Graphics Library                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| metacity                                 | . -> Graphic libraries and applications (graphic/text)
+| microperl *(deprecated)*                 | . -> Interpreter languages and scripting
+| midori                                   | . -> Graphic libraries and applications (graphic/text)
+| mii-diag                                 | . -> Networking applications
+| Mini-XML                                 | . -> Libraries -> JSON/XML
+| minicom                                  | . -> Hardware handling
+| mkfontdir                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| mkfontscale                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| mobile-broadband-provider-info           | . -> Miscellaneous
+| module-init-tools                        | . -> System tools
+| monit                                    | . -> System tools
+| mpc                                      | . -> Development tools
+| mpd                                      | . -> Audio and video applications
+| mpfr                                     | . -> Development tools
+| mpg123                                   | . -> Audio and video applications
+| mplayer                                  | . -> Audio and video applications
+| mrouted                                  | . -> Networking applications
+| msmtp                                    | . -> Networking applications
+| mtd/jffs2 utilities                      | . -> Filesystem and flash utilities
+| mtdev                                    | . -> Libraries -> Hardware handling
+| mtdev2tuio                               | . -> Libraries -> Other
+| musepack                                 | . -> Audio and video applications
+| mutt                                     | . -> Networking applications
+| MySQL client                             | . -> Libraries -> Database
+| nano                                     | . -> Text editors and viewers
+| nanocom                                  | . -> Hardware handling
+| nbd                                      | . -> Networking applications
+| ncdu                                     | . -> System tools
+| ncftp                                    | . -> Networking applications
+| ncurses                                  | . -> Libraries -> Text and terminal handling
+| ndisc6 tools                             | . -> Networking applications
+| neard                                    | . -> Hardware handling
+| neardal                                  | . -> Libraries -> Hardware handling
+| netatalk                                 | . -> Networking applications
+| netcat                                   | . -> Networking applications
+| netkitbase *(deprecated)*                | . -> Networking applications
+| netkittelnet *(deprecated)*              | . -> Networking applications
+| netperf                                  | . -> Debugging, profiling and benchmark
+| netplug                                  | . -> Networking applications
+| netsnmp                                  | . -> Networking applications
+| netstat-nat                              | . -> Networking applications
+| nettle                                   | . -> Libraries -> Crypto
+| NetworkManager                           | . -> Networking applications
+| newt                                     | . -> Libraries -> Text and terminal handling
+| nfacct                                   | . -> Networking applications
+| nfs-utils                                | . -> Filesystem and flash utilities
+| ngircd                                   | . -> Networking applications
+| ngrep                                    | . -> Networking applications
+| noip                                     | . -> Networking applications
+| nss-mdns                                 | . -> Libraries -> Networking
+| ntfs-3g                                  | . -> Filesystem and flash utilities
+| ntp                                      | . -> Networking applications
+| nuttcp                                   | . -> Networking applications
+| ocf-linux                                | . -> Libraries -> Crypto
+| oclock                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| ofono                                    | . -> Hardware handling
+| OLSR mesh networking Daemon              | . -> Networking applications
+| open2300                                 | . -> Hardware handling
+| opencv                                   | . -> Libraries -> Graphics
+| openntpd                                 | . -> Networking applications
+| openocd                                  | . -> Hardware handling
+| openssh                                  | . -> Networking applications
+| openssl                                  | . -> Libraries -> Crypto
+| openswan                                 | . -> Networking applications
+| openvpn                                  | . -> Networking applications
+| opkg                                     | . -> Package managers
+| oprofile                                 | . -> Debugging, profiling and benchmark
+| opus                                     | . -> Libraries -> Audio/Sound
+| opus-tools                               | . -> Audio and video applications
+| orc                                      | . -> Libraries -> Other
+| oRTP                                     | . -> Libraries -> Networking
+| owl-linux                                | . -> Hardware handling
+| pango                                    | . -> Libraries -> Graphics
+| parted                                   | . -> Hardware handling
+| patch                                    | . -> Development tools
+| pciutils                                 | . -> Hardware handling
+| pcmanfm                                  | . -> Graphic libraries and applications (graphic/text)
+| pcre                                     | . -> Libraries -> Text and terminal handling
+| pcsc-lite                                | . -> Libraries -> Hardware handling
+| perf                                     | . -> Debugging, profiling and benchmark
+| perl                                     | . -> Interpreter languages and scripting
+| php                                      | . -> Interpreter languages and scripting
+| picocom                                  | . -> Hardware handling
+| pixman                                   | . -> Libraries -> Graphics
+| pkg-config *(deprecated)*                | . -> Development tools
+| pkgconf                                  | . -> Development tools
+| poco                                     | . -> Libraries -> Other
+| polarssl                                 | . -> Libraries -> Crypto
+| polkit                                   | . -> System tools
+| popt                                     | . -> Libraries -> Text and terminal handling
+| portaudio                                | . -> Libraries -> Audio/Sound
+| portmap                                  | . -> Networking applications
+| pppd                                     | . -> Networking applications
+| pptp-linux                               | . -> Networking applications
+| PrBoom                                   | . -> Games
+| printproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| procps                                   | . -> System tools
+| proftpd                                  | . -> Networking applications
+| protobuf                                 | . -> Libraries -> Other
+| proxychains-ng                           | . -> Networking applications
+| psmisc                                   | . -> System tools
+| pulseaudio                               | . -> Audio and video applications
+| pv                                       | . -> Debugging, profiling and benchmark
+| pygame                                   | . -> Interpreter languages and scripting -> external python modules
+| pyparsing                                | . -> Interpreter languages and scripting -> external python modules
+| python                                   | . -> Interpreter languages and scripting
+| python-bottle                            | . -> Interpreter languages and scripting -> external python modules
+| python-dpkt                              | . -> Interpreter languages and scripting -> external python modules
+| python-id3                               | . -> Interpreter languages and scripting -> external python modules
+| python-mad                               | . -> Interpreter languages and scripting -> external python modules
+| python-meld3                             | . -> Interpreter languages and scripting -> external python modules
+| python-netifaces                         | . -> Interpreter languages and scripting -> external python modules
+| python-nfc                               | . -> Interpreter languages and scripting -> external python modules
+| python-protobuf                          | . -> Interpreter languages and scripting -> external python modules
+| python-serial                            | . -> Interpreter languages and scripting -> external python modules
+| python-setuptools                        | . -> Interpreter languages and scripting -> external python modules
+| python3                                  | . -> Interpreter languages and scripting
+| qextserialport                           | . -> Graphic libraries and applications (graphic/text)
+| Qt                                       | . -> Graphic libraries and applications (graphic/text)
+| qtuio                                    | . -> Graphic libraries and applications (graphic/text)
+| quagga                                   | . -> Networking applications
+| quota                                    | . -> System tools
+| qwt                                      | . -> Graphic libraries and applications (graphic/text)
+| radvd                                    | . -> Networking applications
+| ramspeed                                 | . -> Debugging, profiling and benchmark
+| randrproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| rdesktop                                 | . -> Graphic libraries and applications (graphic/text)
+| read-edid                                | . -> Hardware handling
+| readline                                 | . -> Libraries -> Text and terminal handling
+| recordproto                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| renderproto                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| resourceproto                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| rgb                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| rings                                    | . -> Interpreter languages and scripting -> LUA libraries/modules
+| rng-tools                                | . -> Hardware handling
+| roxml                                    | . -> Libraries -> JSON/XML
+| rp-pppoe                                 | . -> Networking applications
+| rpcbind                                  | . -> Networking applications
+| rpi-firmware                             | . -> Hardware handling -> Misc devices firmwares
+| rpi-userland                             | . -> Hardware handling
+| rpm                                      | . -> Package managers
+| rrdtool                                  | . -> Graphic libraries and applications (graphic/text)
+| rsh-redone                               | . -> Networking applications
+| rstart                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| rsync                                    | . -> Networking applications
+| rsyslog                                  | . -> System tools
+| rt-tests                                 | . -> Debugging, profiling and benchmark
+| rtai                                     | . -> Real-Time
+| rtorrent                                 | . -> Networking applications
+| rubix                                    | . -> Games
+| ruby                                     | . -> Interpreter languages and scripting
+| samba                                    | . -> Networking applications
+| sane-backends                            | . -> Hardware handling
+| SawMan (Window Manager)                  | . -> Graphic libraries and applications (graphic/text)
+| schifra                                  | . -> Libraries -> Other
+| sconeserver                              | . -> Networking applications
+| screen                                   | . -> Shell and utilities
+| scripts                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| scrnsaverproto                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| SDL                                      | . -> Graphic libraries and applications (graphic/text)
+| SDL_gfx                                  | . -> Graphic libraries and applications (graphic/text)
+| SDL_image                                | . -> Graphic libraries and applications (graphic/text)
+| SDL_mixer                                | . -> Graphic libraries and applications (graphic/text)
+| SDL_net                                  | . -> Graphic libraries and applications (graphic/text)
+| SDL_sound                                | . -> Graphic libraries and applications (graphic/text)
+| SDL_TTF                                  | . -> Graphic libraries and applications (graphic/text)
+| sdparm                                   | . -> Hardware handling
+| sed                                      | . -> Development tools
+| ser2net                                  | . -> Networking applications
+| sessreg                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| setserial                                | . -> Hardware handling
+| setxkbmap                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| sg3-utils                                | . -> Hardware handling
+| shared-mime-info                         | . -> Miscellaneous
+| shareware Doom WAD file                  | . -> Games
+| showfont                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| slang                                    | . -> Libraries -> Text and terminal handling
+| slirp                                    | . -> Libraries -> Networking
+| smartmontools                            | . -> Hardware handling
+| smproxy                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| snowball-hdmiservice                     | . -> Hardware handling
+| snowball-init                            | . -> Miscellaneous
+| socat                                    | . -> Networking applications
+| socketcand                               | . -> Networking applications
+| sound-theme-borealis                     | . -> Miscellaneous
+| sound-theme-freedesktop                  | . -> Miscellaneous
+| spawn-fcgi                               | . -> Networking applications
+| speex                                    | . -> Libraries -> Audio/Sound
+| spice protocol                           | . -> Networking applications
+| spice server                             | . -> Networking applications
+| sqlcipher                                | . -> Libraries -> Database
+| sqlite                                   | . -> Libraries -> Database
+| squashfs                                 | . -> Filesystem and flash utilities
+| squashfs3 *(deprecated)*                 | . -> Filesystem and flash utilities
+| squid                                    | . -> Networking applications
+| sredird                                  | . -> Hardware handling
+| sshfs (FUSE)                             | . -> Filesystem and flash utilities
+| sstrip                                   | . -> Development tools
+| startup-notification                     | . -> Libraries -> Other
+| statserial                               | . -> Hardware handling
+| strace                                   | . -> Debugging, profiling and benchmark
+| stress                                   | . -> Debugging, profiling and benchmark
+| stunnel                                  | . -> Networking applications
+| sudo                                     | . -> Shell and utilities
+| supervisor                               | . -> System tools
+| sylpheed                                 | . -> Graphic libraries and applications (graphic/text)
+| synergy                                  | . -> Graphic libraries and applications (graphic/text)
+| syslogd & klogd                          | . -> System tools
+| sysprof                                  | . -> Debugging, profiling and benchmark
+| sysstat                                  | . -> Hardware handling
+| systemd                                  | . -> System tools
+| sysvinit                                 | . -> System tools
+| taglib                                   | . -> Libraries -> Audio/Sound
+| tar                                      | . -> Development tools
+| tcl                                      | . -> Interpreter languages and scripting
+| tcllib                                   | . -> Interpreter languages and scripting -> tcl libraries/modules
+| tcpdump                                  | . -> Networking applications
+| tcpreplay                                | . -> Networking applications
+| tftpd                                    | . -> Networking applications
+| thttpd                                   | . -> Networking applications
+| ti-utils                                 | . -> Hardware handling
+| tidsp-binaries                           | . -> Audio and video applications
+| tiff                                     | . -> Libraries -> Graphics
+| time                                     | . -> Shell and utilities
+| tinyhttpd                                | . -> Networking applications
+| tn5250                                   | . -> Networking applications
+| torsmo                                   | . -> Graphic libraries and applications (graphic/text)
+| transmission                             | . -> Networking applications
+| tremor (fixed point vorbis decoder)      | . -> Libraries -> Audio/Sound
+| ttcp *(deprecated)*                      | . -> Networking applications
+| tvheadend                                | . -> Networking applications
+| twm                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| u-boot tools                             | . -> Hardware handling
+| udev                                     | . -> Hardware handling
+| udisks                                   | . -> Hardware handling
+| udpcast                                  | . -> Networking applications
+| uemacs                                   | . -> Text editors and viewers
+| ulogd                                    | . -> Networking applications
+| unionfs (FUSE)                           | . -> Filesystem and flash utilities
+| usb_modeswitch                           | . -> Hardware handling
+| usb_modeswitch_data                      | . -> Hardware handling
+| usbmount                                 | . -> Hardware handling
+| usbredir                                 | . -> Libraries -> Networking
+| usbutils                                 | . -> Hardware handling
+| ushare                                   | . -> Networking applications
+| util-linux                               | . -> System tools
+| util-macros                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Utilities
+| ux500-firmware                           | . -> Hardware handling -> Misc devices firmwares
+| vala                                     | . -> Development tools
+| valgrind                                 | . -> Debugging, profiling and benchmark
+| vde2                                     | . -> Networking applications
+| videoproto                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| viewres                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| vim                                      | . -> Text editors and viewers
+| vorbis-tools                             | . -> Audio and video applications
+| vpnc                                     | . -> Networking applications
+| vsftpd                                   | . -> Networking applications
+| vtun - BEWARE: read package/vtun/README.txt before use | . -> Networking applications
+| wavpack                                  | . -> Audio and video applications
+| webkit                                   | . -> Libraries -> Graphics
+| webrtc-audio-processing                  | . -> Libraries -> Audio/Sound
+| wget                                     | . -> Networking applications
+| whetstone                                | . -> Debugging, profiling and benchmark
+| which                                    | . -> Shell and utilities
+| windowswmproto                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| wipe                                     | . -> Hardware handling
+| wireless tools                           | . -> Networking applications
+| wpa_supplicant                           | . -> Networking applications
+| wsapi                                    | . -> Interpreter languages and scripting -> LUA libraries/modules
+| x11perf                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| x11vnc                                   | . -> Graphic libraries and applications (graphic/text)
+| xauth                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xavante                                  | . -> Interpreter languages and scripting -> LUA libraries/modules
+| xbacklight                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xbiff                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xbitmaps                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Other data
+| xcalc                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xcb-proto                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xcb-util                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| xcb-util-keysyms                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| xclipboard                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xclock                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xcmiscproto                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xcmsdb                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xcursorgen                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xdata_xcursor-themes                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Other data
+| xdbedizzy                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xditview                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xdm                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xdpyinfo                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xdriinfo                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xedit                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| Xenomai Userspace                        | . -> Real-Time
+| xerces-c++                               | . -> Libraries -> JSON/XML
+| xev                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xextproto                                | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xeyes                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xf86-input-evdev                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-joystick                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-keyboard                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-mouse                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-synaptics                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-tslib                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-vmmouse                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-input-void                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-ark                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-ast                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-ati                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-cirrus                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-dummy                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-fbdev                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-geode                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-glide                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-glint                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-i128                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-intel                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-mach64                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-mga                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-neomagic                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-newport                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-nv                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-openchrome                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-r128                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-savage                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-siliconmotion                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-sis                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-tdfx                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-tga                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-trident                       | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-v4l                           | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-vesa                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-vmware                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-voodoo                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86-video-wsfb                          | . -> Graphic libraries and applications (graphic/text) -> X11R7 Drivers
+| xf86bigfontproto                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xf86dga                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xf86dgaproto                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xf86driproto                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xf86rushproto                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xf86vidmodeproto                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xfd                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xfontsel                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xfs                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xfsinfo                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xfsprogs                                 | . -> Filesystem and flash utilities
+| xgamma                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xgc                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xhost                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xineramaproto                            | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xinetd                                   | . -> Networking applications
+| xinit                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xinput                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xinput-calibrator                        | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xkbcomp                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xkbevd                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xkbprint                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xkbutils                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xkeyboard-config                         | . -> Graphic libraries and applications (graphic/text) -> X11R7 Other data
+| xkill                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xl2tp                                    | . -> Networking applications
+| xload                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xlogo                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xlsatoms                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xlsclients                               | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xlsfonts                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xmag                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xman                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xmessage                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xmh                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xmlstarlet                               | . -> Shell and utilities
+| xmodmap                                  | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xmore                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xorg-server                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Servers
+| xplsprinters                             | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xpr                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xprehashprinterlist                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xprop                                    | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xproto                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 X protocols
+| xrandr                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xrdb                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xrefresh                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xset                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xsetmode                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xsetpointer                              | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xsetroot                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xsm                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xstdcmap                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xstroke *(deprecated)*                   | . -> Graphic libraries and applications (graphic/text)
+| xterm                                    | . -> Graphic libraries and applications (graphic/text)
+| xtrans                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Libraries
+| xvidtune                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xvinfo                                   | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xvkbd                                    | . -> Graphic libraries and applications (graphic/text)
+| xwd                                      | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xwininfo                                 | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xwud                                     | . -> Graphic libraries and applications (graphic/text) -> X11R7 Applications
+| xz-utils                                 | . -> Compressors and decompressors
+| yajl                                     | . -> Libraries -> JSON/XML
+| yasm                                     | . -> Development tools
+| yavta                                    | . -> Audio and video applications
+| zd1211-firmware                          | . -> Hardware handling -> Misc devices firmwares
+| zeromq                                   | . -> Libraries -> Networking
+| zlib                                     | . -> Libraries -> Compression and decompression
+| zxing                                    | . -> Libraries -> Graphics
+
+|===================================================
+
diff --git a/docs/manual/pkg-list.txt b/docs/manual/pkg-list.txt
deleted file mode 100644
index 5d9b54f..0000000
--- a/docs/manual/pkg-list.txt
+++ /dev/null
@@ -1,870 +0,0 @@
-* acl
-* acpid
-* alsa-lib
-* alsamixergui
-* alsa-utils
-* apr
-* apr-util
-* argp-standalone
-* argus
-* arptables
-* at
-* atk
-* attr
-* audiofile
-* aumix
-* autoconf
-* automake
-* avahi
-* axel
-* bash
-* beecrypt
-* bellagio
-* berkeleydb
-* bind
-* binutils
-* bison
-* blackbox
-* bluez_utils
-* bmon
-* boa
-* bonnie
-* boost
-* bootutils
-* bridge-utils
-* bsdiff
-* busybox
-* bwm-ng
-* bzip2
-* cairo
-* can-utils
-* ccache
-* ccid
-* cdrkit
-* cgilua
-* cifs-utils
-* cjson
-* cloop
-* cmake
-* collectd
-* connman
-* conntrack-tools
-* copas
-* coreutils
-* coxpcall
-* cpanminus
-* cpuload
-* cramfs
-* ctorrent
-* cups
-* cvs
-* dash
-* dbus
-* dbus-glib
-* dbus-python
-* devmem2
-* dhcp
-* dhcpdump
-* dhrystone
-* dialog
-* diffutils
-* directfb
-* directfb-examples
-* distcc
-* divine
-* dmalloc
-* dmidecode
-* dmraid
-* dnsmasq
-* docker
-* doom-wad
-* dosfstools
-* dropbear
-* dsp-tools
-* dstat
-* e2fsprogs
-* ebtables
-* ed
-* eeprog
-* empty
-* enchant
-* erlang
-* ethtool
-* evtest
-* expat
-* expedite
-* explorercanvas
-* ezxml
-* faad2
-* fbdump
-* fbgrab
-* fbset
-* fbterm
-* fb-test-app
-* fbv
-* fconfig
-* feh
-* ffmpeg
-* fftw
-* file
-* findutils
-* fis
-* flac
-* flashrom
-* flex
-* flot
-* fltk
-* fluxbox
-* fmtools
-* fontconfig
-* freerdp
-* freetype
-* fxload
-* gadgetfs-test
-* gamin
-* gawk
-* gdbm
-* gdisk
-* gdk-pixbuf
-* genext2fs
-* genromfs
-* gettext
-* giblib
-* glib-networking
-* gmp
-* gmpc
-* gnuchess
-* gnupg
-* gnutls
-* gob2
-* googlefontdirectory
-* gperf
-* gpsd
-* gqview
-* grantlee
-* grep
-* gsl
-* gst-dsp
-* gst-ffmpeg
-* gst-omapfb
-* gst-plugins-bad
-* gst-plugins-base
-* gst-plugins-good
-* gst-plugins-ugly
-* gstreamer
-* gtk2-engines
-* gtk2-theme-hicolor
-* gtkperf
-* gvfs
-* gzip
-* haserl
-* hdparm
-* heirloom-mailx
-* hiawatha
-* hostapd
-* htop
-* hwdata
-* i2c-tools
-* icu
-* ifplugd
-* igh-ethercat
-* imagemagick
-* imlib2
-* inadyn
-* inotify-tools
-* input-event-daemon
-* input-tools
-* intltool
-* iostat
-* iperf
-* ipkg
-* iproute2
-* ipsec-tools
-* ipset
-* iptables
-* irda-utils
-* iw
-* jpeg
-* jquery
-* jquery-sparkline
-* jquery-validation
-* jsmin
-* json-c
-* kbd
-* kexec
-* kismet
-* kmod
-* lame
-* latencytop
-* lcdapi
-* lcdproc
-* leafpad
-* less
-* libaio
-* libao
-* libarchive
-* libargtable2
-* libart
-* libatomic_ops
-* libcap
-* libcap-ng
-* libcdaudio
-* libcgi
-* libcgicc
-* libconfig
-* libconfuse
-* libcue
-* libcuefile
-* libcurl
-* libdaemon
-* libdmtx
-* libdnet
-* libdrm
-* libdvdnav
-* libdvdread
-* libecore
-* libedbus
-* libedje
-* libeet
-* libefreet
-* libeina
-* libelementary
-* libelf
-* libembryo
-* liberation
-* libesmtp
-* libethumb
-* libev
-* libevas
-* libevent
-* libexif
-* libeXosip2
-* libfcgi
-* libffi
-* libfreefare
-* libftdi
-* libfuse
-* libgail
-* libgcrypt
-* libgeotiff
-* libglade
-* libglib2
-* libgpg-error
-* libgtk2
-* libhid
-* libical
-* libiconv
-* libid3tag
-* libidn
-* libiqrf
-* liblo
-* liblockfile
-* liblog4c-localtime
-* libmad
-* libmbus
-* libmicrohttpd
-* libmms
-* libmnl
-* libmodbus
-* libmpd
-* libmpeg2
-* libnetfilter-acct
-* libnetfilter-conntrack
-* libnetfilter-cthelper
-* libnetfilter-cttimeout
-* libnetfilter-log
-* libnetfilter-queue
-* libnfc
-* libnfc-llcp
-* libnfnetlink
-* libnl
-* libnspr
-* libnss
-* liboauth
-* libogg
-* liboping
-* libosip2
-* libpcap
-* libplayer
-* libpng
-* libraw
-* libraw1394
-* libreplaygain
-* libroxml
-* librsvg
-* librsync
-* libsamplerate
-* libsexy
-* libsigc
-* libsndfile
-* libsoup
-* libsvgtiny
-* libsysfs
-* libtheora
-* libtirpc
-* libtool
-* libtorrent
-* libtpl
-* libungif
-* libupnp
-* liburcu
-* libusb
-* libusb-compat
-* libv4l
-* libvncserver
-* libvorbis
-* libxcb
-* libxml2
-* libxml-parser-perl
-* libxslt
-* libyaml
-* lighttpd
-* links
-* linphone
-* linux-firmware
-* linux-fusion
-* linux-pam
-* lite
-* live555
-* lmbench
-* lm-sensors
-* lockfile-progs
-* logrotate
-* logsurfer
-* lrzsz
-* lshw
-* lsof
-* lsuio
-* ltp-testsuite
-* ltrace
-* lttng-babeltrace
-* lttng-libust
-* lttng-modules
-* lttng-tools
-* lua
-* luacjson
-* luaexpat
-* luafilesystem
-* luajit
-* luasocket
-* lvm2
-* lzma
-* lzo
-* lzop
-* m4
-* macchanger
-* madplay
-* make
-* makedevs
-* matchbox-common
-* matchbox-desktop
-* matchbox-fakekey
-* matchbox-keyboard
-* matchbox-lib
-* matchbox-panel
-* matchbox-startup-monitor
-* matchbox-wm
-* mcookie
-* mdadm
-* mediastreamer
-* memstat
-* memtester
-* mesa3d
-* metacity
-* microperl
-* midori
-* mii-diag
-* minicom
-* mobile_broadband_provider_info
-* module-init-tools
-* monit
-* mpc
-* mpd
-* mpfr
-* mpg123
-* mplayer
-* mrouted
-* msmtp
-* mtd
-* mtdev
-* mtdev2tuio
-* musepack
-* mutt
-* mxml
-* mysql_client
-* nano
-* nanocom
-* nasm
-* nbd
-* ncftp
-* ncurses
-* ndisc6
-* neon
-* netatalk
-* netcat
-* netkitbase
-* netkittelnet
-* netperf
-* netplug
-* netsnmp
-* netstat-nat
-* network-manager
-* newt
-* nfacct
-* nfs-utils
-* ngircd
-* ngrep
-* noip
-* nss-mdns
-* ntfs-3g
-* ntp
-* nuttcp
-* ocf-linux
-* ofono
-* olsr
-* open2300
-* opencv
-* openntpd
-* openocd
-* openssh
-* openssl
-* openswan
-* openvpn
-* opkg
-* oprofile
-* opus
-* opus-tools
-* orc
-* ortp
-* owl-linux
-* pango
-* parted
-* patch
-* pciutils
-* pcmanfm
-* pcre
-* pcsc-lite
-* perl
-* php
-* picocom
-* pixman
-* pkgconf
-* pkg-config
-* poco
-* polarssl
-* popt
-* portaudio
-* portmap
-* pppd
-* pptp-linux
-* prboom
-* procps
-* proftpd
-* protobuf
-* psmisc
-* pthread-stubs
-* pulseaudio
-* pv
-* python
-* python3
-* python-dpkt
-* python-id3
-* python-mad
-* python-meld3
-* python-netifaces
-* python-nfc
-* python-protobuf
-* python-pygame
-* python-serial
-* python-setuptools
-* qextserialport
-* qt
-* qtuio
-* quagga
-* quota
-* radvd
-* ramspeed
-* rdesktop
-* read-edid
-* readline
-* rings
-* rng-tools
-* rpcbind
-* rpm
-* rp-pppoe
-* rrdtool
-* rsh-redone
-* rsync
-* rsyslog
-* rtai
-* rtorrent
-* rt-tests
-* rubix
-* ruby
-* samba
-* sane-backends
-* sawman
-* schifra
-* sconeserver
-* screen
-* sdl
-* sdl_gfx
-* sdl_image
-* sdl_mixer
-* sdl_net
-* sdl_sound
-* sdl_ttf
-* sdparm
-* sed
-* ser2net
-* setserial
-* shared-mime-info
-* slang
-* smartmontools
-* socat
-* socketcand
-* sound-theme-borealis
-* sound-theme-freedesktop
-* spawn-fcgi
-* speex
-* sqlcipher
-* sqlite
-* squashfs
-* squashfs3
-* squid
-* sredird
-* sshfs
-* sstrip
-* startup-notification
-* statserial
-* strace
-* stress
-* stunnel
-* sudo
-* supervisor
-* sylpheed
-* synergy
-* sysklogd
-* sysprof
-* sysstat
-* systemd
-* sysvinit
-* taglib
-* tar
-* tcl
-* tcpdump
-* tcpreplay
-* tftpd
-* thttpd
-* tidsp-binaries
-* tiff
-* time
-* tinyhttpd
-* ti-utils
-* tn5250
-* torsmo
-* transmission
-* tremor
-* tslib
-* ttcp
-* uboot-tools
-* udev
-* udpcast
-* uemacs
-* ulogd
-* unionfs
-* usb_modeswitch
-* usb_modeswitch_data
-* usbmount
-* usbutils
-* ushare
-* util-linux
-* vala
-* valgrind
-* vim
-* vorbis-tools
-* vpnc
-* vsftpd
-* vtun
-* wavpack
-* webkit
-* webrtc-audio-processing
-* wget
-* whetstone
-* which
-* wipe
-* wireless_tools
-* wpa_supplicant
-* wsapi
-* x11vnc
-* xapp_appres
-* xapp_bdftopcf
-* xapp_beforelight
-* xapp_bitmap
-* xapp_editres
-* xapp_fonttosfnt
-* xapp_fslsfonts
-* xapp_fstobdf
-* xapp_iceauth
-* xapp_ico
-* xapp_listres
-* xapp_luit
-* xapp_mkfontdir
-* xapp_mkfontscale
-* xapp_oclock
-* xapp_rgb
-* xapp_rstart
-* xapp_scripts
-* xapp_sessreg
-* xapp_setxkbmap
-* xapp_showfont
-* xapp_smproxy
-* xapp_twm
-* xapp_viewres
-* xapp_x11perf
-* xapp_xauth
-* xapp_xbacklight
-* xapp_xbiff
-* xapp_xcalc
-* xapp_xclipboard
-* xapp_xclock
-* xapp_xcmsdb
-* xapp_xcursorgen
-* xapp_xdbedizzy
-* xapp_xditview
-* xapp_xdm
-* xapp_xdpyinfo
-* xapp_xdriinfo
-* xapp_xedit
-* xapp_xev
-* xapp_xeyes
-* xapp_xf86dga
-* xapp_xfd
-* xapp_xfontsel
-* xapp_xfs
-* xapp_xfsinfo
-* xapp_xgamma
-* xapp_xgc
-* xapp_xhost
-* xapp_xinit
-* xapp_xinput
-* xapp_xinput-calibrator
-* xapp_xkbcomp
-* xapp_xkbevd
-* xapp_xkbprint
-* xapp_xkbutils
-* xapp_xkill
-* xapp_xload
-* xapp_xlogo
-* xapp_xlsatoms
-* xapp_xlsclients
-* xapp_xlsfonts
-* xapp_xmag
-* xapp_xman
-* xapp_xmessage
-* xapp_xmh
-* xapp_xmodmap
-* xapp_xmore
-* xapp_xplsprinters
-* xapp_xpr
-* xapp_xprehashprinterlist
-* xapp_xprop
-* xapp_xrandr
-* xapp_xrdb
-* xapp_xrefresh
-* xapp_xset
-* xapp_xsetmode
-* xapp_xsetpointer
-* xapp_xsetroot
-* xapp_xsm
-* xapp_xstdcmap
-* xapp_xvidtune
-* xapp_xvinfo
-* xapp_xwd
-* xapp_xwininfo
-* xapp_xwud
-* xavante
-* xcb-proto
-* xcb-util
-* xdata_xbitmaps
-* xdata_xcursor-themes
-* xdriver_xf86-input-acecad
-* xdriver_xf86-input-aiptek
-* xdriver_xf86-input-evdev
-* xdriver_xf86-input-joystick
-* xdriver_xf86-input-keyboard
-* xdriver_xf86-input-mouse
-* xdriver_xf86-input-synaptics
-* xdriver_xf86-input-tslib
-* xdriver_xf86-input-vmmouse
-* xdriver_xf86-input-void
-* xdriver_xf86-video-apm
-* xdriver_xf86-video-ark
-* xdriver_xf86-video-ast
-* xdriver_xf86-video-ati
-* xdriver_xf86-video-chips
-* xdriver_xf86-video-cirrus
-* xdriver_xf86-video-dummy
-* xdriver_xf86-video-fbdev
-* xdriver_xf86-video-geode
-* xdriver_xf86-video-glide
-* xdriver_xf86-video-glint
-* xdriver_xf86-video-i128
-* xdriver_xf86-video-i740
-* xdriver_xf86-video-intel
-* xdriver_xf86-video-mach64
-* xdriver_xf86-video-mga
-* xdriver_xf86-video-neomagic
-* xdriver_xf86-video-newport
-* xdriver_xf86-video-nv
-* xdriver_xf86-video-openchrome
-* xdriver_xf86-video-r128
-* xdriver_xf86-video-rendition
-* xdriver_xf86-video-s3
-* xdriver_xf86-video-s3virge
-* xdriver_xf86-video-savage
-* xdriver_xf86-video-siliconmotion
-* xdriver_xf86-video-sis
-* xdriver_xf86-video-sisusb
-* xdriver_xf86-video-suncg14
-* xdriver_xf86-video-suncg3
-* xdriver_xf86-video-suncg6
-* xdriver_xf86-video-sunffb
-* xdriver_xf86-video-sunleo
-* xdriver_xf86-video-suntcx
-* xdriver_xf86-video-tdfx
-* xdriver_xf86-video-tga
-* xdriver_xf86-video-trident
-* xdriver_xf86-video-tseng
-* xdriver_xf86-video-v4l
-* xdriver_xf86-video-vesa
-* xdriver_xf86-video-vmware
-* xdriver_xf86-video-voodoo
-* xdriver_xf86-video-wsfb
-* xdriver_xf86-video-xgi
-* xdriver_xf86-video-xgixp
-* xenomai
-* xerces
-* xfont_encodings
-* xfont_font-adobe-100dpi
-* xfont_font-adobe-75dpi
-* xfont_font-adobe-utopia-100dpi
-* xfont_font-adobe-utopia-75dpi
-* xfont_font-adobe-utopia-type1
-* xfont_font-alias
-* xfont_font-arabic-misc
-* xfont_font-bh-100dpi
-* xfont_font-bh-75dpi
-* xfont_font-bh-lucidatypewriter-100dpi
-* xfont_font-bh-lucidatypewriter-75dpi
-* xfont_font-bh-ttf
-* xfont_font-bh-type1
-* xfont_font-bitstream-100dpi
-* xfont_font-bitstream-75dpi
-* xfont_font-bitstream-speedo
-* xfont_font-bitstream-type1
-* xfont_font-cronyx-cyrillic
-* xfont_font-cursor-misc
-* xfont_font-daewoo-misc
-* xfont_font-dec-misc
-* xfont_font-ibm-type1
-* xfont_font-isas-misc
-* xfont_font-jis-misc
-* xfont_font-micro-misc
-* xfont_font-misc-cyrillic
-* xfont_font-misc-ethiopic
-* xfont_font-misc-meltho
-* xfont_font-misc-misc
-* xfont_font-mutt-misc
-* xfont_font-schumacher-misc
-* xfont_font-screen-cyrillic
-* xfont_font-sony-misc
-* xfont_font-sun-misc
-* xfont_font-util
-* xfont_font-winitzki-cyrillic
-* xfont_font-xfree86-type1
-* xfsprogs
-* xinetd
-* xkeyboard-config
-* xl2tp
-* xlib_libdmx
-* xlib_libfontenc
-* xlib_libFS
-* xlib_libICE
-* xlib_liboldX
-* xlib_libpciaccess
-* xlib_libSM
-* xlib_libX11
-* xlib_libXau
-* xlib_libXaw
-* xlib_libXcomposite
-* xlib_libXcursor
-* xlib_libXdamage
-* xlib_libXdmcp
-* xlib_libXext
-* xlib_libXfixes
-* xlib_libXfont
-* xlib_libXfontcache
-* xlib_libXft
-* xlib_libXi
-* xlib_libXinerama
-* xlib_libxkbfile
-* xlib_libxkbui
-* xlib_libXmu
-* xlib_libXp
-* xlib_libXpm
-* xlib_libXprintAppUtil
-* xlib_libXprintUtil
-* xlib_libXrandr
-* xlib_libXrender
-* xlib_libXres
-* xlib_libXScrnSaver
-* xlib_libXt
-* xlib_libXtst
-* xlib_libXv
-* xlib_libXvMC
-* xlib_libXxf86dga
-* xlib_libXxf86vm
-* xlib_xtrans
-* xmlstarlet
-* xproto_applewmproto
-* xproto_bigreqsproto
-* xproto_compositeproto
-* xproto_damageproto
-* xproto_dmxproto
-* xproto_dri2proto
-* xproto_fixesproto
-* xproto_fontcacheproto
-* xproto_fontsproto
-* xproto_glproto
-* xproto_inputproto
-* xproto_kbproto
-* xproto_printproto
-* xproto_randrproto
-* xproto_recordproto
-* xproto_renderproto
-* xproto_resourceproto
-* xproto_scrnsaverproto
-* xproto_videoproto
-* xproto_windowswmproto
-* xproto_xcmiscproto
-* xproto_xextproto
-* xproto_xf86bigfontproto
-* xproto_xf86dgaproto
-* xproto_xf86driproto
-* xproto_xf86rushproto
-* xproto_xf86vidmodeproto
-* xproto_xineramaproto
-* xproto_xproto
-* xserver_xorg-server
-* xstroke
-* xterm
-* xutil_makedepend
-* xutil_util-macros
-* xvkbd
-* xz
-* yajl
-* yasm
-* zeromq
-* zlib
-* zxing
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files
  2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
                   ` (9 preceding siblings ...)
  2013-02-25 21:31 ` [Buildroot] [PATCH 10/11] manual: update generated lists Samuel Martin
@ 2013-02-25 21:31 ` Samuel Martin
  2013-02-28 21:39   ` Peter Korsgaard
  10 siblings, 1 reply; 23+ messages in thread
From: Samuel Martin @ 2013-02-25 21:31 UTC (permalink / raw)
  To: buildroot

From: Stephan Hoffmann <sho@relinux.de>

Signed-off-by: Stephan Hoffmann <sho@relinux.de>
Acked-by: Samuel Martin <s.martin49@gmail.com>

---
[Samuel: fix typo in commit message]
---
 docs/manual/adding-packages-autotools.txt | 33 ++++++------
 docs/manual/adding-packages-cmake.txt     | 33 ++++++------
 docs/manual/adding-packages-generic.txt   | 83 ++++++++++++++++---------------
 3 files changed, 76 insertions(+), 73 deletions(-)

diff --git a/docs/manual/adding-packages-autotools.txt b/docs/manual/adding-packages-autotools.txt
index 5a0d27f..1d5f30b 100644
--- a/docs/manual/adding-packages-autotools.txt
+++ b/docs/manual/adding-packages-autotools.txt
@@ -18,24 +18,25 @@ package, with an example :
 03: # libfoo
 04: #
 05: #############################################################
-06: LIBFOO_VERSION = 1.0
-07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
-08: LIBFOO_SITE = http://www.foosoftware.org/download
-09: LIBFOO_INSTALL_STAGING = YES
-10: LIBFOO_INSTALL_TARGET = NO
-11: LIBFOO_CONF_OPT = --disable-shared
-12: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
-13:
-14: $(eval $(autotools-package))
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_INSTALL_STAGING = YES
+11: LIBFOO_INSTALL_TARGET = NO
+12: LIBFOO_CONF_OPT = --disable-shared
+13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
+14:
+15: $(eval $(autotools-package))
 ------------------------
 
-On line 6, we declare the version of the package.
+On line 7, we declare the version of the package.
 
-On line 7 and 8, we declare the name of the tarball and the location
+On line 8 and 9, we declare the name of the tarball and the location
 of the tarball on the Web. Buildroot will automatically download the
 tarball from this location.
 
-On line 9, we tell Buildroot to install the package to the staging
+On line 10, we tell Buildroot to install the package to the staging
 directory. The staging directory, located in +output/staging/+
 is the directory where all the packages are installed, including their
 development files, etc. By default, packages are not installed to the
@@ -45,7 +46,7 @@ other libraries or applications depending on them. Also by default, when
 staging installation is enabled, packages are installed in this location
 using the +make install+ command.
 
-On line 10, we tell Buildroot to not install the package to the
+On line 11, we tell Buildroot to not install the package to the
 target directory. This directory contains what will become the root
 filesystem running on the target. For purely static libraries, it is
 not necessary to install them in the target directory because they will
@@ -53,14 +54,14 @@ not be used at runtime. By default, target installation is enabled; setting
 this variable to NO is almost never needed. Also by default, packages are
 installed in this location using the +make install+ command.
 
-On line 11, we tell Buildroot to pass a custom configure option, that
+On line 12, we tell Buildroot to pass a custom configure option, that
 will be passed to the +./configure+ script before configuring
 and building the package.
 
-On line 12, we declare our dependencies, so that they are built
+On line 13, we declare our dependencies, so that they are built
 before the build process of our package starts.
 
-Finally, on line line 14, we invoke the +autotools-package+
+Finally, on line line 15, we invoke the +autotools-package+
 macro that generates all the Makefile rules that actually allows the
 package to be built.
 
diff --git a/docs/manual/adding-packages-cmake.txt b/docs/manual/adding-packages-cmake.txt
index 44c38e9..6ac073c 100644
--- a/docs/manual/adding-packages-cmake.txt
+++ b/docs/manual/adding-packages-cmake.txt
@@ -18,24 +18,25 @@ with an example :
 03: # libfoo
 04: #
 05: #############################################################
-06: LIBFOO_VERSION = 1.0
-07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
-08: LIBFOO_SITE = http://www.foosoftware.org/download
-09: LIBFOO_INSTALL_STAGING = YES
-10: LIBFOO_INSTALL_TARGET = NO
-11: LIBFOO_CONF_OPT = -DBUILD_DEMOS=ON
-12: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
-13:
-14: $(eval $(cmake-package))
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_INSTALL_STAGING = YES
+11: LIBFOO_INSTALL_TARGET = NO
+12: LIBFOO_CONF_OPT = -DBUILD_DEMOS=ON
+13: LIBFOO_DEPENDENCIES = libglib2 host-pkgconf
+14:
+15: $(eval $(cmake-package))
 ------------------------
 
-On line 6, we declare the version of the package.
+On line 7, we declare the version of the package.
 
-On line 7 and 8, we declare the name of the tarball and the location
+On line 8 and 9, we declare the name of the tarball and the location
 of the tarball on the Web. Buildroot will automatically download the
 tarball from this location.
 
-On line 9, we tell Buildroot to install the package to the staging
+On line 10, we tell Buildroot to install the package to the staging
 directory. The staging directory, located in +output/staging/+
 is the directory where all the packages are installed, including their
 development files, etc. By default, packages are not installed to the
@@ -45,7 +46,7 @@ other libraries or applications depending on them. Also by default, when
 staging installation is enabled, packages are installed in this location
 using the +make install+ command.
 
-On line 10, we tell Buildroot to not install the package to the
+On line 11, we tell Buildroot to not install the package to the
 target directory. This directory contains what will become the root
 filesystem running on the target. For purely static libraries, it is
 not necessary to install them in the target directory because they will
@@ -53,13 +54,13 @@ not be used at runtime. By default, target installation is enabled; setting
 this variable to NO is almost never needed. Also by default, packages are
 installed in this location using the +make install+ command.
 
-On line 11, we tell Buildroot to pass custom options to CMake when it is
+On line 12, we tell Buildroot to pass custom options to CMake when it is
 configuring the package.
 
-On line 12, we declare our dependencies, so that they are built
+On line 13, we declare our dependencies, so that they are built
 before the build process of our package starts.
 
-Finally, on line line 14, we invoke the +cmake-package+
+Finally, on line line 15, we invoke the +cmake-package+
 macro that generates all the Makefile rules that actually allows the
 package to be built.
 
diff --git a/docs/manual/adding-packages-generic.txt b/docs/manual/adding-packages-generic.txt
index 74d379b..a615ae2 100644
--- a/docs/manual/adding-packages-generic.txt
+++ b/docs/manual/adding-packages-generic.txt
@@ -20,42 +20,43 @@ system is based on hand-written Makefiles or shell scripts.
 03: # libfoo
 04: #
 05: #############################################################
-06: LIBFOO_VERSION = 1.0
-07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
-08: LIBFOO_SITE = http://www.foosoftware.org/download
-09: LIBFOO_LICENSE = GPLv3+
-10: LIBFOO_LICENSE_FILES = COPYING
-11: LIBFOO_INSTALL_STAGING = YES
-12: LIBFOO_CONFIG_SCRIPTS = libfoo-config
-13: LIBFOO_DEPENDENCIES = host-libaaa libbbb
-14:
-15: define LIBFOO_BUILD_CMDS
-16:	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
-17: endef
-18:
-19: define LIBFOO_INSTALL_STAGING_CMDS
-20:	$(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a
-21:	$(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
-22:	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib
-23: endef
-24:
-25: define LIBFOO_INSTALL_TARGET_CMDS
-26:	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib
-27:	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
-28: endef
-29:
-30: define LIBFOO_DEVICES
-31:	/dev/foo  c  666  0  0	42  0  -  -  -
-32: endef
-33:
-34: define LIBFOO_PERMISSIONS
-35:	/bin/foo  f  4755  0  0	 -  -  -  -  -
-36: endef
-37:
-38: $(eval $(generic-package))
+06:
+07: LIBFOO_VERSION = 1.0
+08: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
+09: LIBFOO_SITE = http://www.foosoftware.org/download
+10: LIBFOO_LICENSE = GPLv3+
+11: LIBFOO_LICENSE_FILES = COPYING
+12: LIBFOO_INSTALL_STAGING = YES
+13: LIBFOO_CONFIG_SCRIPTS = libfoo-config
+14: LIBFOO_DEPENDENCIES = host-libaaa libbbb
+15:
+16: define LIBFOO_BUILD_CMDS
+17:	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) all
+18: endef
+19:
+20: define LIBFOO_INSTALL_STAGING_CMDS
+21:	$(INSTALL) -D -m 0755 $(@D)/libfoo.a $(STAGING_DIR)/usr/lib/libfoo.a
+22:	$(INSTALL) -D -m 0644 $(@D)/foo.h $(STAGING_DIR)/usr/include/foo.h
+23:	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(STAGING_DIR)/usr/lib
+24: endef
+25:
+26: define LIBFOO_INSTALL_TARGET_CMDS
+27:	$(INSTALL) -D -m 0755 $(@D)/libfoo.so* $(TARGET_DIR)/usr/lib
+28:	$(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/foo.d
+29: endef
+30:
+31: define LIBFOO_DEVICES
+32:	/dev/foo  c  666  0  0	42  0  -  -  -
+33: endef
+34:
+35: define LIBFOO_PERMISSIONS
+36:	/bin/foo  f  4755  0  0	 -  -  -  -  -
+37: endef
+38:
+39: $(eval $(generic-package))
 --------------------------------
 
-The Makefile begins on line 6 to 10 with metadata information: the
+The Makefile begins on line 7 to 11 with metadata information: the
 version of the package (+LIBFOO_VERSION+), the name of the
 tarball containing the package (+LIBFOO_SOURCE+) the
 Internet location at which the tarball can be downloaded from
@@ -65,13 +66,13 @@ the same prefix, +LIBFOO_+ in this case. This prefix is always the
 uppercased version of the package name (see below to understand where
 the package name is defined).
 
-On line 11, we specify that this package wants to install something to
+On line 12, we specify that this package wants to install something to
 the staging space. This is often needed for libraries, since they must
 install header files and other development files in the staging space.
 This will ensure that the commands listed in the
 +LIBFOO_INSTALL_STAGING_CMDS+ variable will be executed.
 
-On line 12, we specify that there is some fixing to be done to some
+On line 13, we specify that there is some fixing to be done to some
 of the 'libfoo-config' files that were installed during
 +LIBFOO_INSTALL_STAGING_CMDS+ phase.
 These *-config files are executable shell script files that are
@@ -113,14 +114,14 @@ IMAGEMAGICK_CONFIG_SCRIPTS = \
    Magick-config Magick++-config \
    MagickCore-config MagickWand-config Wand-config
 
-On line 13, we specify the list of dependencies this package relies
+On line 14, we specify the list of dependencies this package relies
 on. These dependencies are listed in terms of lower-case package names,
 which can be packages for the target (without the +host-+
 prefix) or packages for the host (with the +host-+) prefix).
 Buildroot will ensure that all these packages are built and installed
 'before' the current package starts its configuration.
 
-The rest of the Makefile, lines 14..27, defines what should be done
+The rest of the Makefile, lines 16..29, defines what should be done
 at the different steps of the package configuration, compilation and
 installation.
 +LIBFOO_BUILD_CMDS+ tells what steps should be performed to
@@ -133,13 +134,13 @@ All these steps rely on the +$(@D)+ variable, which
 contains the directory where the source code of the package has been
 extracted.
 
-On line 29..31, we define a device-node file used by this package
+On line 31..33, we define a device-node file used by this package
 (+LIBFOO_DEVICES+).
 
-On line 33..35, we define the permissions to set to specific files
+On line 35..37, we define the permissions to set to specific files
 installed by this package (+LIBFOO_PERMISSIONS+).
 
-Finally, on line 37, we call the +generic-package+ function, which
+Finally, on line 39, we call the +generic-package+ function, which
 generates, according to the variables defined previously, all the
 Makefile code necessary to make your package working.
 
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt
  2013-02-25 21:31 ` [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt Samuel Martin
@ 2013-02-26  8:29   ` Thomas Petazzoni
  2013-02-26  9:44     ` Samuel Martin
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2013-02-26  8:29 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Mon, 25 Feb 2013 22:31:22 +0100, Samuel Martin wrote:

> +- If a patch does some package version fixes, this should be documented in the
> +commit message of the patch itself (or the message prepended to the 'diff'
> +itself).

I am not sure to understand this part.

> +* Otherwise, patch files matching +<packagename>-<description>.patch+
> +  are applied following the +ls+ command order.

Shouldn't we be enforcing a <packagename>-<number>-<description>.patch
policy, in order to ensure that patches are applied in the right order?

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes
  2013-02-25 21:31 ` [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes Samuel Martin
@ 2013-02-26  8:30   ` Thomas Petazzoni
  2013-02-28 21:39   ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Thomas Petazzoni @ 2013-02-26  8:30 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Mon, 25 Feb 2013 22:31:23 +0100, Samuel Martin wrote:
> * update post-build scripts mechanism that now support several scripts
> * fix formatting
> 
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt
  2013-02-26  8:29   ` Thomas Petazzoni
@ 2013-02-26  9:44     ` Samuel Martin
  2013-02-26 11:01       ` Thomas Petazzoni
  0 siblings, 1 reply; 23+ messages in thread
From: Samuel Martin @ 2013-02-26  9:44 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

2013/2/26 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Samuel Martin,
>
> On Mon, 25 Feb 2013 22:31:22 +0100, Samuel Martin wrote:
>
>> +- If a patch does some package version fixes, this should be documented in the
>> +commit message of the patch itself (or the message prepended to the 'diff'
>> +itself).
>
> I am not sure to understand this part.
I don't know how to explain this clearly.

My point is, for some packages, BR does not provide the latest version,
but some fix may be available upstream, so they have been backported in BR
(e.g.: package/libglib2/libglib2-make-codegen-python2-python3-compliant.patch).

Any suggestion to explain this point in a better way is welcome.

>
>> +* Otherwise, patch files matching +<packagename>-<description>.patch+
>> +  are applied following the +ls+ command order.
>
> Shouldn't we be enforcing a <packagename>-<number>-<description>.patch
> policy, in order to ensure that patches are applied in the right order?
Well, here I stick to the current apply-patches.sh implementation.

Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt
  2013-02-26  9:44     ` Samuel Martin
@ 2013-02-26 11:01       ` Thomas Petazzoni
  2013-02-26 11:15         ` Samuel Martin
  0 siblings, 1 reply; 23+ messages in thread
From: Thomas Petazzoni @ 2013-02-26 11:01 UTC (permalink / raw)
  To: buildroot

Dear Samuel Martin,

On Tue, 26 Feb 2013 10:44:39 +0100, Samuel Martin wrote:

> >> +- If a patch does some package version fixes, this should be documented in the
> >> +commit message of the patch itself (or the message prepended to the 'diff'
> >> +itself).
> >
> > I am not sure to understand this part.
> I don't know how to explain this clearly.
> 
> My point is, for some packages, BR does not provide the latest version,
> but some fix may be available upstream, so they have been backported in BR
> (e.g.: package/libglib2/libglib2-make-codegen-python2-python3-compliant.patch).
> 
> Any suggestion to explain this point in a better way is welcome.

I don't understand why you would want to put this here in the
documentation. What you're saying is just a detail on what the patch
could possibly contain (i.e a backport from upstream versus a
Buildroot-specific hack for cross-compilation), I don't see what it
changes in terms of patch policy.

> >> +* Otherwise, patch files matching +<packagename>-<description>.patch+
> >> +  are applied following the +ls+ command order.
> >
> > Shouldn't we be enforcing a <packagename>-<number>-<description>.patch
> > policy, in order to ensure that patches are applied in the right order?
> Well, here I stick to the current apply-patches.sh implementation.

The current apply-patches.sh implementation takes the patches in
alphabetical order, which is why it is important to have the patches
numbered to make sure that the patches are applied in a well-known
order, and not an order based on the <description> field alphabetical
sorting.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt
  2013-02-26 11:01       ` Thomas Petazzoni
@ 2013-02-26 11:15         ` Samuel Martin
  0 siblings, 0 replies; 23+ messages in thread
From: Samuel Martin @ 2013-02-26 11:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

2013/2/26 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>:
> Dear Samuel Martin,
>
> On Tue, 26 Feb 2013 10:44:39 +0100, Samuel Martin wrote:
>
>> >> +- If a patch does some package version fixes, this should be documented in the
>> >> +commit message of the patch itself (or the message prepended to the 'diff'
>> >> +itself).
>> >
>> > I am not sure to understand this part.
>> I don't know how to explain this clearly.
>>
>> My point is, for some packages, BR does not provide the latest version,
>> but some fix may be available upstream, so they have been backported in BR
>> (e.g.: package/libglib2/libglib2-make-codegen-python2-python3-compliant.patch).
>>
>> Any suggestion to explain this point in a better way is welcome.
>
> I don't understand why you would want to put this here in the
> documentation. What you're saying is just a detail on what the patch
> could possibly contain (i.e a backport from upstream versus a
> Buildroot-specific hack for cross-compilation), I don't see what it
> changes in terms of patch policy.
Fair enough, I'll drop this point.


>
>> >> +* Otherwise, patch files matching +<packagename>-<description>.patch+
>> >> +  are applied following the +ls+ command order.
>> >
>> > Shouldn't we be enforcing a <packagename>-<number>-<description>.patch
>> > policy, in order to ensure that patches are applied in the right order?
>> Well, here I stick to the current apply-patches.sh implementation.
>
> The current apply-patches.sh implementation takes the patches in
> alphabetical order, which is why it is important to have the patches
> numbered to make sure that the patches are applied in a well-known
> order, and not an order based on the <description> field alphabetical
> sorting.

Well, explicit numbering is better than implicit, so should be the doc.
I'll fix it and re-spin this patch.

Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 04/11] working-with: board support
  2013-02-25 21:31 ` [Buildroot] [PATCH 04/11] working-with: board support Samuel Martin
@ 2013-02-26 17:45   ` Arnout Vandecappelle
  2013-02-28 21:39   ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2013-02-26 17:45 UTC (permalink / raw)
  To: buildroot

On 25/02/13 22:31, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
> ---
> Changes since v1:
> * simplify cross-ref (Arnout)
> ---
>   docs/manual/working-with.txt | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/docs/manual/working-with.txt b/docs/manual/working-with.txt
> index a57169c..4432b54 100644
> --- a/docs/manual/working-with.txt
> +++ b/docs/manual/working-with.txt
> @@ -25,5 +25,5 @@ interested in hacking it to add:
>
>   * new packages: refer to the xref:adding-packages[Developer guide]
>
> -* new board support: refer to the xref:customize-store[], more specifically
> -  xref:customize-store-board-support[].
> +* new board support: refer to the
> +  xref:customize-store-board-support[Developer guide].
>

  Could you merge this with patch 1/11 (adding your own SoB of course)?

  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 05/11] support: add kconfiglib python module
  2013-02-25 21:31 ` [Buildroot] [PATCH 05/11] support: add kconfiglib python module Samuel Martin
@ 2013-02-26 20:18   ` Arnout Vandecappelle
  0 siblings, 0 replies; 23+ messages in thread
From: Arnout Vandecappelle @ 2013-02-26 20:18 UTC (permalink / raw)
  To: buildroot

On 25/02/13 22:31, Samuel Martin wrote:
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>   support/pym/kconfiglib.py | 3772 +++++++++++++++++++++++++++++++++++++++++++++
>   support/pym/readme        |   14 +
>   2 files changed, 3786 insertions(+)
>   create mode 100644 support/pym/kconfiglib.py
>   create mode 100644 support/pym/readme
>
> diff --git a/support/pym/kconfiglib.py b/support/pym/kconfiglib.py
> new file mode 100644

  If you would put it in the same location as the gen-manual-lists.py 
script, then you don't need to mess with PYTHONPATH (the module's 
directory is always in PYTHONPATH).

[snip]

> diff --git a/support/pym/readme b/support/pym/readme
> new file mode 100644

  Obviously, if it moves from pym to scripts, it should be called 
README.kconfiglib or something similar.

> index 0000000..f44609c
> --- /dev/null
> +++ b/support/pym/readme
> @@ -0,0 +1,14 @@
> +Readme
> +======
> +
> +Kconfiglib
> +----------
> +
> +This is a python module fetched from:
> +
> +https://github.com/ulfalizer/Kconfiglib
> +commit: 417d62d1bf5fbfc7271c9d9b8dc2661b6332e288
> +
> +This module is not released under any explicit license, but it is a fair
> +asumption kconfiglib is released under the same license as the linux kernel,
> +i.e. GPLv2.

  Unfortunately, that's not a fair assumption... Perhaps we should mail 
the guy to verify.

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 01/11] manual: fix cross-refs
  2013-02-25 21:31 ` [Buildroot] [PATCH 01/11] manual: fix cross-refs Samuel Martin
@ 2013-02-28 21:38   ` Peter Korsgaard
  0 siblings, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2013-02-28 21:38 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes
  2013-02-25 21:31 ` [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes Samuel Martin
  2013-02-26  8:30   ` Thomas Petazzoni
@ 2013-02-28 21:39   ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2013-02-28 21:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> * update post-build scripts mechanism that now support several scripts
 Samuel> * fix formatting

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 04/11] working-with: board support
  2013-02-25 21:31 ` [Buildroot] [PATCH 04/11] working-with: board support Samuel Martin
  2013-02-26 17:45   ` Arnout Vandecappelle
@ 2013-02-28 21:39   ` Peter Korsgaard
  1 sibling, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2013-02-28 21:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files
  2013-02-25 21:31 ` [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files Samuel Martin
@ 2013-02-28 21:39   ` Peter Korsgaard
  0 siblings, 0 replies; 23+ messages in thread
From: Peter Korsgaard @ 2013-02-28 21:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:

 Samuel> From: Stephan Hoffmann <sho@relinux.de>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2013-02-28 21:39 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-25 21:31 [Buildroot] [pull request v2] Pull request for branch for-master/doc Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 01/11] manual: fix cross-refs Samuel Martin
2013-02-28 21:38   ` Peter Korsgaard
2013-02-25 21:31 ` [Buildroot] [PATCH 02/11] manual: minor fix in patch-policy.txt Samuel Martin
2013-02-26  8:29   ` Thomas Petazzoni
2013-02-26  9:44     ` Samuel Martin
2013-02-26 11:01       ` Thomas Petazzoni
2013-02-26 11:15         ` Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 03/11] manual: misc. post-{build, image} scripts fixes Samuel Martin
2013-02-26  8:30   ` Thomas Petazzoni
2013-02-28 21:39   ` Peter Korsgaard
2013-02-25 21:31 ` [Buildroot] [PATCH 04/11] working-with: board support Samuel Martin
2013-02-26 17:45   ` Arnout Vandecappelle
2013-02-28 21:39   ` Peter Korsgaard
2013-02-25 21:31 ` [Buildroot] [PATCH 05/11] support: add kconfiglib python module Samuel Martin
2013-02-26 20:18   ` Arnout Vandecappelle
2013-02-25 21:31 ` [Buildroot] [PATCH 06/11] support/scripts: add gen-manual-lists.py Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 07/11] manual: add a make target 'manual-update-lists' Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 08/11] manual: cleanup appendix.txt Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 09/11] Makefile: add to the release target a warning about the manual updates Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 10/11] manual: update generated lists Samuel Martin
2013-02-25 21:31 ` [Buildroot] [PATCH 11/11] Manual: add empty line after header in .mk files Samuel Martin
2013-02-28 21:39   ` Peter Korsgaard

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.