libopkg: consider provided packages in pkg_vec_mark_if_matches() Also consider the list of provided abstract packages when testing the package vector for name matches. This fixes the "opkg whatdepends" command with abstract provided package arguments. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Fix typo in pkg_hash_fetch_best_installation_candidate. A (presumed) typo in pkg_hash_fetch_best_installation_candidate caused the matching_pkgs vec to be sorted twice, instead of sorting matching_apkgs. This fixes both the call and the API to match what appears to be intended. Signed-off-by: Michael Hansen <michael.j.hansen@hp.com> Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
libopkg: store checksums in binary form, use integer index for architecture Instead of storing a copy of the architecture string and architecture priority value in each pkg_t instance, declare a 3 bit wide field which allows referencing the architecture in the global config array by index. The 3 bit field allows referencing up to 8 different architectures which is more than enough for the systems we target with opkg. Another nice side effect is that we can coalesce this field with other flag values in pkg_t, saving 4 bytes for an int member. Also convert the hexadecimal checksums to binary format before storing them in pkg_t's blob buffer to save 50% of the space per checksum. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
pkg: use a blob buffer in pkg_t to store variable fields Adds infrastructure to use a blob buffer in pkg_t to store and retrieve optional dynamic fields. This reduces the size of the pkg_t structure itself and lays the ground work for further optimization. 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>
Allow blacklisting a package in the status file. To blacklist a particular package, add the following status entry for the package to be blacklisted: Status: deinstall hold not-installed Should fix the opkg end of Issue #46. OpenEmbedded will need to correctly prime the status file. git-svn-id: http://opkg.googlecode.com/svn/trunk@553 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Remove trailing whitespace. Sorry if this breaks your patches. git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Include config.h to pull in HAVE_* macros where needed. git-svn-id: http://opkg.googlecode.com/svn/trunk@505 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Initial stab at untangling the #include maze. Probably needs a second pass. git-svn-id: http://opkg.googlecode.com/svn/trunk@504 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Merge commit 'grg' into HEAD git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/ And redundant error checking removed from the places where allocation failures were actually checked. git-svn-id: http://opkg.googlecode.com/svn/trunk@259 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Remove some code duplication, check for realloc failure. git-svn-id: http://opkg.googlecode.com/svn/trunk@248 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Clean up pkg_vec_insert. - Check for realloc failure. - Don't cast an lvalue. - Remove unused counter. git-svn-id: http://opkg.googlecode.com/svn/trunk@247 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
move pkg_compare_name to pkg_vec and remove qsort in hash_get git-svn-id: http://opkg.googlecode.com/svn/trunk@183 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
remove some unnecessary code from pkg_vec_insert git-svn-id: http://opkg.googlecode.com/svn/trunk@182 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
opkg: using calloc to replace the malloc, initialize varaiable git-svn-id: http://opkg.googlecode.com/svn/trunk@163 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
opkg: adding the hash_table_remove API, not using yet. Just complete the API for future usage. Clean all the entry at initial time. This reduces planty of unnecessary check. In order to prevent this kind of bug, using calloc to replace most malloc git-svn-id: http://opkg.googlecode.com/svn/trunk@160 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
opkg: trivial, clean up obsolete code, and some typo git-svn-id: http://opkg.googlecode.com/svn/trunk@157 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
opkg: (leak fixing, day 2) lots and lots of memory leaks fixed git-svn-id: http://opkg.googlecode.com/svn/trunk@115 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
opkg: (leak fixing, day 1) lots and lots of memory leaks fixed git-svn-id: http://opkg.googlecode.com/svn/trunk@114 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358