summaryrefslogtreecommitdiffstats
path: root/libopkg
Commit message (Collapse)AuthorAgeFilesLines
* fix a buffer overflow bug that causeticktock352009-01-192-4/+32
| | | | | | 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
* Making the status_file singleton, every package is using the same file,ticktock352009-01-091-25/+20
| | | | | | | | and it should be handled only once. Let status_file works (make the dest->status_file obsolete) git-svn-id: http://opkg.googlecode.com/svn/trunk@196 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg the config file dir to that one actually worksticktock352008-12-281-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@194 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* adding check_signature configticktock352008-12-286-61/+69
| | | | | | | | | 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
* adding --enable-curl configuation to configure.acticktock352008-12-272-0/+30
| | | | | | | | | | | Basically it apply opkg_wget.patch from OE but I add something to the configure.ac http://cgit.openembedded.net/cgit.cgi?url=openembedded/tree/packages/opkg/files/opkg_wget.patch&id=1bbdc74a5384c81d0bdeb96f6acdfef91430d35d Thanks Mike Westerhof <mwester@dls.net> git-svn-id: http://opkg.googlecode.com/svn/trunk@191 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* when configure with --disable-gpg, no message complain about the signature ↵ticktock352008-12-262-3/+1
| | | | | | stuff. git-svn-id: http://opkg.googlecode.com/svn/trunk@189 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* using hash_table reduce an O(n^2) algorithm to O(n)ticktock352008-12-191-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in strcmp analysis from gcov: Before: 507: 1386: old_files = pkg_get_installed_files(old_pkg); 507: 1387: new_files = pkg_get_installed_files(pkg); -: 1388: 5466: 1389: for (of = str_list_first(old_files); of; of = str_list_next -: 1390: pkg_t *owner; -: 1391: char *old, *new; 4959: 1392: old = (char *)of->data; 2963021: 1393: for (nf = str_list_first(new_files); nf; nf = str_list 2961464: 1394: new = nf->data; 2961464: 1395: if (strcmp(old, new) == 0) { 3402: 1396: niter = &nf; 3402: 1397: nf=str_list_next(new_files, nf); 3402: 1398: str_list_remove(new_files, niter); 3402: 1399: free(new); 3402: 1400: goto NOT_OBSOLETE; -: 1401: } After: 507: 1393: new_files_table.entries = NULL; 507: 1394: hash_table_init("new_files" , &new_files_table, 20); 8897: 1395: for (nf = str_list_first(new_files); nf; nf = str_list_next 8390: 1396: if (nf && nf->data) 8390: 1397: hash_table_insert(&new_files_table, nf->data, nf->da -: 1398: } -: 1399: 5466: 1400: for (of = str_list_first(old_files); of; of = str_list_next -: 1401: pkg_t *owner; -: 1402: char *old, *new; 4959: 1403: old = (char *)of->data; 4959: 1404: new = (char *) hash_table_get (&new_files_table, old); 4959: 1405: if (new) 4894: 1406: continue; git-svn-id: http://opkg.googlecode.com/svn/trunk@186 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* using list_head to handle the listticktock352008-12-1821-322/+296
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@185 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* only add pkg_vec_sort when neededticktock352008-12-162-5/+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-166-18/+16
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@183 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* remove some unnecessary code from pkg_vec_insertticktock352008-12-162-8/+6
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@182 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* introduce the active_list for searching.ticktock352008-12-165-3/+39
| | | | | | | introduce the active_list_sort git-svn-id: http://opkg.googlecode.com/svn/trunk@181 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: rename opkg_clone to pkg_t_to_opkg_package_t.ticktock352008-12-151-10/+10
| | | | | | | | It's more likely the functionality. git-svn-id: http://opkg.googlecode.com/svn/trunk@180 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: using active_list to list all the installed pkgs.ticktock352008-12-153-9/+36
| | | | | | | | adding function that allows node move from one list to another git-svn-id: http://opkg.googlecode.com/svn/trunk@178 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: using active list to list upgradeable pkgsticktock352008-12-156-28/+44
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@177 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: trivial adding some commentsticktock352008-12-152-1/+9
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@176 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: trivial rename old_pkg_to_new to pkg_clone as a more readable name.ticktock352008-12-151-10/+15
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@174 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: introduce active list into pkg_tticktock352008-12-153-2/+10
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@173 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: reinitial node of active_list after clearticktock352008-12-151-2/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@171 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: implment active_list_clear()ticktock352008-12-151-0/+15
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@170 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: implement active_list_prev and test cases.ticktock352008-12-152-7/+31
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@169 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: refactory active_list_next remove unnecessary field.ticktock352008-12-152-28/+12
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@168 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: active_list teststicktock352008-12-151-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@167 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: introduce the protype of active_listticktock352008-12-154-1/+423
| | | | | | | | This can be used for upgrade path git-svn-id: http://opkg.googlecode.com/svn/trunk@166 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fixing some trivial defects while reviewing codeticktock352008-12-152-3/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@165 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* adding list_upgradableticktock352008-12-156-33/+74
| | | | | | | | opkg: refactory the upgradable list git-svn-id: http://opkg.googlecode.com/svn/trunk@164 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: using calloc to replace the malloc, initialize varaiableticktock352008-12-151-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@163 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: trivial just indentticktock352008-12-151-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@162 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-1520-48/+75
| | | | | | | | | | 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: making hash_table_insert works as real hash_table.ticktock352008-12-151-1/+6
| | | | | | | | solving the update_file_ownership misbehaviour issue, and redundent installed files issue. git-svn-id: http://opkg.googlecode.com/svn/trunk@159 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: mark the pkg SF as !SF_FILELIST_CHANGED after write back.ticktock352008-12-151-0/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@158 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: trivial, clean up obsolete code, and some typoticktock352008-12-154-100/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@157 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: only cache the packagesticktock352008-12-151-5/+5
| | | | | | | | thanks Werner. git-svn-id: http://opkg.googlecode.com/svn/trunk@156 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: add a simple way to pass a path environment for pre/post scription ↵ticktock352008-12-155-4/+37
| | | | | | | | | | execution when in offline mode. Thanks for Christopher Hall <hsw@openmoko.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@155 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: adding cache supportticktock352008-12-156-2/+61
| | | | | | | | | | opkg-cl --cache <cache_directory> Thank for Werner git-svn-id: http://opkg.googlecode.com/svn/trunk@154 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* [opkg] fixing typo & incompatible part to gcc 4.3.2ticktock352008-12-154-6/+7
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@150 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Patch from rwhitby to follow 302 redirects properly.ticktock352008-12-151-0/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@149 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* [opkg] Remove the orphan packages while upgradingticktock352008-12-151-0/+55
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@147 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* [opkg] fix opkg crashes if PATH is unsetticktock352008-12-151-3/+14
| | | | | | | | Thanks for chgros git-svn-id: http://opkg.googlecode.com/svn/trunk@146 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* remove build error on gcc 3.4ticktock352008-12-153-1/+5
| | | | | | | | Thanks for jserv found and fix this. git-svn-id: http://opkg.googlecode.com/svn/trunk@145 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fix the crashing issue.ticktock352008-12-153-2/+13
| | | | | | | | | It's a hanging pointer. Using installed_files without get and free git-svn-id: http://opkg.googlecode.com/svn/trunk@144 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: mark one line that cause crash.ticktock352008-12-151-1/+2
| | | | | | | | But it will makes the system failed in reference count. git-svn-id: http://opkg.googlecode.com/svn/trunk@143 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: remove a serious memory leakticktock352008-12-151-1/+8
| | | | | | | | when searching every package opkg will clone the package but never released. git-svn-id: http://opkg.googlecode.com/svn/trunk@142 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: make .opk as the default opkg file extensionticktock352008-12-156-6/+8
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@141 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: balance the installed_files reference countticktock352008-12-153-0/+5
| | | | | | | | reducing some memory leaks git-svn-id: http://opkg.googlecode.com/svn/trunk@140 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: fix some memory leak and double free issues.ticktock352008-12-152-9/+17
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@139 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: Fix a bug that ap may undefined.ticktock352008-12-151-1/+3
| | | | | | | | by Alexandros Kostopoulos <akostop@inaccessnetworks.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@138 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: write the status change after actually updated.ticktock352008-12-151-0/+5
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@137 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* opkg: adding repository check functionticktock352008-12-152-0/+66
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@136 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358