summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'grg' into HEADgraham.gower2009-12-081-309/+276
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused parameter from pkg_hash_fetch_best_installation_candidate().graham.gower2009-11-271-2/+4
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@397 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove enum opkg_error.graham.gower2009-11-261-4/+2
| | | | | | | | The return codes aren't particularly useful and trying to have a useful one for every error scenario would be like extending errno. Good error messages via opkg_message() are far more appropriate. git-svn-id: http://opkg.googlecode.com/svn/trunk@395 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Be slightly less verbose by default.graham.gower2009-11-261-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@394 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Provide error checking for users of pkg_extract_* functions.graham.gower2009-11-261-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@391 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove str_util.{c,h}graham.gower2009-11-251-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@383 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Clean up opkg_depends_cmd() and opkg_what_depends_conflicts_cmd().graham.gower2009-11-241-132/+132
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@363 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Provide a more useful comment.graham.gower2009-11-241-2/+6
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@361 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove the purge command. Undocumented and only duplicates remove functionality.graham.gower2009-11-231-33/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@360 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove list_pending command. Undocumented and the pending_dir was unpopulated.graham.gower2009-11-231-41/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@359 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove dead code in opkg_remove_cmd().graham.gower2009-11-231-73/+33
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@358 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove useless memory allocation and strcpy.graham.gower2009-11-231-5/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@357 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Clean up the help output.graham.gower2009-11-231-0/+3
| | | | | | | | | | | | | - Don't print long options with a single dash. - Don't print commands with an underscore, ensure that it works with a dash. e.g. list-installed. - No wrapping on an 80 char wide terminal. - Incrementing the verbositiy was broken, so remove it. NOTE: Old commands/options still all work and some commands/options remain undocumented. git-svn-id: http://opkg.googlecode.com/svn/trunk@349 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix output of whatdepends, whatsuggests and whatrecommends commands.graham.gower2009-11-171-14/+15
| | | | | | Resolves Issue 23. git-svn-id: http://opkg.googlecode.com/svn/trunk@329 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix depends output.graham.gower2009-11-171-5/+5
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@327 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use vfork()/execvp() instead of system().graham.gower2009-11-161-1/+2
| | | | | | Parts based on a patch by Mike Westerhof for OpenEmbedded. git-svn-id: http://opkg.googlecode.com/svn/trunk@320 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix pkg_get_installed_files() to work with an offline_root + dest.graham.gower2009-11-161-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@318 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add a function for recursive directory removal and use that instead of xsystem.graham.gower2009-11-151-5/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@311 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Compare verbosity to a message_level_t.graham.gower2009-11-121-6/+4
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@293 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Cleanup the rest of pkg_parse.c. Give some functions more appropriate names too.graham.gower2009-11-121-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@289 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
* Removed a bunch of if(0) and dead codepixdamix2009-11-051-6/+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
* s/malloc/xmalloc/ s/calloc/xcalloc/ s/realloc/realloc/graham.gower2009-11-041-2/+2
| | | | | | | 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 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/strdup/xstrdup/ - check memory allocations for failure.graham.gower2009-11-031-9/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@255 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove some strdup abuse.graham.gower2009-11-031-1/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@254 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Stop my eyes from bleeding.graham.gower2009-11-021-7/+1
| | | | | | | 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
* 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
* 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
* Cleanup error_list stuff a bit more.graham.gower2009-11-011-25/+2
| | | | | | | | | - 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
* 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
* free() temporary string.graham.gower2009-11-011-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@232 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix problems in error listpixdamix2009-10-291-6/+11
| | | | | | | | | | push_error_list() should allocate the sizeof(struct) not sizeof(pointer to struct). And add some memory deallocation in error paths found while looking at this. git-svn-id: http://opkg.googlecode.com/svn/trunk@227 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Opkg support for smime (pkcs7) packages list signingticktock352009-10-271-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Camille Moncelier <moncelier@devlife.org> http://groups.google.com/group/opkg-devel/browse_thread/thread/6071ce290d5ceb77?utoken=qjR-TC0AAADKDldt5ZXsDDLs9sWCpWZI1zgeariQUwksg5ob1tmaFTCAL7MTcQRO6S85GfHgQ_k As promised :) here is a patch allowing opkg to authenticate a package list using smime and openssl instead of gpgme Example: Sign a package list: openssl smime -sign -in /path/to/repo/Packages \ -signer /root/server.pem -binary \ -outform PEM -out /path/to/repo/Packages.sig Configuration in /etc/opkg/opkg.conf option check_signature 1 option signature_ca_file /etc/serverCA.pem option signature_ca_path /path/to/certs/dir opkg update Downloading http://repo:8000/Packages Updated list of available packages in /usr/lib/opkg/lists/angstrom Downloading http://repo:8000/Packages.sig Signature check passed Package list corruption or MIM: Downloading http://repo:8000/Packages Updated list of available packages in /usr/lib/opkg/lists/angstrom Downloading http://repo:8000/Packages.sig Signature check failed Collected errors: * Verification failure Camille Moncelier http://devlife.org/ git-svn-id: http://opkg.googlecode.com/svn/trunk@221 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* reduce a memory leak of closing dirticktock352009-03-261-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@207 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Thanks to: Per Hansen <spamhans@yahoo.de>ticktock352009-01-241-1/+1
| | | | | | | | | | | | http://groups.google.com/group/opkg-devel/browse_thread/thread/20ca40ec1f6cec02 opkg install *.ipk An error ocurred, return value: -50512. BTW. This error message is not very helpful! git-svn-id: http://opkg.googlecode.com/svn/trunk@198 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* fix a buffer overflow bug that causeticktock352009-01-191-1/+2
| | | | | | http://code.google.com/p/opkg/issues/detail?id=3 git-svn-id: http://opkg.googlecode.com/svn/trunk@197 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* adding check_signature configticktock352008-12-281-28/+30
| | | | | | | | | default if off you can turn that on via adding one line in /etc/opkg/opkg.conf file + option check_signature 1 git-svn-id: http://opkg.googlecode.com/svn/trunk@193 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* when configure with --disable-gpg, no message complain about the signature ↵ticktock352008-12-261-2/+1
| | | | | | stuff. git-svn-id: http://opkg.googlecode.com/svn/trunk@189 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* using list_head to handle the listticktock352008-12-181-11/+9
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@185 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* only add pkg_vec_sort when neededticktock352008-12-161-3/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@184 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* move pkg_compare_name to pkg_vec and remove qsort in hash_getticktock352008-12-161-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@183 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: using active list to list upgradeable pkgsticktock352008-12-151-5/+5
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@177 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fixing some trivial defects while reviewing codeticktock352008-12-151-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@165 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* adding list_upgradableticktock352008-12-151-0/+22
| | | | | | | | opkg: refactory the upgradable list git-svn-id: http://opkg.googlecode.com/svn/trunk@164 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: remove the free_error_list wrong usage bugticktock352008-12-151-1/+1
| | | | | | | | Thanks for manitu git-svn-id: http://opkg.googlecode.com/svn/trunk@161 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: adding the hash_table_remove API, not using yet.ticktock352008-12-151-3/+3
| | | | | | | | | | 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] fixing typo & incompatible part to gcc 4.3.2ticktock352008-12-151-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@150 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358