summaryrefslogtreecommitdiffstats
path: root/libopkg
Commit message (Collapse)AuthorAgeFilesLines
* Don't clobber errno, so that we can provide a useful error message.graham.gower2009-11-121-2/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@288 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix parsing of Conffiles lines in status files.graham.gower2009-11-122-18/+10
| | | | | | | Also, add a leading space when writing out the status file such that the parser can recognise these lines as conf file lines. git-svn-id: http://opkg.googlecode.com/svn/trunk@287 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Cleanup version string handling.graham.gower2009-11-122-69/+44
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@286 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix leak when downgrading a package.graham.gower2009-11-121-0/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@285 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove a debugging fprintf I accidentally left in.graham.gower2009-11-101-3/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@284 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Cleanup parsing of packages.graham.gower2009-11-106-284/+312
| | | | | | | | | | This diff is loosely based on a patch by Jo-Philipp Wich <google@wwsnet.net> posted in the bugtracker (Issue #24). Peak memory consumption while parsing package lists is dramatically reduced. Thanks to Camille Moncelier for fixing problems after reallocing for long lines. git-svn-id: http://opkg.googlecode.com/svn/trunk@283 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Dead code removal.graham.gower2009-11-101-24/+7
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@282 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't try to rerun control scripts, problems caused by circular dependencies.graham.gower2009-11-101-0/+3
| | | | | | | | Symptoms of this problem are seeing the following when installing a package: opkg: (null): Bad address opkg: (null): Bad address git-svn-id: http://opkg.googlecode.com/svn/trunk@281 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Update name in copyrights + minor changespixdamix2009-11-102-9/+5
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@279 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Cleanup trim_alloc().graham.gower2009-11-102-19/+10
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@278 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove opkg_internal_use_only and fix associated assumptions RE pkg->provides.graham.gower2009-11-105-139/+19
| | | | | | | | | | | | | | | It appears that the opkg_internal_use_only provides string was introduced to bandaid over problems with assuming that the pkg->provides, pkg->provides_str and pkg->provides_count are all the same length. As each pkg provides itself, the pkg->provides array was one longer than the str and count fields. Most of the uses of pkg->provides did not take this into account. This behaviour has been changed. pkg->provides is now pkg->provides_count long and it is pkg->provides_str which is shorter by one. Associated dead code has also been removed. git-svn-id: http://opkg.googlecode.com/svn/trunk@277 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove the assumption that pkg fields have been allocated and need free()ing.graham.gower2009-11-101-101/+139
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@276 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Ensure that the hash_table messages show useful information.graham.gower2009-11-101-7/+7
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@275 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use xsystem() to be consistent. Some minor cleanup too.graham.gower2009-11-101-13/+10
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@274 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Put update temp directory in with the others. Also, don't confuse returninggraham.gower2009-11-061-6/+4
| | | | | | error codes with number of download failures. git-svn-id: http://opkg.googlecode.com/svn/trunk@273 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use mkdtemp() to create a unique directory instead of a goto loop.graham.gower2009-11-061-23/+19
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@272 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* More dead code removal.graham.gower2009-11-055-13/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@271 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove if (0 && ...) ... statements.graham.gower2009-11-051-5/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@270 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove more unused code.graham.gower2009-11-054-86/+25
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@269 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused function.graham.gower2009-11-052-27/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@268 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove dead code. We would segfault before following this code path.graham.gower2009-11-051-4/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@267 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove some bogus error checking and return void instead of int.graham.gower2009-11-055-19/+6
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@266 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Some refactoring of pathfinder supportpixdamix2009-11-054-17/+33
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@263 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Removed a bunch of if(0) and dead codepixdamix2009-11-054-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Applied this semantic patch: @@ statement S; @@ - if(0) S @@ @@ - remove_obsolete_maintainer_scripts(...) { - ... -} @@ @@ - remove_obsolete_maintainer_scripts(...); @@ identifier i; @@ -if(i){ -} git-svn-id: http://opkg.googlecode.com/svn/trunk@262 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add pathfinder support for certificate validationpixdamix2009-11-054-3/+159
| | | | | | | | | | | | | | | | | | From http://code.google.com/p/pathfinder-pki/ PathFinder is designed to provide a mechanism for any program to perform RFC3280-compliant path validation of X509 certificates, even when some of the intermediate certificates are not present on the local machine. By design, Pathfinder automatically downloads any such certificates from the Internet as needed using the AIA and CRL distribution point extensions of the certificates it is processing. It has the ability to do revocation status checking either using CRL or OCSP, or both. And, given the recent vulnerabilities that have rendered the MD5 algorithm highly suspect, it allows the administrator to choose to not validate certificates using that algorithm anywhere in the trust path. git-svn-id: http://opkg.googlecode.com/svn/trunk@261 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* These functions cannot fail, so return void.graham.gower2009-11-0412-76/+51
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@260 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/graham.gower2009-11-0421-219/+80
| | | | | | | 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
* Don't set PATH="/dev/null". Shuffle things around while here.graham.gower2009-11-041-31/+27
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@258 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove code path which cannot be executed.graham.gower2009-11-041-2/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@257 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* s/strndup/xstrndup/ - check memory allocations for failure.graham.gower2009-11-032-8/+8
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@256 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* s/strdup/xstrdup/ - check memory allocations for failure.graham.gower2009-11-0314-72/+64
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@255 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove some strdup abuse.graham.gower2009-11-034-21/+30
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@254 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove str_dup_safe() in favour of xstrdup() from libbb.graham.gower2009-11-035-29/+21
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@253 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused opkg_set_current_state bits.graham.gower2009-11-0310-142/+10
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@252 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Make `curl' an instance variable and ssl supportpixdamix2009-11-034-31/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds several new options - option ssl_ca_path /path/to/dir Tells curl to use the specified certificate directory to verify the peer. The certificates must be in PEM format, and the directory must have been processed using the c_rehash utility supplied with openssl. - option ssl_ca_file Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates - option ssl_key_type Tells curl the Private key file type. Specify which type your ssl_key provided private key is. PEM (default), DER and ENG (see option ssl_engine) are recognized types. - option ssl_cert_type Tells curl what certificate type the provided certificate is in. PEM (default), DER and ENG (see option ssl_engine) are recognized types. - option ssl_key & option ssl_cert Tells curl to use the specified certificate file and private key when getting a file with HTTPS - option ssl_key_passwd Passphrase for the private key - option ssl_engine Select the OpenSSL crypto engine to use for cipher operations. - option ssl_dont_verify_peer This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate. This makes all connections considered "insecure" fail unless ssl_dont_verify_peer is used. git-svn-id: http://opkg.googlecode.com/svn/trunk@251 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* The list-installed command does not exist.graham.gower2009-11-031-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@250 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove response_callback bits. Forgot to commit this before.graham.gower2009-11-032-25/+15
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@249 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove some code duplication, check for realloc failure.graham.gower2009-11-031-6/+9
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@248 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Clean up pkg_vec_insert.graham.gower2009-11-031-4/+8
| | | | | | | | - 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
* Remove prototype for deleted function.graham.gower2009-11-021-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@246 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Stop my eyes from bleeding.graham.gower2009-11-023-497/+111
| | | | | | | Testing shows that the info and status commands give the same output as before. If you find a case where they differ, please let me know. git-svn-id: http://opkg.googlecode.com/svn/trunk@245 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused callbacks, a legacy of the now removed ipkg API.graham.gower2009-11-023-74/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@244 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Stop using opkg_cb_message.graham.gower2009-11-022-18/+13
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@243 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Clean up some _cmd functions, in particular remove use of print callbacks.graham.gower2009-11-021-121/+34
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@242 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused code: if pkg was NULL, we would already have segfaulted.graham.gower2009-11-021-3/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@241 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fix nullpointer dereferencepixdamix2009-11-021-1/+1
| | | | | | Applied 011-fix_nullpointer_deref.patch from OpenWRT git-svn-id: http://opkg.googlecode.com/svn/trunk@240 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fix the -force_space optionpixdamix2009-11-021-0/+3
| | | | | | - 006-fix_force_space.patch from OpenWRT git-svn-id: http://opkg.googlecode.com/svn/trunk@239 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Cleanup error_list stuff a bit more.graham.gower2009-11-017-84/+60
| | | | | | | | | - Remove reverse_error_list. - Push messages on to the tail of the list. - Move the print function in with the other error list functions. - Indentation and variable name cleanups. git-svn-id: http://opkg.googlecode.com/svn/trunk@238 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Free memory if we fail to remove a package due to it having dependents.graham.gower2009-11-011-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@237 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Avoid reading past the end of the array.graham.gower2009-11-011-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@236 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358