summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-10-07opkg-make-index: print summary on it's own line0.3.4Alejandro del Castillo
The Description field on the Packages file doesn't follow the same format used on the Control file. It is incorrectly processing the summary line (it treats it as part of the longer description). Add code to print the summary line on it's own. Fixes issue 9238 Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-10-05opkg-build: Add a manpage in POD format.Andrew Shadura
Add a manpage for opkg-build and a corresponding Makefile snippet to build it using pod2man. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-10-05opkg-build: Add support for alternative compression schemes.Andrew Shadura
Add -Z with the same semantics as dpkg-deb -Z: Specify which compression type to use for data.tar member when building the package. Allowed values are gzip, bzip2 and xz. The default value is gzip. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-10-05opkg-build: Unify tabulation in the option parser.Andrew Shadura
Align case/esac options assuming tabulation size 8. Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-06-23opkg-utils: remove opkg-compare-versions implementationsAlejandro del Castillo
Currently, there are three compare-versions implementations: 1) opkg-utils: opkg-compare-versions.c 2) opkg-utils: opkg-compare-versions.sh 3) opkg: internal To avoid confusion and avoid maintaining three codebases, remove the compare-versions functionality from opkg-utils and only keep the implementation on the opkg binary. Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-06-03arfile.py: remove dependency on python-future0.3.2Alejandro del Castillo
Python-future provides a python2 compatible object class (provides next method). Since method is not used, remove dependency. Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-06-01opkg.py/write_packages_file: call __str__ instead of __repr__Alejandro del Castillo
Commit b9eec00a67f13ad9f9526caf591578b40d73a391 correctly renamed __repr__to __str__. A call site in write_packages_file was missed. Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-06-01migrate to python 3Alejandro del Castillo
General fixes * Add __future__ imports * Use print function instead of print statement * Use new style classes * Iterate over list, instead of over object.keys() * Use six.iteritems instead of iteritems() opkg.py: * Add conditional to decode string if needed in Package:read_control arfile.py * Add seekable method to FileSection class (needed by tarfile) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-05-10CONTRIBUTING: No longer need to Cc Paul BarkerAlejandro del Castillo
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-05-10opkg-build: return error if Version is missingAlejandro del Castillo
If Version is missing in a control file, opkg-build reports an error to stdout, but returns 0. Fix condition on pkg_appears_sane to properly return an error if Version is missing. Suggested-by: Thomas de Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2016-04-26opkg-build: re-do find/ls code to not fail on filenames with spacesDenys Dmytriyenko
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
2016-04-11opkg-build: Exit when fail to list files.Aníbal Limón
We have an issue when ls segfaults in some cases [1] so it's better to detect the failure at this level instead of continue the build process. [YOCTO #8926] [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8926#c0 Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-29opkg-utils: Add opkg-graph-depsHaris Okanovic
Usage: opkg-graph-deps [-h] [-d] [-o feed.dot] [-u <Base_feed_URL>] <Paths_to_Packages_files> Generates a dot formatted dependency graph of an IPK feed. The feed is specified by a list of IPK index (Packages) files, which are sourced in the order specified to build a dependency graph. Last index to declare a package wins, but also generates a warning to stderr. Only the flat index format is supported -- I.e. only Packages files, not Packages.gz files. Possible warnings: Duplicate package: package appears in more than one index. Broken dependency: no package satisfies a declared dependency. Self alias: package declares an alias on it's own name. Virtual-real alias: package attempts to provide a real package. Missing field: package is missing a required field. If a base feed URL is specified (-u), each node will include an 'href' to the associated IPK file. This is purely cosmetic. E.g. It can be used to create clickable links on a rendered graph. Using it has no effect on the set of packages or dependencies. It's assumed the specified base feed URL hosts the current working directory, so the resulting href's are generated by joining the base and a relative IPK path. The resulting feed graph is written to './feed.dot' or an alternate path specified by the caller. Nodes represent real packages (not aliases) and edges represent dependencies. Node attributes: (node name): Package name from feed index (without version or arch) label: [Package name] [ipkArchitecture] [ipkVersion] ipkArchitecture: Architecture name from feed index ipkVersion: The full version number from feed index ipkMissing: Set to "1" when the ipk is not actually in feed, but has one or inbound dependencies. href: URL to the IPK file. Only if optional base URL is specified. Edge attributes: (from) The package name declaring a dependency (to) The (de-aliased) package name (from) depends on ipkProvides: The alias of (to) which (from) depends on. Only set when the alias != (to). ipkBrokenDep: Set to "1" if (to) is missing from the feed. Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Reviewed-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2015-09-29opkg-utils: Fix crash on dependency errorHaris Okanovic
Fix crash on exception in opkg-show-deps when generating an 'unsatisfied dependency' error. process_dep() function was referencing a missing parameter `pkg`. Signed-off-by: Haris Okanovic <haris.okanovic@ni.com> Acked-by: Brad Mouring <brad.mouring@ni.com> Cc: Alejandro del Castillo <alejandro.delcastillo@ni.com> Cc: Paul Barker <paul@paulbarker.me.uk> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
2014-11-24update-alternatives: avoid double slash problemChen Qi
The link path stored by update-alternatives should always be absolute and so we do not need to add an additional slash when joining to $OPKG_OFFLINE_ROOT. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-11-15opkg-show-deps: Add comments to explain codePaul Barker
There was some confusion discussed on the mailing list about what the various loops in this script were doing. Comments are added to explain the behaviour, hopefully preventing any confusion in the future. Thanks to Pavel Zubarev for bringing this up and helping me to clarify what the current code is doing. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-11-15opkg-show-deps: properly interrupt rescursion during lookupPavel Zubarev
The outer loop is iterating over dependencies and the inner loop is iterating over the providers of those dependencies. So the 'continue' needs to act on the outer loop not the overall routine. Signed-off-by: Pavel Zubarev <pavel.zubarev@gmail.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-10-30update-alternatives: Installing fails for "["Jian Liu
Installing packages using update-alternatives will give the following error lines: sed: -e expression #1, char 41: unterminated address regex sed: -e expression #1, char 42: unterminated address regex This is caused by the script update-alternatives. "[" can not be used directly in sed expression, which should be escaped in sed expression. Signed-off-by: Jian Liu <jian.liu@windriver.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-06-05opkg-build: Fix spelling mistakePaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-06-05opkg-build: Fix logical error in commentPaul Barker
I knew what I meant, but hit commit too fast! Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-06-05opkg-build: Detect if tar supports '--format' optionThomas Ingleby
* Some options of GNU tar do not exist on other implementations Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com> Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-06opkg-update-index: Emit relative path to package filePaul Barker
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>
2014-05-06opkg-make-index: Recursively scan for packagesPaul Barker
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>
2014-05-06opkg.py: Allow filename to be a relative pathPaul Barker
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>
2014-05-06.gitignore: Ignore compiled python filesPaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-05-05opkg-compare-indexes: Fix usage messagePaul Barker
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>
2014-05-05.gitignore: Ignore vim swp filesPaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2014-03-01opkg-build: create dpkg-deb compatible ipks/opks againThilo Cestonaro
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>
2014-01-14update-alternatives: Script copied from opkgPaul Barker
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>
2013-12-20CONTRIBUTING: New filePaul Barker
Added instructions for potential contributors. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2013-12-03AUTHORS: New filePaul Barker
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
2013-03-26opkg-build: Remove bashism in sh scriptRichard Purdie
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>
2012-10-24opkg.py/opkg-build: fix creation of tar archivesSteffen Sledz
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>
2012-10-24opkg-make-index: fix mis-indented else:Marc Olzheim
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-07-19opkg.py: Add check_output defintion so it works on python 2.6Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-19Changed call to subprocess.check_output which isn't compatible with Python 2.6Chris Diamand
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>
2012-06-19Option "C" ist shown in usage() and implemented, but was missing in getopts. ↵Ondics Githubler
Added "C". Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-26opkg-make-index: disable filelist by defaultMartin Jansa
* user has to specify filename with -l to enable it Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg.py: get_file_list_dir: fix empty output from find if package disappersMartin Jansa
* 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>
2012-04-26opkg-make-index: generate complete filelistMartin Jansa
* 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>
2012-04-26opkg.py: improve test so it prints temporary control file with long ↵Martin Jansa
description and then reads it back Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg.py: use textwrap for description writingMartin Jansa
* 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>
2012-04-26opkg.py: fix write_package when called from main testMartin Jansa
* 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>
2012-04-26opkg.py: computeFileMD5 only when we have fn, otherwise fails to read None fileMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg.py: cast lines from controlfile as stringMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg-make-index: don't use stdout for Packages output and use __str__ ↵Martin Jansa
instead of __repr__ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26arfile: fix testMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg.py: catch TypeError when reading control file, to show which one is failingMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg.py: use string funtcions directly on string variableMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2012-04-26opkg-make-index: show OSError/IOErrorMartin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>