package_ipk.bbclass: Support hierarchical feed
authorPaul Barker <paul@paulbarker.me.uk>
Wed, 28 May 2014 15:19:50 +0000 (15:19 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 23 Jul 2014 21:06:10 +0000 (22:06 +0100)
commit0847461f1cd05e1cc421e4bd31a2cdc45279d0f3
tree07168e1dd87f46a6a477e825bf43ed513ea7953a
parent90a2a4e5f380a4e52e315f18cd83db4506e29fe9
package_ipk.bbclass: Support hierarchical feed

This patch allows for an optional new layout for ipk feed directories which I've
called a 'hierarchical feed' and is based on how Debian pools package files. It
is disabled by default and is enabled by setting IPK_HIERARCHICAL_FEED to "1".

In the traditional feed layout, package files are placed in <outdir>/<arch>/.
This can lead to several thousand files existing in a single directory which is
often a problem if developers want to upload a package feed to a shared web
hosting provider. For example, in my case, listing files via FTP only shows the
first 2000 files, breaking my scripts which attempt to upload only new and
changed files via FTP.

In the hierarchical feed, package files are written to
<outdir>/<arch>/<pkg_prefix>/<pkg_subdir>, where pkg_prefix is the first letter
of the package file name for non-lib packages or "lib" plus the 4th letter of
the package file name for lib packages (eg, 'l' for less, 'libc' for libc6).
pkg_subdir is the root of the package file name, discarding the version and
architecture parts and the common suffixes '-dbg', '-dev', '-doc', '-staticdev',
'-locale' and '-locale-*' which are listed in meta/conf/bitbake.conf.

This change relies on recent patches to opkg-utils which support hierarchical
package feeds.

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_ipk.bbclass