The new relpath argument of the Package object constructor is used so that the
relative path from pkg_dir to the package file will be placed in the package
index. The allows the package file to be in a subdirectory of pkg_dir.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
The new 'relpath' argument to the initialiser of a Package object is used so
that file paths will be given relative to the base packages directory.
Paths are given relative to pkg_dir as that seems to make the most sense. It
certainly works when the 'Packages' file is written to pkg_dir. If the
'Packages' file is written elsewhere it is assumed that the user will know what
the paths are relative to. This is similar to debian feeds where the paths in a
'Packages' file is not stored in the packages pool but is stored in a separate
directory, yet paths are given relative to the common base of these directories.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
In order to support package files residing in a different directory to the
'Packages' index file, we need to allow filename entries in the index to be
relative paths. In order to not break existing code, filename remains the
basename of fn by default. However, if the new relpath argument is set then
filename is the path of fn relative to relpath.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
The usage message had the name of the program wrong.
If the number of arguments is not correct then the current code does not show
the usage message as indended. Instead it gives an index out of range error if
too few arguments are provided or silently ignores extra arguments. This code is
fixed so that the length of the arguments list is checked before arguments are
accessed, preventing errors and allowing the usage message to be shown
correctly.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
With a change from last august in dpkg-deb, the packages generated by opkg-build will not be accepted by dpkg-deb anymore.
The change disallows that the data.tar.gz is packed into the ipk/opk before the control.tar.gz.
For details have a look here:
http://anonscm.debian.org/gitweb/?p=dpkg/dpkg.git;a=commitdiff;h=547dca4c3ff23df5dfa554f1943b371cd7056ee4
For details which order is correct, see "man 5 deb", but in short it is:
debian-binary, control.tar.gz and data.tar.gz
Signed-off-by: Thilo Cestonaro <thilo@cestona.ro>
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
The update-alternatives script is being moved from opkg to opkg-utils to break
possible circular dependencies in openembedded. As opkg will depend on
libarchive soon, and may depend on other packages if certain options are
enabled, opkg cannot itself provide update-alternatives if its dependencies
require update-alternatives.
opkg-utils has minimal build-time dependencies and so is a good place to put the
update-alternatives script.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Otherwise this fills logs with output on systems with dash as /bin/sh,
we might as well execute cleanly.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Since openSUSE 12.2 the installed tar uses posix instead of gnu encoding
by default. This format is not fully supported by opkg and results in
ipk packages not installable at the target.
Collected errors:
* get_header_tar: Unknown typeflag: 0x78: Success.
* get_header_tar: Unknown typeflag: 0x78: Success.
* get_header_tar: Unknown typeflag: 0x78: Success.
* extract_archive: Don't know how to handle /var/lib/opkg/tmp/opkg-mg997m/chicken-bin-fGRvr4/PaxHeaders.17512/.: No such file or directory.
* get_header_tar: Unknown typeflag: 0x78: No such file or directory.
* get_header_tar: Unknown typeflag: 0x78: No such file or directory.
...
Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
subprocess.check_output is not present in Python 2.6. Since the return value
is not being used anyway, replace it with subprocess.call(), which is.
Signed-off-by: Chris Diamand <chris@diamand.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* if .ipk disappers before parsing Packages.old then it's fine and it's not used at all
* but if it disappers between parsing Packages.old and generating Packages.filelist then
it would fail to split() empty output
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* when '-l Packages.filelist' option is used together with '-r Packages.old',
then only 'new' packages are processed to create Packages.filelist
packages found in Packages.old doesn't have fn set so get_file_list()
was returning empty
* now added get_file_list_dir() looks for filename in pkg_dir and if it
finds correct .ipk file it will use that to read its filelist, but it
also means that it will always unpack *all* Packages - very slow.
* it would be nice to add new param for Packages.filelist.old and then
filter filelist for packages used from Packages.old and merge it
together with new Packages.filelist, but that's more difficult because
of files structure.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* description field in oe-core sometimes has extra line-feeds and is long
* extra line-feeds breaks read_control, because empty line means next Package
* long descriptions should be wrapped and properly indented, so they are parsed back properly
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* there is no self.meta_dir before self._setup_scratch_area
* control file needs to be closed before packing it with tar, otherwise it could be empty
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* Essentially, the problem is that arfile.py is splitting the ar header with
white-space instead of fixed-width fields, so two fields would get treated
as a single field. This makes things better than before as it now honors
the fixed field widths.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* The st_mtime attribute (which is a float) is compared against a value
from the timestamp database, which was stored as an integer there.
* When working on a filesystem with precise timestamps the comparision
will fail nearly everytime hence.
* Although it might be possible to enhance the database to store the
fractional part too, this will complicate things more than we would
gain by this change.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
* If we're building an image and some package rebuilds while this is
happening some package can be removed/added to the ipk deploy
directory. The image will not depend on this package so we can
safely ignore these cases rather than error out.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>