diff mbox

[8/9] manual: update {deprecated, package}-list.txt

Message ID 37bdf37ef22570022acc9a3b113ff05ea598680a.1360795941.git.s.martin49@gmail.com
State Superseded
Headers show

Commit Message

Samuel Martin Feb. 13, 2013, 10:59 p.m. UTC
* add the gen-manual-lists.py 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;
* add a make target to update these lists in the manual;
* update the these appendices of the manual.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
 docs/manual/appendix.txt            |  13 +-
 docs/manual/deprecated-list.txt     |  81 ++-
 docs/manual/manual.mk               |   7 +
 docs/manual/package-list.txt        | 948 ++++++++++++++++++++++++++++++++++++
 docs/manual/pkg-list.txt            | 870 ---------------------------------
 support/scripts/gen-manual-lists.py | 237 +++++++++
 6 files changed, 1233 insertions(+), 923 deletions(-)
 create mode 100644 docs/manual/package-list.txt
 delete mode 100644 docs/manual/pkg-list.txt
 create mode 100755 support/scripts/gen-manual-lists.py

Comments

Arnout Vandecappelle Feb. 18, 2013, 7:23 a.m. UTC | #1
Hi Samuel,

On 13/02/13 23:59, Samuel Martin wrote:
> * add the gen-manual-lists.py 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;
> * add a make target to update these lists in the manual;
> * update the these appendices of the manual.

  The first two should be a separate patch from the third one. Although, 
admittedly, it was pretty convenient to review all of them together.

  Even though I have a lot of comments, this patch should be included in 
-rc2, otherwise the package list in the manual is inconsistent.


>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
> ---
>   docs/manual/appendix.txt            |  13 +-
>   docs/manual/deprecated-list.txt     |  81 ++-
>   docs/manual/manual.mk               |   7 +
>   docs/manual/package-list.txt        | 948 ++++++++++++++++++++++++++++++++++++
>   docs/manual/pkg-list.txt            | 870 ---------------------------------

  Any particular reason to rename it?

>   support/scripts/gen-manual-lists.py | 237 +++++++++
>   6 files changed, 1233 insertions(+), 923 deletions(-)
>   create mode 100644 docs/manual/package-list.txt
>   delete mode 100644 docs/manual/pkg-list.txt
>   create mode 100755 support/scripts/gen-manual-lists.py
>
> diff --git a/docs/manual/appendix.txt b/docs/manual/appendix.txt
> index ef34169..37548f7 100644
> --- a/docs/manual/appendix.txt
> +++ b/docs/manual/appendix.txt
> @@ -6,15 +6,8 @@ Appendix
>
>   include::makedev-syntax.txt[]
>
> -[[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[]
> +// autogenerated
> +include::package-list.txt[]
>
> +// autogenerated
>   include::deprecated-list.txt[]
> diff --git a/docs/manual/deprecated-list.txt b/docs/manual/deprecated-list.txt
> index 6dc87a4..3468219 100644
> --- a/docs/manual/deprecated-list.txt
> +++ b/docs/manual/deprecated-list.txt
> @@ -1,46 +1,41 @@
> -// -*- mode:doc -*- ;
> -
> -[[deprecated]]
> -Deprecated list
> ----------------
> -
> -The following stuff are marked as _deprecated_ in Buildroot due to
> -their status either too old or unmaintained.

  It's a pity that this part is gone. I would by the way move this to 
appendix.txt: that's cleaner than putting part of the manual text in the 
python script. Same for the text in package-list.txt.

[snip]
> diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
> index aa20534..dd07b4e 100644
> --- a/docs/manual/manual.mk
> +++ b/docs/manual/manual.mk
> @@ -24,6 +24,13 @@ $$(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="" srctree=$(TOPDIR) \
> +		$(TOPDIR)/support/scripts/gen-manual-lists.py \
> +		--package-file $(TOPDIR)/docs/manual/package-list.txt \
> +		--deprecated-file $(TOPDIR)/docs/manual/deprecated-list.txt
> +

  This new goal should be added to .PHONY.

>   ################################################################################
>   # GENDOC -- generates the make targets needed to build asciidoc documentation.
>   #
> diff --git a/docs/manual/package-list.txt b/docs/manual/package-list.txt
> new file mode 100644
> index 0000000..79d4ec6
> --- /dev/null
> +++ b/docs/manual/package-list.txt
> @@ -0,0 +1,948 @@
> +//
> +// Automatically generated list for Buildroot manual.
> +// Buildroot 2013.02-00794-g199d6d6-dirty
> +// Generation date: 2013-02-11 22:24:44.739087
> +//
> +
> +[[package-list]]
> +Package Selection for the target
> +--------------------------------
> +
> +[width="90%",cols="^1,4",options="header"]
> +|===================================================
> +| Packages                       | Package Selection for the target -> ...

  Nice! Maybe even better if this stands out a bit from the rest, perhaps:
<| 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

  Is it intentional to keep the deprecated ones in this list?

[snip]

> diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py
> new file mode 100755
> index 0000000..f2a2dc4
> --- /dev/null
> +++ b/support/scripts/gen-manual-lists.py
> @@ -0,0 +1,237 @@
> +#!/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

  These future things only exist in recent pythons, and we don't do any 
checks for a specific python version... That said, this script isn't 
supposed to be run by a normal user so I guess it doesn't really matter.

> +
> +import os
> +import re
> +import sys
> +import datetime
> +from argparse import ArgumentParser
> +
> +try:
> +    import kconfiglib
> +except ImportError:
> +    message = """
> +Could not find the module 'kconfiglib' in the PYTHONPATH:
> +"""
> +    message += "\n".join(["  {0}".format(path) for path in sys.path])
> +    message += """
> +
> +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch the script.
> +
> +You can get kconfiglib from:
> +  https://github.com/ulfalizer/Kconfiglib

  Can we not just dump a copy of kconfiglib in the scripts directory? Or 
is it more than one file?

> +
> +
> +"""
> +    sys.stderr.write(message)
> +    raise
> +
> +
> +_LIST_FORMAT = """\

  This symbol would be more appropriate as an attribute of the Buildroot 
class.

> +//
> +// Automatically generated list for Buildroot manual.
> +// Buildroot {br_version_full}
> +// Generation date: {gen_date}
> +//
> +
> +[[{section_anchor}]]
> +{section_title}
> +{section_level}

  As I briefly mentioned before: I think it's better to just generate the 
table with the script, and keep the surrounding text and title in the 
manually written asciidoc files. That means you'll need three files, but 
there's no issue with that, is there.

> +
> +{table}
> +"""
> +
> +
> +def format_asciidoc_table(root, items, get_label, filter=lambda x: True, sort=True):

  I would prefer using different names than standard python functions. So 
filterfunc instead of filter. sort is OK because it only exists as an 
attribute of list objects.

> +    def _format_entry(label, parents):
> +        return "| {0:<30} | {1}\n".format(label, " -> ".join(parents))
> +    def _get_parents(root, item):
> +        parent = item.get_parent()
> +        parents = []
> +        while parent and parent != root:
> +            if parent.is_menu():

  I guess the parent can be either a menu or a choice. Seems a good idea 
to me to keep choices in the path as well.

> +                parents += [parent.get_title()]
> +            parent = parent.get_parent()
> +        parents.reverse()
> +        return parents

  An empty line here would be nice.

> +    lines = []
> +    for item in items:
> +        if not filter(item):
> +            continue
> +        if not item.is_symbol() or not item.prompts:
> +            continue
> +        loc = [] if root is None else ["."]
> +        loc += _get_parents(root, item)
> +        lines += [_format_entry(get_label(item), loc)]

  lines.append(...) would be more appropriate.

> +    if sort:
> +        lines.sort(key=lambda x:x.lower())
> +    if root:
> +        loc_label = _get_parents(None, root) + [root.get_title(), "..."]
> +    else:
> +        loc_label = ["Location"]
> +    lines.insert(0, _format_entry("Packages", loc_label))
> +    table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n"
> +    table += "|===================================================\n"
> +    table += "".join(lines)
> +    table += "|===================================================\n"
> +    return table
> +
> +def get_symbol_subset(items, filter):

  Same remark about filter here.

> +    subset = []
> +    for item in items:
> +        if item.is_symbol():
> +            if not item.prompts:
> +                continue
> +            if not filter(item):
> +                continue
> +            subset += [item]

  subset.append(item)

> +        elif item.is_menu() or item.is_choice():
> +            subset += get_symbol_subset(item.get_items(), filter)
> +    return subset

  This function is an ideal candidate for an iterator. But iterators are 
a bit tricky to understand so I don't mind keeping it as it is.

> +
> +
> +class Buildroot:
> +    root_config = "Config.in"
> +    package_dirname = "package"
> +    package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"]
> +    deprecated_symbol = "BR2_DEPRECATED"
> +
> +    def __init__(self):
> +        self.base_dir = os.environ.get("srctree")

  Why not use the TOPDIR variable?

> +        self.package_dir = os.path.join(self.base_dir, self.package_dirname)
> +        self.config = kconfiglib.Config(os.path.join(self.base_dir, self.root_config))
> +        self.package_symbols = []
> +        self._fill_package_symbols()
> +        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_symbol(self, package_name):
> +        pkg_symbol = re.sub("[-+.]", "_", package_name)
> +        pkg_symbol = pkg_symbol.upper()
> +        pkg_symbols = [prefix + pkg_symbol for prefix in self.package_prefixes]
> +        return pkg_symbols
> +
> +    def _fill_package_symbols(self):
> +        for root, _, files in os.walk(self.package_dir):
> +            pkg_name = os.path.basename(root)
> +            for file_ in files:
> +                if not file_.endswith(".mk") or not pkg_name == file_[:-3]:
> +                    continue
> +                self.package_symbols += self._get_package_symbol(pkg_name)

  I don't really like this. Wouldn't it be possible to construct the 
package name from the location of the Config.in where it is defined? And 
check for it directly in _is_package instead of pre-constructing the list?

> +
> +    def _is_deprecated(self, symbol):
> +        return self._deprecated in symbol.get_referenced_symbols()
> +
> +    def _is_from_package(self, symbol):
> +        if hasattr(symbol, 'get_def_locations'):
> +            def_loc = symbol.get_def_locations()[0][0]
> +        elif hasattr(symbol, 'get_location'):
> +            def_loc = symbol.get_location()[0]
> +        else:
> +            return False
> +        return self.package_dir in def_loc

  This function isn't used, is it?

> +
> +    def _is_package(self, symbol):
> +        # return symbol.get_name().startswith(self.package_prefixes[0])
> +        return symbol.get_name() in self.package_symbols
> +        pkg_name = os.path.basename(os.path.dirname(symbol.get_def_locations()[0][0]))
> +        return symbol.get_name() in self._get_package_symbol(pkg_name)

  The final commit shouldn't contain three different versions :-)

> +
> +    def _get_symbol_label(self, item):
> +        label = item.prompts[0][0]
> +        if self._is_deprecated(item):
> +            label += " *(deprecated)*"
> +        return label
> +
> +    def _format_list(self, root, items, section_anchor, section_title):
> +        table = format_asciidoc_table(root, items, get_label=self._get_symbol_label)
> +        content = _LIST_FORMAT.format(
> +            br_version_full=self.br_version_full,
> +            gen_date=self.generation_date,
> +            section_anchor=section_anchor,
> +            section_title=section_title,
> +            section_level=re.sub(".", "-", section_title),
> +            table=table
> +            )
> +        return content
> +
> +    def print_package_list(self, output=None):
> +        root_title = "Package Selection for the target"
> +        root_item = [menu for menu in self.config.get_menus()
> +            if menu.get_title().lower() == root_title.lower()][0]

  This could get better error handling, and the list construct makes it 
less readable than a simple for loop.

  Regards,
  Arnout

> +        items = get_symbol_subset(root_item.get_items(), filter=self._is_package)
> +        content = self._format_list(root_item, items, "package-list", root_title)
> +        content += "\n\n"
> +        root_title = "Host utilities"
> +        root_item = [menu for menu in self.config.get_menus()
> +            if menu.get_title().lower() == root_title.lower()][0]
> +        items = get_symbol_subset(root_item.get_items(), filter=self._is_package)
> +        content += self._format_list(root_item, items, "host-package-list", root_title)
> +        if not output:
> +            print(content)
> +            return
> +        with open(output, 'w') as fout:
> +            fout.write(content)
> +
> +    def print_deprecated_list(self, output=None):
> +        items = get_symbol_subset(self.config.get_top_level_items(),
> +            filter=self._is_deprecated)
> +        content = self._format_list(None, items, "deprecated", "Deprecated stuff")
> +        if not output:
> +            print(content)
> +            return
> +        with open(output, 'w') as fout:
> +            fout.write(content)
> +
> +if __name__ == '__main__':
> +    parser = ArgumentParser()
> +    parser.add_argument("--package-file", dest="package_file",
> +        help="output package list file")
> +    parser.add_argument("--deprecated-file", dest="deprecated_file",
> +        help="output deprecated list file")
> +    parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true',
> +        help="output both package list and deprecated stuff into stdout")
> +    args = parser.parse_args()
> +    buildroot = Buildroot()
> +    if args.dry_run:
> +        buildroot.print_package_list()
> +        buildroot.print_deprecated_list()
> +        sys.exit()
> +    if args.package_file:
> +        buildroot.print_package_list(output=args.package_file)
> +    if args.deprecated_file:
> +        buildroot.print_deprecated_list(output=args.deprecated_file)
>
Samuel Martin Feb. 25, 2013, 9:22 p.m. UTC | #2
Hi Arnout,

2013/2/18 Arnout Vandecappelle <arnout@mind.be>:
>  Hi Samuel,
>
>
> On 13/02/13 23:59, Samuel Martin wrote:
>>
>> * add the gen-manual-lists.py 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;
>> * add a make target to update these lists in the manual;
>> * update the these appendices of the manual.
>
>
>  The first two should be a separate patch from the third one. Although,
> admittedly, it was pretty convenient to review all of them together.
I hesitated to do so ;)

>
>  Even though I have a lot of comments, this patch should be included in
> -rc2, otherwise the package list in the manual is inconsistent.
>
>
>
>>
>> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>> ---
>>   docs/manual/appendix.txt            |  13 +-
>>   docs/manual/deprecated-list.txt     |  81 ++-
>>   docs/manual/manual.mk               |   7 +
>>   docs/manual/package-list.txt        | 948
>> ++++++++++++++++++++++++++++++++++++
>>   docs/manual/pkg-list.txt            | 870
>> ---------------------------------
>
>
>  Any particular reason to rename it?
Using plain noun in file names, keeping consistency with the rest of
the doc source file names.

BTW, restrict the generated stuff to the tables themselves implies
generating 3 files.
So, automating this generation will certainly lead to rename few files.

>
>
>>   support/scripts/gen-manual-lists.py | 237 +++++++++
>>   6 files changed, 1233 insertions(+), 923 deletions(-)
>>   create mode 100644 docs/manual/package-list.txt
>>   delete mode 100644 docs/manual/pkg-list.txt
>>   create mode 100755 support/scripts/gen-manual-lists.py
>>
>> diff --git a/docs/manual/appendix.txt b/docs/manual/appendix.txt
>> index ef34169..37548f7 100644
>> --- a/docs/manual/appendix.txt
>> +++ b/docs/manual/appendix.txt
>> @@ -6,15 +6,8 @@ Appendix
>>
>>   include::makedev-syntax.txt[]
>>
>> -[[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[]
>> +// autogenerated
>> +include::package-list.txt[]
>>
>> +// autogenerated
>>   include::deprecated-list.txt[]
>> diff --git a/docs/manual/deprecated-list.txt
>> b/docs/manual/deprecated-list.txt
>> index 6dc87a4..3468219 100644
>> --- a/docs/manual/deprecated-list.txt
>> +++ b/docs/manual/deprecated-list.txt
>> @@ -1,46 +1,41 @@
>> -// -*- mode:doc -*- ;
>> -
>> -[[deprecated]]
>> -Deprecated list
>> ----------------
>> -
>> -The following stuff are marked as _deprecated_ in Buildroot due to
>> -their status either too old or unmaintained.
>
>
>  It's a pity that this part is gone. I would by the way move this to
> appendix.txt: that's cleaner than putting part of the manual text in the
> python script. Same for the text in package-list.txt.

Good catch! I didn't notice this was dropped.
BTW, for the package list, there was no text, just a commented command
line used to generate the list, which is obsolete with this patch...

>
> [snip]
>
>> diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
>> index aa20534..dd07b4e 100644
>> --- a/docs/manual/manual.mk
>> +++ b/docs/manual/manual.mk
>> @@ -24,6 +24,13 @@ $$(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="" srctree=$(TOPDIR) \
>> +               $(TOPDIR)/support/scripts/gen-manual-lists.py \
>> +               --package-file $(TOPDIR)/docs/manual/package-list.txt \
>> +               --deprecated-file
>> $(TOPDIR)/docs/manual/deprecated-list.txt
>> +
>
>
>  This new goal should be added to .PHONY.
done.

>
>
>>
>> ################################################################################
>>   # GENDOC -- generates the make targets needed to build asciidoc
>> documentation.
>>   #
>> diff --git a/docs/manual/package-list.txt b/docs/manual/package-list.txt
>> new file mode 100644
>> index 0000000..79d4ec6
>> --- /dev/null
>> +++ b/docs/manual/package-list.txt
>> @@ -0,0 +1,948 @@
>> +//
>> +// Automatically generated list for Buildroot manual.
>> +// Buildroot 2013.02-00794-g199d6d6-dirty
>> +// Generation date: 2013-02-11 22:24:44.739087
>> +//
>> +
>> +[[package-list]]
>> +Package Selection for the target
>> +--------------------------------
>> +
>> +[width="90%",cols="^1,4",options="header"]
>> +|===================================================
>> +| Packages                       | Package Selection for the target ->
>> ...
>
>
>  Nice! Maybe even better if this stands out a bit from the rest, perhaps:
ok, I'll add a blank line before and after the table content.

>
> <| 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
>
>
>  Is it intentional to keep the deprecated ones in this list?

Yes, shall we drop them from the list?
Though I think deprecated features should not be documented, I have no
strong opinion about this specific point.

Someone may think it is redundant with the "Deprecated" appendix.
But for packages, it is also a way to tell to the users, they should
either not use packages marked as deprecated,
or do some work to maintain it and get it back in the official
supported package list...

>
> [snip]
>
>
>> diff --git a/support/scripts/gen-manual-lists.py
>> b/support/scripts/gen-manual-lists.py
>> new file mode 100755
>> index 0000000..f2a2dc4
>> --- /dev/null
>> +++ b/support/scripts/gen-manual-lists.py
>> @@ -0,0 +1,237 @@
>> +#!/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
>
>
>  These future things only exist in recent pythons, and we don't do any
> checks for a specific python version... That said, this script isn't
> supposed to be run by a normal user so I guess it doesn't really matter.
Indeed, it does not really matter since the kconfiglib package is not
python3-friendly, so it could have been write in pure python2...

>
>
>> +
>> +import os
>> +import re
>> +import sys
>> +import datetime
>> +from argparse import ArgumentParser
>> +
>> +try:
>> +    import kconfiglib
>> +except ImportError:
>> +    message = """
>> +Could not find the module 'kconfiglib' in the PYTHONPATH:
>> +"""
>> +    message += "\n".join(["  {0}".format(path) for path in sys.path])
>> +    message += """
>> +
>> +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch
>> the script.
>> +
>> +You can get kconfiglib from:
>> +  https://github.com/ulfalizer/Kconfiglib
>
>
>  Can we not just dump a copy of kconfiglib in the scripts directory? Or is
> it more than one file?
I think we can, it's just one *.py file. I'll do it.

>
>
>> +
>> +
>> +"""
>> +    sys.stderr.write(message)
>> +    raise
>> +
>> +
>> +_LIST_FORMAT = """\
>
>
>  This symbol would be more appropriate as an attribute of the Buildroot
> class.
>
>
>> +//
>> +// Automatically generated list for Buildroot manual.
>> +// Buildroot {br_version_full}
>> +// Generation date: {gen_date}
>> +//
>> +
>> +[[{section_anchor}]]
>> +{section_title}
>> +{section_level}
>
>
>  As I briefly mentioned before: I think it's better to just generate the
> table with the script, and keep the surrounding text and title in the
> manually written asciidoc files. That means you'll need three files, but
> there's no issue with that, is there.
ok, I'll put all the surrounding text in the appendix.txt file.

>
>
>> +
>> +{table}
>> +"""
>> +
>> +
>> +def format_asciidoc_table(root, items, get_label, filter=lambda x: True,
>> sort=True):
>
>
>  I would prefer using different names than standard python functions. So
> filterfunc instead of filter. sort is OK because it only exists as an
> attribute of list objects.
ok.

>
>
>> +    def _format_entry(label, parents):
>> +        return "| {0:<30} | {1}\n".format(label, " -> ".join(parents))
>> +    def _get_parents(root, item):
>> +        parent = item.get_parent()
>> +        parents = []
>> +        while parent and parent != root:
>> +            if parent.is_menu():
>
>
>  I guess the parent can be either a menu or a choice. Seems a good idea to
> me to keep choices in the path as well.
done.

>
>
>> +                parents += [parent.get_title()]
>> +            parent = parent.get_parent()
>> +        parents.reverse()
>> +        return parents
>
>
>  An empty line here would be nice.
>
>
>> +    lines = []
>> +    for item in items:
>> +        if not filter(item):
>> +            continue
>> +        if not item.is_symbol() or not item.prompts:
>> +            continue
>> +        loc = [] if root is None else ["."]
>> +        loc += _get_parents(root, item)
>> +        lines += [_format_entry(get_label(item), loc)]
>
>
>  lines.append(...) would be more appropriate.
>
>
>> +    if sort:
>> +        lines.sort(key=lambda x:x.lower())
>> +    if root:
>> +        loc_label = _get_parents(None, root) + [root.get_title(), "..."]
>> +    else:
>> +        loc_label = ["Location"]
>> +    lines.insert(0, _format_entry("Packages", loc_label))
>> +    table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n"
>> +    table += "|===================================================\n"
>> +    table += "".join(lines)
>> +    table += "|===================================================\n"
>> +    return table
>> +
>> +def get_symbol_subset(items, filter):
>
>
>  Same remark about filter here.
>
>
>> +    subset = []
>> +    for item in items:
>> +        if item.is_symbol():
>> +            if not item.prompts:
>> +                continue
>> +            if not filter(item):
>> +                continue
>> +            subset += [item]
>
>
>  subset.append(item)
>
>
>> +        elif item.is_menu() or item.is_choice():
>> +            subset += get_symbol_subset(item.get_items(), filter)
>> +    return subset
>
>
>  This function is an ideal candidate for an iterator. But iterators are a
> bit tricky to understand so I don't mind keeping it as it is.
done.

>
>
>> +
>> +
>> +class Buildroot:
>> +    root_config = "Config.in"
>> +    package_dirname = "package"
>> +    package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"]
>> +    deprecated_symbol = "BR2_DEPRECATED"
>> +
>> +    def __init__(self):
>> +        self.base_dir = os.environ.get("srctree")
>
>
>  Why not use the TOPDIR variable?
Indeed, it'd be better.
BTW, the kconfiglib.Config class expects (and requires) a "srctree"
variable in the environment.

>
>
>> +        self.package_dir = os.path.join(self.base_dir,
>> self.package_dirname)
>> +        self.config = kconfiglib.Config(os.path.join(self.base_dir,
>> self.root_config))
>> +        self.package_symbols = []
>> +        self._fill_package_symbols()
>> +        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_symbol(self, package_name):
>> +        pkg_symbol = re.sub("[-+.]", "_", package_name)
>> +        pkg_symbol = pkg_symbol.upper()
>> +        pkg_symbols = [prefix + pkg_symbol for prefix in
>> self.package_prefixes]
>> +        return pkg_symbols
>> +
>> +    def _fill_package_symbols(self):
>> +        for root, _, files in os.walk(self.package_dir):
>> +            pkg_name = os.path.basename(root)
>> +            for file_ in files:
>> +                if not file_.endswith(".mk") or not pkg_name ==
>> file_[:-3]:
>> +                    continue
>> +                self.package_symbols +=
>> self._get_package_symbol(pkg_name)
>
>
>  I don't really like this. Wouldn't it be possible to construct the package
> name from the location of the Config.in where it is defined?
Me neither, but the problem is that few package symbols are not
defined in their own package directory :(
For example, libjpeg and jpeg-turbo symbols are both defined in
package/jpeg/Config.in;
so just looking at the location of the Config.in leads to missing both
the libjpeg and jpeg-turbo packages.

Another problem is that the kconfig symbol/package name tuple is not a
bijection, e.g.:
from the kconfig symbol, we get several package names (and this number
increase a lot when the case is not ignored):
BR2_PACKAGE_XLIB_LIBXAU => xlib-libxau | xlib_libxau | xlib-libXau |
xlib_libXau | ...

from the package name, we easy get the unique kconfig symbol:
xlib_libXau => BR2_PACKAGE_XLIB_LIBXAU

So, it is more expensive to get the package name from the kconfig
symbol than getting the symbol from the package name.

Note that the actual package check would be grepping the *.mk files
for '\$(eval \$(\(host-\)\?\(generic\|autotools\|cmake\)-package))'.
So, I made a choice. With this compromise, no package is missed, but
the "virtual" packages (that actually are choices) are also catched.


> And check for it directly in _is_package instead of pre-constructing the list?
done.

>
>
>> +
>> +    def _is_deprecated(self, symbol):
>> +        return self._deprecated in symbol.get_referenced_symbols()
>> +
>> +    def _is_from_package(self, symbol):
>> +        if hasattr(symbol, 'get_def_locations'):
>> +            def_loc = symbol.get_def_locations()[0][0]
>> +        elif hasattr(symbol, 'get_location'):
>> +            def_loc = symbol.get_location()[0]
>> +        else:
>> +            return False
>> +        return self.package_dir in def_loc
>
>
>  This function isn't used, is it?
Indeed.

>
>
>> +
>> +    def _is_package(self, symbol):
>> +        # return symbol.get_name().startswith(self.package_prefixes[0])
>> +        return symbol.get_name() in self.package_symbols
>> +        pkg_name =
>> os.path.basename(os.path.dirname(symbol.get_def_locations()[0][0]))
>> +        return symbol.get_name() in self._get_package_symbol(pkg_name)
>
>
>  The final commit shouldn't contain three different versions :-)
Arf... I forgot to cleanup before posting!

>
>
>> +
>> +    def _get_symbol_label(self, item):
>> +        label = item.prompts[0][0]
>> +        if self._is_deprecated(item):
>> +            label += " *(deprecated)*"
>> +        return label
>> +
>> +    def _format_list(self, root, items, section_anchor, section_title):
>> +        table = format_asciidoc_table(root, items,
>> get_label=self._get_symbol_label)
>> +        content = _LIST_FORMAT.format(
>> +            br_version_full=self.br_version_full,
>> +            gen_date=self.generation_date,
>> +            section_anchor=section_anchor,
>> +            section_title=section_title,
>> +            section_level=re.sub(".", "-", section_title),
>> +            table=table
>> +            )
>> +        return content
>> +
>> +    def print_package_list(self, output=None):
>> +        root_title = "Package Selection for the target"
>> +        root_item = [menu for menu in self.config.get_menus()
>> +            if menu.get_title().lower() == root_title.lower()][0]
>
>
>  This could get better error handling, and the list construct makes it less
> readable than a simple for loop.
Indeed. Done.


Regards,
diff mbox

Patch

diff --git a/docs/manual/appendix.txt b/docs/manual/appendix.txt
index ef34169..37548f7 100644
--- a/docs/manual/appendix.txt
+++ b/docs/manual/appendix.txt
@@ -6,15 +6,8 @@  Appendix
 
 include::makedev-syntax.txt[]
 
-[[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[]
+// autogenerated
+include::package-list.txt[]
 
+// autogenerated
 include::deprecated-list.txt[]
diff --git a/docs/manual/deprecated-list.txt b/docs/manual/deprecated-list.txt
index 6dc87a4..3468219 100644
--- a/docs/manual/deprecated-list.txt
+++ b/docs/manual/deprecated-list.txt
@@ -1,46 +1,41 @@ 
-// -*- 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-00794-g199d6d6-dirty
+// Generation date: 2013-02-11 22:24:44.739087
+//
 
-* Output images:
+[[deprecated]]
+Deprecated stuff
+----------------
+
+[width="90%",cols="^1,4",options="header"]
+|===================================================
+| Packages                       | Location
+| 2011.06 *(deprecated)*         | Bootloaders
+| 2011.09 *(deprecated)*         | Bootloaders
+| 3.x *(deprecated)*             | Filesystem images
+| autoconf *(deprecated)*        | Package Selection for the target -> Development tools
+| automake *(deprecated)*        | Package Selection for the target -> Development tools
+| binutils 2.20 *(deprecated)*   | Toolchain
+| Build gdb debugger for the Target *(deprecated)* | Toolchain
+| ccache *(deprecated)*          | Package Selection for the target -> Development tools
+| development files in target filesystem *(deprecated)* | Build options
+| documentation on the target *(deprecated)* | Build options
+| gcc *(deprecated)*             | Package Selection for the target -> Development tools
+| gdb 7.2.x *(deprecated)*       | Toolchain
+| gdb 7.3.x *(deprecated)*       | Toolchain
+| Linux 3.1.x kernel headers *(deprecated)* | Toolchain
+| Linux 3.3.x kernel headers *(deprecated)* | Toolchain
+| Linux 3.5.x kernel headers *(deprecated)* | Toolchain
+| lzma *(deprecated)*            | Package Selection for the target -> Compressors and decompressors
+| make *(deprecated)*            | Package Selection for the target -> Development tools
+| microperl *(deprecated)*       | Package Selection for the target -> Interpreter languages and scripting
+| netkitbase *(deprecated)*      | Package Selection for the target -> Networking applications
+| netkittelnet *(deprecated)*    | Package Selection for the target -> Networking applications
+| pkg-config *(deprecated)*      | Package Selection for the target -> Development tools
+| squashfs3 *(deprecated)*       | Package Selection for the target -> Filesystem and flash utilities
+| ttcp *(deprecated)*            | Package Selection for the target -> Networking applications
+| uClibc 0.9.31.x *(deprecated)* | Toolchain
+| xstroke *(deprecated)*         | Package Selection for the target -> Graphic libraries and applications (graphic/text)
+|===================================================
 
-** squashfs3 image
diff --git a/docs/manual/manual.mk b/docs/manual/manual.mk
index aa20534..dd07b4e 100644
--- a/docs/manual/manual.mk
+++ b/docs/manual/manual.mk
@@ -24,6 +24,13 @@  $$(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="" srctree=$(TOPDIR) \
+		$(TOPDIR)/support/scripts/gen-manual-lists.py \
+		--package-file $(TOPDIR)/docs/manual/package-list.txt \
+		--deprecated-file $(TOPDIR)/docs/manual/deprecated-list.txt
+
 ################################################################################
 # GENDOC -- generates the make targets needed to build asciidoc documentation.
 #
diff --git a/docs/manual/package-list.txt b/docs/manual/package-list.txt
new file mode 100644
index 0000000..79d4ec6
--- /dev/null
+++ b/docs/manual/package-list.txt
@@ -0,0 +1,948 @@ 
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot 2013.02-00794-g199d6d6-dirty
+// Generation date: 2013-02-11 22:24:44.739087
+//
+
+[[package-list]]
+Package Selection for the target
+--------------------------------
+
+[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 support                   | . -> Libraries -> Graphics
+| jpeg-turbo                     | . -> Libraries -> Graphics
+| 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
+| 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
+| 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
+|===================================================
+
+
+
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot 2013.02-00794-g199d6d6-dirty
+// Generation date: 2013-02-11 22:24:44.739087
+//
+
+[[host-package-list]]
+Host utilities
+--------------
+
+[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/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
diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py
new file mode 100755
index 0000000..f2a2dc4
--- /dev/null
+++ b/support/scripts/gen-manual-lists.py
@@ -0,0 +1,237 @@ 
+#!/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
+
+try:
+    import kconfiglib
+except ImportError:
+    message = """
+Could not find the module 'kconfiglib' in the PYTHONPATH:
+"""
+    message += "\n".join(["  {0}".format(path) for path in sys.path])
+    message += """
+
+Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch the script.
+
+You can get kconfiglib from:
+  https://github.com/ulfalizer/Kconfiglib
+
+
+"""
+    sys.stderr.write(message)
+    raise
+
+
+_LIST_FORMAT = """\
+//
+// Automatically generated list for Buildroot manual.
+// Buildroot {br_version_full}
+// Generation date: {gen_date}
+//
+
+[[{section_anchor}]]
+{section_title}
+{section_level}
+
+{table}
+"""
+
+
+def format_asciidoc_table(root, items, get_label, filter=lambda x: True, sort=True):
+    def _format_entry(label, parents):
+        return "| {0:<30} | {1}\n".format(label, " -> ".join(parents))
+    def _get_parents(root, item):
+        parent = item.get_parent()
+        parents = []
+        while parent and parent != root:
+            if parent.is_menu():
+                parents += [parent.get_title()]
+            parent = parent.get_parent()
+        parents.reverse()
+        return parents
+    lines = []
+    for item in items:
+        if not filter(item):
+            continue
+        if not item.is_symbol() or not item.prompts:
+            continue
+        loc = [] if root is None else ["."]
+        loc += _get_parents(root, item)
+        lines += [_format_entry(get_label(item), loc)]
+    if sort:
+        lines.sort(key=lambda x:x.lower())
+    if root:
+        loc_label = _get_parents(None, root) + [root.get_title(), "..."]
+    else:
+        loc_label = ["Location"]
+    lines.insert(0, _format_entry("Packages", loc_label))
+    table = "[width=\"90%\",cols=\"^1,4\",options=\"header\"]\n"
+    table += "|===================================================\n"
+    table += "".join(lines)
+    table += "|===================================================\n"
+    return table
+
+def get_symbol_subset(items, filter):
+    subset = []
+    for item in items:
+        if item.is_symbol():
+            if not item.prompts:
+                continue
+            if not filter(item):
+                continue
+            subset += [item]
+        elif item.is_menu() or item.is_choice():
+            subset += get_symbol_subset(item.get_items(), filter)
+    return subset
+
+
+class Buildroot:
+    root_config = "Config.in"
+    package_dirname = "package"
+    package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"]
+    deprecated_symbol = "BR2_DEPRECATED"
+
+    def __init__(self):
+        self.base_dir = os.environ.get("srctree")
+        self.package_dir = os.path.join(self.base_dir, self.package_dirname)
+        self.config = kconfiglib.Config(os.path.join(self.base_dir, self.root_config))
+        self.package_symbols = []
+        self._fill_package_symbols()
+        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_symbol(self, package_name):
+        pkg_symbol = re.sub("[-+.]", "_", package_name)
+        pkg_symbol = pkg_symbol.upper()
+        pkg_symbols = [prefix + pkg_symbol for prefix in self.package_prefixes]
+        return pkg_symbols
+
+    def _fill_package_symbols(self):
+        for root, _, files in os.walk(self.package_dir):
+            pkg_name = os.path.basename(root)
+            for file_ in files:
+                if not file_.endswith(".mk") or not pkg_name == file_[:-3]:
+                    continue
+                self.package_symbols += self._get_package_symbol(pkg_name)
+
+    def _is_deprecated(self, symbol):
+        return self._deprecated in symbol.get_referenced_symbols()
+
+    def _is_from_package(self, symbol):
+        if hasattr(symbol, 'get_def_locations'):
+            def_loc = symbol.get_def_locations()[0][0]
+        elif hasattr(symbol, 'get_location'):
+            def_loc = symbol.get_location()[0]
+        else:
+            return False
+        return self.package_dir in def_loc
+
+    def _is_package(self, symbol):
+        # return symbol.get_name().startswith(self.package_prefixes[0])
+        return symbol.get_name() in self.package_symbols
+        pkg_name = os.path.basename(os.path.dirname(symbol.get_def_locations()[0][0]))
+        return symbol.get_name() in self._get_package_symbol(pkg_name)
+
+    def _get_symbol_label(self, item):
+        label = item.prompts[0][0]
+        if self._is_deprecated(item):
+            label += " *(deprecated)*"
+        return label
+
+    def _format_list(self, root, items, section_anchor, section_title):
+        table = format_asciidoc_table(root, items, get_label=self._get_symbol_label)
+        content = _LIST_FORMAT.format(
+            br_version_full=self.br_version_full,
+            gen_date=self.generation_date,
+            section_anchor=section_anchor,
+            section_title=section_title,
+            section_level=re.sub(".", "-", section_title),
+            table=table
+            )
+        return content
+
+    def print_package_list(self, output=None):
+        root_title = "Package Selection for the target"
+        root_item = [menu for menu in self.config.get_menus()
+            if menu.get_title().lower() == root_title.lower()][0]
+        items = get_symbol_subset(root_item.get_items(), filter=self._is_package)
+        content = self._format_list(root_item, items, "package-list", root_title)
+        content += "\n\n"
+        root_title = "Host utilities"
+        root_item = [menu for menu in self.config.get_menus()
+            if menu.get_title().lower() == root_title.lower()][0]
+        items = get_symbol_subset(root_item.get_items(), filter=self._is_package)
+        content += self._format_list(root_item, items, "host-package-list", root_title)
+        if not output:
+            print(content)
+            return
+        with open(output, 'w') as fout:
+            fout.write(content)
+
+    def print_deprecated_list(self, output=None):
+        items = get_symbol_subset(self.config.get_top_level_items(),
+            filter=self._is_deprecated)
+        content = self._format_list(None, items, "deprecated", "Deprecated stuff")
+        if not output:
+            print(content)
+            return
+        with open(output, 'w') as fout:
+            fout.write(content)
+
+if __name__ == '__main__':
+    parser = ArgumentParser()
+    parser.add_argument("--package-file", dest="package_file",
+        help="output package list file")
+    parser.add_argument("--deprecated-file", dest="deprecated_file",
+        help="output deprecated list file")
+    parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true',
+        help="output both package list and deprecated stuff into stdout")
+    args = parser.parse_args()
+    buildroot = Buildroot()
+    if args.dry_run:
+        buildroot.print_package_list()
+        buildroot.print_deprecated_list()
+        sys.exit()
+    if args.package_file:
+        buildroot.print_package_list(output=args.package_file)
+    if args.deprecated_file:
+        buildroot.print_deprecated_list(output=args.deprecated_file)