libopkg: implement lightweight package listing logic Instead of building a complete package dependency tree internally, use a lightweight list data structure to gather and sort package names, version and descriptions. This reduced the "opkg list" memory footprint on x86/64 from ~8MB to ~1.5MB. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg: support passing callbacks to feed parsing functions Extend pkg_hash_add_from_file(), pkg_hash_load_feeds() and pkg_hash_load_status_files() to accept a per-package callback function andan associated userdata pointer. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
opkg-cl: don't read feeds on opkg update Signed-off-by: Jo-Philipp Wich <jo@mein.io>
opkg: add --no-check-certificate argument For cases when artifacts are stored on https:// accessible locations and you don't want to install ca-certificates (for various reasons). I'll admit, using SSL like this is not recommended, but since wget (even uclient-fetch) allows the --no-check-certificate option, it would be nice for opkg to support setting it if needed/configured. Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
opkg: compare-versions doesn't need any state compare-versions doesn't need lock files created and databases opened, so don't. Signed-off-by: Ross Burton <ross.burton@intel.com>
libopkg: remove Curl support Signed-off-by: Jo-Philipp Wich <jo@mein.io>
opkg-cl: remove config.h reference Signed-off-by: Jo-Philipp Wich <jo@mein.io>
opkg-cl: add missing include to import FNM_CASEFOLD Signed-off-by: Jo-Philipp Wich <jo@mein.io>
opkg-cl: stop preloading package feeds on install Instead of unconditionally loading all package feed lists entirely into memory, let opkg_install_cmd() selectively parse the lists using the new pkg_hash_load_package_details() helper. This will result in a slightly longer runtime but dramatically reduces the memory requirements. On an x86_64 test system, the peak heap memory consumption during an "opkg install luci" dropped from 3.7 MB to about 360 KB, a decrease of roughly 90%. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg: support passing default state flags in pkg_hash_load_feeds() Add a new argument to pkg_hash_load_feeds() which allows specifying default state flags that should be applied to all loaded packages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
treewrite: use Lindent to reformat to kernel coding style Use the kernels "Lindent" script to reformat files using kernel coding style. This should make subsequent refactoring much easier. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement --size Implement a new switch "--size" which causes opkg to print the package size in the listing output. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement --lists-dir Add a new flag --lists-dir which allows setting the package feed list directory from command arguments. This is required to be able to use opkg without any configuration file. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement --force-signature Implement a new "--force-signature" flag which causes opkg to ignore signature verification errors. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement --force-checksum Introduce a new --force-checksum flag which allows installing packages even if the checksum does not match. This is useful for development and debugging. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement find command Introduce a new opkg "find" command which matches both the name and the description of packages. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: implement --nocase flag Introduce a new --nocase flag which causes all opkg pattern matching operations to ignore the case. This is useful to find packages with uppercase letters in their name. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: default to /etc/opkg.conf If neither --conf-file nor --offline-root are specified, default to the traditional /etc/opkg.conf location to retain compatibility with OpenWrt/LEDE. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
cli: enforce argument to upgrade command Blindly upgrading all upgradable packages usually brick the system, so disable support for argument-less upgrade commands for now. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
List some sub-commands that were missing from the --help output. git-svn-id: http://opkg.googlecode.com/svn/trunk@606 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358