Changeset 3879
- Timestamp:
- 01/18/08 12:28:48 (5 years ago)
- Location:
- trunk/src/target/ipkg
- Files:
-
- 48 edited
- 29 moved
-
AUTHORS (modified) (1 diff)
-
ChangeLog (modified) (91 diffs)
-
INSTALL (modified) (1 diff)
-
Makefile.am (modified) (4 diffs)
-
README (modified) (1 diff)
-
TODO (modified) (7 diffs)
-
args.c (modified) (8 diffs)
-
args.h (modified) (1 diff)
-
conffile.c (modified) (4 diffs)
-
conffile.h (modified) (1 diff)
-
conffile_list.c (modified) (1 diff)
-
configure.ac (modified) (3 diffs)
-
familiar/control-unstripped.in (modified) (2 diffs)
-
familiar/control.in (modified) (2 diffs)
-
familiar/libopkg-control.in (moved) (moved from trunk/src/target/ipkg/familiar/libipkg-control.in) (2 diffs)
-
familiar/libopkg-dev-control.in (moved) (moved from trunk/src/target/ipkg/familiar/libipkg-dev-control.in) (2 diffs)
-
file_util.c (modified) (2 diffs)
-
hash_table.c (modified) (5 diffs)
-
hash_table.h (modified) (1 diff)
-
intercept/depmod (modified) (1 diff)
-
intercept/ldconfig (modified) (1 diff)
-
intercept/update-modules (modified) (1 diff)
-
libbb/libbb.h (modified) (1 diff)
-
libbb/unarchive.c (modified) (3 diffs)
-
libopkg.c (moved) (moved from trunk/src/target/ipkg/libipkg.c) (27 diffs)
-
libopkg.h (moved) (moved from trunk/src/target/ipkg/libipkg.h) (3 diffs)
-
libopkg.pc.in (moved) (moved from trunk/src/target/ipkg/libipkg.pc.in) (1 diff)
-
md5.c (modified) (1 diff)
-
nv_pair.c (modified) (1 diff)
-
nv_pair_list.c (modified) (1 diff)
-
opkg-frontend.c (moved) (moved from trunk/src/target/ipkg/ipkg-frontend.c) (3 diffs)
-
opkg.c (moved) (moved from trunk/src/target/ipkg/ipkg.c) (7 diffs)
-
opkg.h (moved) (moved from trunk/src/target/ipkg/ipkg.h) (3 diffs)
-
opkg.h.in (moved) (moved from trunk/src/target/ipkg/ipkg.h.in) (3 diffs)
-
opkg_cmd.c (moved) (moved from trunk/src/target/ipkg/ipkg_cmd.c) (84 diffs)
-
opkg_cmd.h (moved) (moved from trunk/src/target/ipkg/ipkg_cmd.h) (2 diffs)
-
opkg_conf.c (moved) (moved from trunk/src/target/ipkg/ipkg_conf.c) (34 diffs)
-
opkg_conf.h (moved) (moved from trunk/src/target/ipkg/ipkg_conf.h) (4 diffs)
-
opkg_configure.c (moved) (moved from trunk/src/target/ipkg/ipkg_configure.c) (4 diffs)
-
opkg_configure.h (moved) (moved from trunk/src/target/ipkg/ipkg_configure.h) (2 diffs)
-
opkg_download.c (moved) (moved from trunk/src/target/ipkg/ipkg_download.c) (16 diffs)
-
opkg_download.h (moved) (moved from trunk/src/target/ipkg/ipkg_download.h) (2 diffs)
-
opkg_extract_test.c (moved) (moved from trunk/src/target/ipkg/ipkg_extract_test.c) (2 diffs)
-
opkg_hash_test.c (moved) (moved from trunk/src/target/ipkg/ipkg_hash_test.c) (2 diffs)
-
opkg_install.c (moved) (moved from trunk/src/target/ipkg/ipkg_install.c) (109 diffs)
-
opkg_install.h (moved) (moved from trunk/src/target/ipkg/ipkg_install.h) (2 diffs)
-
opkg_message.c (moved) (moved from trunk/src/target/ipkg/ipkg_message.c) (3 diffs)
-
opkg_message.h (moved) (moved from trunk/src/target/ipkg/ipkg_message.h) (2 diffs)
-
opkg_remove.c (moved) (moved from trunk/src/target/ipkg/ipkg_remove.c) (17 diffs)
-
opkg_remove.h (moved) (moved from trunk/src/target/ipkg/ipkg_remove.h) (2 diffs)
-
opkg_upgrade.c (moved) (moved from trunk/src/target/ipkg/ipkg_upgrade.c) (8 diffs)
-
opkg_upgrade.h (moved) (moved from trunk/src/target/ipkg/ipkg_upgrade.h) (2 diffs)
-
opkg_utils.c (moved) (moved from trunk/src/target/ipkg/ipkg_utils.c) (2 diffs)
-
opkg_utils.h (moved) (moved from trunk/src/target/ipkg/ipkg_utils.h) (2 diffs)
-
pkg.c (modified) (28 diffs)
-
pkg.h (modified) (5 diffs)
-
pkg_depends.c (modified) (12 diffs)
-
pkg_depends.h (modified) (1 diff)
-
pkg_dest.c (modified) (4 diffs)
-
pkg_dest.h (modified) (1 diff)
-
pkg_dest_list.c (modified) (1 diff)
-
pkg_extract.c (modified) (3 diffs)
-
pkg_hash.c (modified) (23 diffs)
-
pkg_hash.h (modified) (3 diffs)
-
pkg_parse.c (modified) (5 diffs)
-
pkg_src.c (modified) (1 diff)
-
pkg_src_list.c (modified) (1 diff)
-
pkg_vec.c (modified) (7 diffs)
-
pkg_vec.h (modified) (1 diff)
-
sprintf_alloc.c (modified) (1 diff)
-
str_list.c (modified) (1 diff)
-
str_util.c (modified) (1 diff)
-
update-alternatives (modified) (4 diffs)
-
user.c (modified) (3 diffs)
-
void_list.c (modified) (1 diff)
-
xregex.c (modified) (1 diff)
-
xsystem.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/ipkg/AUTHORS
r3837 r3879 1 ipkg actually is maintained by Pierluigi Frullani <pigi@frumar.it>1 opkg actually is maintained by Pierluigi Frullani <pigi@frumar.it> 2 2 3 ipkg is being written by Carl Worth <cworth@handhelds.org> and Steve3 opkg is being written by Carl Worth <cworth@handhelds.org> and Steve 4 4 Ayer <steven.ayer@compaq.com> 5 5 -
trunk/src/target/ipkg/ChangeLog
r3837 r3879 35 35 2006-02-02 pigi ( pigi@frumar.it) 36 36 * Version update to 0.99.158 37 * Modified the way upgrade handle the removing of a package, to be sure that ipkg doesn't break busybox upgrade37 * Modified the way upgrade handle the removing of a package, to be sure that opkg doesn't break busybox upgrade 38 38 * this should fix #1503 39 39 … … 56 56 * Version update to 0.99.155 57 57 * Added a function to remove the package that is being upgraded. 58 * Fixed a problem when installing by hand. Now ipkg knows that a package has been selected by hand,58 * Fixed a problem when installing by hand. Now opkg knows that a package has been selected by hand, 59 59 * and, if every check returns ok, it install the wanted package, instead of selecting one from feed. 60 60 * Moreover, now downgrade should works again. 61 * Fixed the "Replaces" bug. Now ipkg is able to replace a package also if it doesn't conflict.61 * Fixed the "Replaces" bug. Now opkg is able to replace a package also if it doesn't conflict. 62 62 * Other minor changes in debug options 63 63 … … 69 69 70 70 2005-07-29 pigi ( pigi@frumar.it) 71 * Applied a patch for the GNU tar compatibility . Now ipkg can handle filenames > 100 char.71 * Applied a patch for the GNU tar compatibility . Now opkg can handle filenames > 100 char. 72 72 73 73 2005-07-29 pigi ( pigi@frumar.it) 74 74 * Version update to 0.99.153 75 * Fixed a problem with Provides:. Now ipkg is able to install foo when foo is provided by bar, and is able to determine the best candidate based on75 * Fixed a problem with Provides:. Now opkg is able to install foo when foo is provided by bar, and is able to determine the best candidate based on 76 76 * package name. This also fix #1328 77 77 … … 90 90 2005-05-11 pigi ( pigi@frumar.it) 91 91 * Version update to 0.99.149 92 * Added the possibility to choice the ipkglibdir from configure ( --with-libipkgdir )92 * Added the possibility to choice the opkglibdir from configure ( --with-libopkgdir ) 93 93 94 94 2005-04-10 pigi ( pigi@frumar.it) … … 101 101 2005-03-30 pigi ( pigi@frumar.it) 102 102 * Version update to 0.99.147 103 * Found a bug in ipkg_install when freeing a cursor103 * Found a bug in opkg_install when freeing a cursor 104 104 105 105 2005-03-28 pigi ( pigi@frumar.it) 106 106 * Version update to 0.99.146 107 * Modified the ipkg_error messaging to collect all the messages at the end of the program107 * Modified the opkg_error messaging to collect all the messages at the end of the program 108 108 109 109 2005-03-26 pigi ( pigi@frumar.it) … … 112 112 2005-03-14 pigi ( pigi@frumar.it) 113 113 * Version update to 0.99.145 114 * Found a bug in ipkg remove when a package was depending in itself and ipkg where asked to "-recursive"114 * Found a bug in opkg remove when a package was depending in itself and opkg where asked to "-recursive" 115 115 This fix bug # 1301 116 116 * A very little beautify in args.c 117 117 118 118 2005-03-07 pigi ( pigi@frumar.it) 119 * Added the check for md5 in resolv_conf_file. Now ipkg ask for confirmation only it the files differ119 * Added the check for md5 in resolv_conf_file. Now opkg ask for confirmation only it the files differ 120 120 121 121 2005-02-22 pigi ( pigi@frumar.it) 122 122 * Version update to 0.99.144 123 * A little fix suggested by drw in ipkg_conf.c124 * Changed the ipkg.h to be build in automake for oe mechanism . This will enhance the building phase123 * A little fix suggested by drw in opkg_conf.c 124 * Changed the opkg.h to be build in automake for oe mechanism . This will enhance the building phase 125 125 by honouring the lib hierarchy choose by users 126 126 * Changes in automake to honour the new building mechanism … … 128 128 2005-02-20 pigi ( pigi@frumar.it) 129 129 * Version update to 0.99.143 130 * lib ipkg.h: reverting the previous modify131 * ipkg_conf.c: fixing a probable bug in list_dir that fix problems with opie-packagemanager ( tanks to drw for signaling)130 * libopkg.h: reverting the previous modify 131 * opkg_conf.c: fixing a probable bug in list_dir that fix problems with opie-packagemanager ( tanks to drw for signaling) 132 132 133 133 2005-02-20 pigi ( pigi@frumar.it) 134 * lib ipkg.h: added some define to fix the broken external interface after 0.99.139 and lists_dir134 * libopkg.h: added some define to fix the broken external interface after 0.99.139 and lists_dir 135 135 136 136 2005-02-17 pigi ( pigi@frumar.it) … … 143 143 2005-02-06 pigi ( pigi@frumar.it) 144 144 * Version update to 0.99.141 145 * Added space in ipkg_message to give more readible messages145 * Added space in opkg_message to give more readible messages 146 146 * Corrected a problem when creating the directories in pkg_dest_init 147 147 148 148 2005-02-05 pigi ( pigi@frumar.it) 149 149 * Version update to 0.99.140 150 * Fixed the bug in ipkg_conf for a wrong pointer.150 * Fixed the bug in opkg_conf for a wrong pointer. 151 151 152 152 2005-02-05 pigi ( pigi@frumar.it) 153 153 * Version update to 0.99.139 154 * Fixed the "replaces" problem reported by pb_. Now ipkg is able to resolve a "replace/conflict" reference154 * Fixed the "replaces" problem reported by pb_. Now opkg is able to resolve a "replace/conflict" reference 155 155 * Added the possibility to keep the lists file in a different location. Fullfill enh #1276 156 156 … … 164 164 165 165 2005-01-14 pigi ( pigi@frumar.it) 166 * ipkg_install.c: applied patch from rjt@cambridgebroadband.com to remove some c99ism166 * opkg_install.c: applied patch from rjt@cambridgebroadband.com to remove some c99ism 167 167 168 168 2005-01-14 jamey ( jamey@handhelds.org ) … … 192 192 * Added a new option for listing only the installed packages. Asked by pb_ but really important 193 193 * Little modification to autoconfigure.sh 194 * removed fileutils dependencies that has disappeared from 0.8 in control-cl.in control-unstripped.in lib ipkg-control.in194 * removed fileutils dependencies that has disappeared from 0.8 in control-cl.in control-unstripped.in libopkg-control.in 195 195 196 196 2004-11-18 pigi ( pigi@frumar.it) … … 206 206 * Version update to 0.99.131 207 207 * Added a lot of debug info in DEBUG2 208 * Added a check in ipkg_install.c to permit replacing of existing file when installing a package209 * from a file ( not an upgrade ) when ipkg find a file clash but the owner of the package is the208 * Added a check in opkg_install.c to permit replacing of existing file when installing a package 209 * from a file ( not an upgrade ) when opkg find a file clash but the owner of the package is the 210 210 * same. That should fix the #1246 211 211 … … 219 219 2004-09-01 pigi ( pigi@frumar.it) 220 220 * Applied patches from pb_ (bug #1244) 221 * Added EXTRADIST = ipkg.c and others in Makefile.am as in ipkg.0.99.xxx.tar.gz the ipkg.c was missing. (221 * Added EXTRADIST = opkg.c and others in Makefile.am as in opkg.0.99.xxx.tar.gz the opkg.c was missing. ( 222 222 reported by odvard12@yahoo.com ) 223 223 * Version update to 0.99.129 … … 225 225 2004-08-19 Florian <florian.boor@kernelconcepts.de> 226 226 * Version update to 0.99.128 227 * lib ipkg.c, ipkg_cmd.c: Fixed return value zero if installation227 * libopkg.c, opkg_cmd.c: Fixed return value zero if installation 228 228 failed. Changed text because failing to install a package 229 229 is not necessarily a bug :-) … … 245 245 2004-06-12 florian <florian.boor@kernelconcepts.de> 246 246 * Makefile.am: Added some missing headers to the list. 247 * lib ipkg.pc.in: Fixed hardcoded prefix... tsts247 * libopkg.pc.in: Fixed hardcoded prefix... tsts 248 248 2004-06-12 pigi ( pigi@frumar.it) 249 249 * pb_ patch for setuid bit in unarchive … … 256 256 * configure.ac: updated to 0.99.124 257 257 * import the kergoth patch for Makefile.am to fix the linking problems on arch <> arm 258 * added the ipkg remove <regexp> feature.259 * fixed the ipkg usage message, 'cause in "ifdef LIBIPKG" we don't have the ipkg info field version.258 * added the opkg remove <regexp> feature. 259 * fixed the opkg usage message, 'cause in "ifdef LIBOPKG" we don't have the opkg info field version. 260 260 * added the message "No package removed" if no package has been removed. This to avoid misunderstanding 261 261 with the successfully done message at the exit of execution. … … 265 265 2004-05-16 pigi ( pigi@frumar.it) 266 266 * configure.ac: updated to 0.99.122-2 267 * New subrelease released to correct the problem for dependencies (lib ipkg >= 0.99.122-1) in ipkg control file267 * New subrelease released to correct the problem for dependencies (libopkg >= 0.99.122-1) in opkg control file 268 268 2004-05-14 pigi ( pigi@frumar.it) 269 269 * configure.ac: updated to 0.99.122-1 … … 272 272 2004-05-10 pigi ( pigi@frumar.it) 273 273 * configure.ac: updated to 0.99.122 274 * pb_, cworth and I discussed a bit on ipkg output to users. We agreed on removing some confusing274 * pb_, cworth and I discussed a bit on opkg output to users. We agreed on removing some confusing 275 275 * messages, moving them to a debug level of verbosity. 276 * I do added also some message to user indicating the phase ipkg is in, and a global ending message276 * I do added also some message to user indicating the phase opkg is in, and a global ending message 277 277 * informing the user for the status of operation. 278 278 * This fixes the #1206, and hopefully does not introduce others ;-) … … 296 296 2004-03-17 pigi ( pigi@frumar.it) 297 297 * Added the implement for Essential in status file. This is needed to avoid the unintentional remove 298 of essential packages. In effect the command " ipkg remove ipkg" worked without problems, but then298 of essential packages. In effect the command "opkg remove opkg" worked without problems, but then 299 299 it was difficult to reinstall. This fix the bug # 867 300 300 2004-03-15 jamey <jamey@handhelds.org> … … 313 313 This fixes the bug #1099 314 314 2004-03-07 pigi ( pigi@frumar.it) 315 * Minimal changes for a clean compile in lib ipkg.c ( so we can close the bug# 1119 )315 * Minimal changes for a clean compile in libopkg.c ( so we can close the bug# 1119 ) 316 316 2004-03-03 pigi ( pigi@frumar.it) 317 317 * Missing \n in Size and Source Fields. 318 318 2004-03-03 pigi ( pigi@frumar.it) 319 * Florian noticed a free missiing in ipkg_cmd.c ( should sleep more at night )319 * Florian noticed a free missiing in opkg_cmd.c ( should sleep more at night ) 320 320 it was in an (almost) unsed part of the code ( old code ) but, just in case... 321 321 * Changed a comment in pkg.c ( it was in italian ) and added a bit of explain in … … 324 324 * configure.ac: updated to 0.99.116 325 325 * pkg.h: from Pigi: pkg_formatted_info and pkg_formatted_field now allocate the strings they fill in 326 * pkg.c, ipkg_cmd.c: from Pigi: updated to the new pkg.h interface326 * pkg.c, opkg_cmd.c: from Pigi: updated to the new pkg.h interface 327 327 2004-02-29 florian <florian.boor@kernelconcepts.de> 328 328 pkg.c: Pigi and me poked around a little bit and located the cause of … … 333 333 2004-02-24 jamey <jamey@handhelds.org> 334 334 * configure.ac: updated to 0.99.115 335 * ipkg_cmd.c: segv caught by pigi: buffer freed in loop but used on next iterations. bug squashed.335 * opkg_cmd.c: segv caught by pigi: buffer freed in loop but used on next iterations. bug squashed. 336 336 * user.c: realloc question buffer if it is too short so that messages are not truncated. 337 337 2004-02-20 jamey <jamey@handhelds.org> … … 340 340 2004-02-19 jamey <jamey.hicks@hp.com> 341 341 * configure.ac: update to 0.99.113 342 * lib ipkg.c: patch from drw to fix ipkg list342 * libopkg.c: patch from drw to fix opkg list 343 343 2004-02-19 florian <florian.boor@kernelconcepts.de> 344 344 * Some minor changes to make code compile on more compilers. … … 351 351 2004-01-23 florian <florian.boor@kernelconcepts.de> 352 352 * Applied Dan's patch that adds a package download command to 353 lib ipkg.353 libopkg. 354 354 2004-01-20 florian <florian.boor@kernelconcepts.de> 355 355 * Applied Dan's changes to work incuded from a C++ app. 356 356 2004-01-15 jamey 357 357 * configure.ac: updated to 0.99.110 358 * lib ipkg.c: added default callbacks for output359 * ipkg_conf.c: default verbosity to 1358 * libopkg.c: added default callbacks for output 359 * opkg_conf.c: default verbosity to 1 360 360 2004-01-12 jamey 361 361 * configure.ac: updated to 0.99.109 362 * ipkg_install.c: fix potential segv sprintf_alloc with fewer args than required by format string (yay valgrind)362 * opkg_install.c: fix potential segv sprintf_alloc with fewer args than required by format string (yay valgrind) 363 363 * sprintf_alloc.c: add null pointer checking 364 364 2004-01-12 jamey 365 365 * configure.ac: updated to 0.99.108 366 * Makefile.am, familiar/: use ipkg-cl as default executable, install as ipkg via update-alternatives366 * Makefile.am, familiar/: use opkg-cl as default executable, install as opkg via update-alternatives 367 367 2004-01-12 jamey 368 368 * configure.ac: updated to 0.99.107 … … 373 373 374 374 2003-12-02 florian <florian.boor@kernelconcepts.de> 375 * Added familiar/ ipkg-cl.control.in, which is a prototype of376 control file for ipkg-cl package creation.375 * Added familiar/opkg-cl.control.in, which is a prototype of 376 control file for opkg-cl package creation. 377 377 2003-12-01 florian <florian.boor@kernelconcepts.de> 378 * added ipkg command line tool using libipkg, binary is known as ipkg-cl379 * ipkg-frontend.c: source for this tool378 * added opkg command line tool using libopkg, binary is known as opkg-cl 379 * opkg-frontend.c: source for this tool 380 380 * libbb/Makefile.am: Removed changing of CFLAGS, this avoids a nasty warning. 381 * Makefile.am: Same fix and addition of new target creating ipkg-cl.381 * Makefile.am: Same fix and addition of new target creating opkg-cl. 382 382 * removed ltmain.sh, libtool which seem to be created by autostuff 383 383 384 384 2003-12-01 jamey 385 385 * configure.ac: updated to 0.99.106 386 * pkg.c, ipkg_conf.c: check for null pointers (null pkg->dest in particular)386 * pkg.c, opkg_conf.c: check for null pointers (null pkg->dest in particular) 387 387 2003-11-11 jamey 388 388 * configure.ac: updated to 0.99.105 389 * ipkg_conf.c: added verbosity option to conf file389 * opkg_conf.c: added verbosity option to conf file 390 390 2003-11-11 jamey 391 391 * configure.ac: updated to 0.99.104 392 * ipkg_install.c: removed spurious calls to fflush, remove obsolete maintainer scripts on upgrade393 * ipkg_remove.c: remove unused function: remove_conffiles392 * opkg_install.c: removed spurious calls to fflush, remove obsolete maintainer scripts on upgrade 393 * opkg_remove.c: remove unused function: remove_conffiles 394 394 2003-11-11 jamey 395 395 * configure.ac: updated to 0.99.103 396 * lib ipkg.pc.in, configure.ac: pkgconfig for libipkg397 * ipkg_conf.c, pkg.c: check for error on fopen396 * libopkg.pc.in, configure.ac: pkgconfig for libopkg 397 * opkg_conf.c, pkg.c: check for error on fopen 398 398 * pkg_hash.c: reduced verbosity 399 399 * libtool: arm-linux-strip does not support --strip-debug on .a files 400 400 2003-11-10 jamey 401 401 * configure.ac: updated to 0.99.102 402 * ipkg_cmd.c: compute architecture_priority of packages in database before doing download command403 * conffile.c file_util.[ch] ipkg_install.c: better separation of installation root filenames and actual filenames402 * opkg_cmd.c: compute architecture_priority of packages in database before doing download command 403 * conffile.c file_util.[ch] opkg_install.c: better separation of installation root filenames and actual filenames 404 404 * pkg.h: added prototype for pkg_free_installed_files 405 405 2003-11-10 jamey 406 406 * configure.ac: updated to 0.99.101 407 * lib ipkg changes407 * libopkg changes 408 408 * generate .list files from file_hash 409 409 2003-11-05 jamey 410 410 * configure.ac: updated to 0.99.100 411 * ipkg_install.c: fix segv: was passing conflictee->parent instead of conflictee411 * opkg_install.c: fix segv: was passing conflictee->parent instead of conflictee 412 412 2003-10-08 jamey 413 413 * configure.ac: updated to 0.99.99 414 * ipkg_install.c: use the root_dir after stripping off offline_root prefix414 * opkg_install.c: use the root_dir after stripping off offline_root prefix 415 415 2003-10-08 jamey 416 416 * configure.ac: updated to 0.99.98 417 417 * pkg_hash.c: fixed segv if replaced_by->len was 0 418 * ipkg_cmd.c: ipkg remove with no arguments will remove non-user leaf packages419 * ipkg_remove.[ch]: export pkg_has_installed_dependents418 * opkg_cmd.c: opkg remove with no arguments will remove non-user leaf packages 419 * opkg_remove.[ch]: export pkg_has_installed_dependents 420 420 * pkg_depends.c: add pkg->parent to pkg->provides 421 * ipkg_install.c: strip offline_root prefix off of conffile name so comparing the md5sums should work421 * opkg_install.c: strip offline_root prefix off of conffile name so comparing the md5sums should work 422 422 * pkg.c: missing comma added 423 423 2003-10-01 jamey 424 424 * configure.ac: updated to 0.99.97 425 * ipkg_cmd.c: added whatdependsrec command to show what recursively depends on a package or packages425 * opkg_cmd.c: added whatdependsrec command to show what recursively depends on a package or packages 426 426 * pkg_vec.[ch]: added pkg_vec_clear_marks and pkg_vec_mark_if_matches 427 427 * args.c: usage string updated 428 428 2003-09-28 jamey 429 429 * configure.ac: updated to 0.99.96 430 * ipkg_conf.c: adjusted verbosity431 * ipkg_install.c: only remove replacee if it is also conflicted, per debian standard430 * opkg_conf.c: adjusted verbosity 431 * opkg_install.c: only remove replacee if it is also conflicted, per debian standard 432 432 * pkg_depends.c: only add to replaced_by if it also conflicts, per debian standard 433 433 added pkg_provides, pkg_replaces, pkg_conflicts … … 435 435 2003-09-28 jamey 436 436 * configure.ac: updated to 0.99.95 437 * args.[ch], ipkg_cmd.c, ipkg_conf.[ch], ipkg_download.c, ipkg_install.c, ipkg_remove.c, pkg.[ch]:438 Implemented -test mode for ipkg.437 * args.[ch], opkg_cmd.c, opkg_conf.[ch], opkg_download.c, opkg_install.c, opkg_remove.c, pkg.[ch]: 438 Implemented -test mode for opkg. 439 439 2003-09-28 jamey 440 440 * configure.ac: updated to 0.99.94 … … 443 443 2003-09-26 jamey 444 444 * configure.ac: updated to 0.99.93 445 * ipkg_install.c: corrected message level depending on conf->force_depend446 * ipkg_conf.c: check for duplicate src entries445 * opkg_install.c: corrected message level depending on conf->force_depend 446 * opkg_conf.c: check for duplicate src entries 447 447 * nv_pair_list.[ch]: added nv_pair_list_find 448 448 2003-09-16 jamey … … 463 463 * pkg_extract.c: use installed_file list if it exists in pkg_extract_data_file_names_to_file 464 464 * pkg.[ch]: added pkg_write_filelist() and pkg_write_changed_filelists() 465 * ipkg_remove.c: do not call ipkg_conf_write_status_files from ipkg_remove466 * ipkg_install.c: use ipkg_write_filelist()465 * opkg_remove.c: do not call opkg_conf_write_status_files from opkg_remove 466 * opkg_install.c: use opkg_write_filelist() 467 467 * ipgk_cmd.c: after writing status file, write any changed pkg filelists 468 468 2003-08-20 11:02 jamey … … 472 472 * configure.ac: updated to 0.99.88 473 473 * pkg_hash: bug 942, declare internal induction variable 474 * ipkg_cmd.c, ipkg_conf.[ch], pkg_src.[ch], pkg_src_list.[ch]: bug 604, support Packages.gz474 * opkg_cmd.c, opkg_conf.[ch], pkg_src.[ch], pkg_src_list.[ch]: bug 604, support Packages.gz 475 475 2003-08-06 18:34 jamey 476 476 * configure.ac: updated to 0.99.87 … … 480 480 2003-07-11 18:34 jamey 481 481 * configure.ac: updated to 0.99.86 482 * ipkg.h, ipkg_cmd.c, ipkg_configure.c, ipkg_install.c, ipkg_remove.c: only write status file if something changed.482 * opkg.h, opkg_cmd.c, opkg_configure.c, opkg_install.c, opkg_remove.c: only write status file if something changed. 483 483 2003-07-11 18:34 jamey 484 484 * configure.ac: updated to 0.99.85 485 485 * pkg.c, pkg.h, pkg_depends.c, pkg_depends.h, pkg_parse.c: bug 885: 486 486 add recommends and suggests 487 * args.c, ipkg_cmd.c, ipkg_cmd.h: add ipkg configure command487 * args.c, opkg_cmd.c, opkg_cmd.h: add opkg configure command 488 488 * pkg_vec.c: apply patch for bug 883 489 489 2003-05-11 Jamey Hicks <jamey@handhelds.org> 490 490 * configure.ac: updated to 0.99.84 491 * pkg.c, ipkg-compare-versions.c: fix problem where . and - were not treated as separators in version comparison491 * pkg.c, opkg-compare-versions.c: fix problem where . and - were not treated as separators in version comparison 492 492 2003-04-11 Jamey Hicks <jamey@handhelds.org> 493 493 * configure.ac: updated to 0.99.83 494 * ipkg_install.c: use pkg->installed_size instead of pkg->size495 * ipkg_cmd.c, ipkg_conf.c: put lists under offline_root if specified494 * opkg_install.c: use pkg->installed_size instead of pkg->size 495 * opkg_cmd.c, opkg_conf.c: put lists under offline_root if specified 496 496 2003-04-11 Jamey Hicks <jamey@handhelds.org> 497 497 * configure.ac: updated to 0.99.82 … … 508 508 * configure.ac: updated to 0.99.79 509 509 * pkg_hash.c: default architecture to host_cpu if unspecified 510 * ipkg_install.c, ipkg_download.c: refuse to install package with no architecture510 * opkg_install.c, opkg_download.c: refuse to install package with no architecture 511 511 2003-04-07 Jamey Hicks <jamey@handhelds.org> 512 512 * configure.ac: updated to 0.99.78 513 * args.[ch], ipkg_conf.[ch]: added query_all (-A)514 * ipkg_cmd.c: finished implementing whatdepends, whatrequires, whatprovides, and whatconflicts513 * args.[ch], opkg_conf.[ch]: added query_all (-A) 514 * opkg_cmd.c: finished implementing whatdepends, whatrequires, whatprovides, and whatconflicts 515 515 2003-04-03 Jamey Hicks <jamey@handhelds.org> 516 516 * configure.ac: updated to 0.99.77 517 * ipkg_cmd.c: implemented whatdepends518 * ipkg_conf.c: fixed typo517 * opkg_cmd.c: implemented whatdepends 518 * opkg_conf.c: fixed typo 519 519 2003-04-03 Jamey Hicks <jamey@handhelds.org> 520 520 * configure.ac: updated to 0.99.76 521 521 * args.c: was zeroing args structure too late 522 * ipkg_conf.c: test for existence of /etc/ipkg.conf before trying to load it522 * opkg_conf.c: test for existence of /etc/opkg.conf before trying to load it 523 523 2003-04-03 Jamey Hicks <jamey@handhelds.org> 524 524 * configure.ac: updated to 0.99.75 … … 527 527 2003-04-03 Jamey Hicks <jamey@handhelds.org> 528 528 * configure.ac: updated to 0.99.74 529 * ipkg_cmd.c: avoid segv by only calling xregfree after xregcomp was called529 * opkg_cmd.c: avoid segv by only calling xregfree after xregcomp was called 530 530 * pkg_hash.c: prefer pkgs that are marked hold/prefer, next 531 531 abstract pkgs that are installed, next latest pkg if one provider, … … 540 540 * configure.ac: updated to 0.99.71 541 541 * pkg.c: Added pkg_name_version_and_architecture_compare and abstract_pkg_name_compare 542 * ipkg_cmd.c: allow multiple fields for info and status command.542 * opkg_cmd.c: allow multiple fields for info and status command. 543 543 Allow posix regexp's for package name in status, info, and list 544 544 commands. … … 548 548 2003-04-02 Jamey Hicks <jamey@handhelds.org> 549 549 * configure.ac: updated to 0.99.70 550 * args.c, args.h, ipkg_conf.c, ipkg_conf.h, ipkg_install.c: implemented nodeps option550 * args.c, args.h, opkg_conf.c, opkg_conf.h, opkg_install.c: implemented nodeps option 551 551 * pkg_vec.[ch]: added [abstract_]pkg_vec_{contains,sort} 552 552 * pkg.c: print which script not being run in offline root mode … … 554 554 * configure.ac: updated to 0.99.69 555 555 * pkg_vec.c: compare architecture to architecture, not to name 556 * ipkg_utils.c: do not exit, instead return NULL557 * ipkg_install.c: do not exit, instead return -EINVAL558 * ipkg_download.c: make sure to set pkg dest559 * ipkg_cmd.c: notice instead of info for writing status file message556 * opkg_utils.c: do not exit, instead return NULL 557 * opkg_install.c: do not exit, instead return -EINVAL 558 * opkg_download.c: make sure to set pkg dest 559 * opkg_cmd.c: notice instead of info for writing status file message 560 560 2003-04-02 Jamey Hicks <jamey@handhelds.org> 561 561 * configure.ac: updated to 0.99.68 … … 563 563 2003-04-01 Jamey Hicks <jamey@handhelds.org> 564 564 * configure.ac: updated to 0.99.67 565 * ipkg_install.c: one last check for supported architecture in ipkg_install_pkg565 * opkg_install.c: one last check for supported architecture in opkg_install_pkg 566 566 * pkg.c: make pkg_print_field less fragile by using strcasecmp, 567 567 added support to print Conflicts 568 568 * pkg_hash.c: if multiple candidates with right architecture 569 569 satisfy constraint_fcn, return latest version 570 * ipkg_cmd.c: when verbosity > 1, show if conffiles have been570 * opkg_cmd.c: when verbosity > 1, show if conffiles have been 571 571 modified in info command 572 572 * hash_table.c, hash_table.h: count number of elements in hash … … 581 581 2003-04-01 Jamey Hicks <jamey@handhelds.org> 582 582 * configure.ac: updated to 0.99.65 583 * ipkg_cmd.c, ipkg_conf.c: applied ipkg dest installation patch from Ben Lau <benlau@linux.org.hk>584 * ipkg_cmd.c: fixed probably segv when using offline_root, fixed problem installing from local file.585 * ipkg_conf.c:586 - Do not add default architectures if ipkg configuration files include architecture definitions.587 - Look for /etc/ ipkg/*.conf under offline root if using offline root mode583 * opkg_cmd.c, opkg_conf.c: applied opkg dest installation patch from Ben Lau <benlau@linux.org.hk> 584 * opkg_cmd.c: fixed probably segv when using offline_root, fixed problem installing from local file. 585 * opkg_conf.c: 586 - Do not add default architectures if opkg configuration files include architecture definitions. 587 - Look for /etc/opkg/*.conf under offline root if using offline root mode 588 588 * void_list.h: added void_list_empty() 589 589 * nv_pair_list.h: added nv_pair_list_empty() 590 590 2003-03-28 14:30 Jamey Hicks <jamey@handhelds.org> 591 591 * configure.ac: 0.99.64 592 * pkg_hash.c: change fprintf stderr to ipkg_message592 * pkg_hash.c: change fprintf stderr to opkg_message 593 593 * pkg.h: added SF_MARKED and abstract_pkg_t state_flag field 594 594 * pkg.c: include Provides, Replaces, and Architecture in status 595 595 file 596 * ipkg_remove.c: make sure to print each dependent package only596 * opkg_remove.c: make sure to print each dependent package only 597 597 once 598 * ipkg_message.h: added IPKG_DEBUG2599 * ipkg_install.c: modify message and level depending on598 * opkg_message.h: added OPKG_DEBUG2 599 * opkg_install.c: modify message and level depending on 600 600 force_depends 601 * ipkg_cmd.c: call pkg_info_preinstall_check before any601 * opkg_cmd.c: call pkg_info_preinstall_check before any 602 602 install/upgrade/remove action 603 603 * ChangeLog, autoconfigure.sh, includes.h, 604 ipkg_conf.c, ipkg_remove.c, pkg.c, pkg.h, update-alternatives,604 opkg_conf.c, opkg_remove.c, pkg.c, pkg.h, update-alternatives, 605 605 xregex.h: applied kergoth's update-alternatives patch 606 * ipkg_cmd.c, ipkg_remove.c: remove maybe_broken_removal... which606 * opkg_cmd.c, opkg_remove.c: remove maybe_broken_removal... which 607 607 was an expensive no-op; before removing package, make sure that 608 608 nothing is installed that depends on the apkgs **provided** by a … … 613 613 2003-03-27 18:26 jamey 614 614 * autoconfigure.sh: accidentally committed /usr/local/bin calls 615 * ipkg_conf.c: needed a strdup, set default verbosity back to 0615 * opkg_conf.c: needed a strdup, set default verbosity back to 0 616 616 * familiar/postinst: default architecture priorities 617 * Makefile.in, autoconfigure.sh, ipkg_cmd.c, ipkg_conf.c, pkg.c:617 * Makefile.in, autoconfigure.sh, opkg_cmd.c, opkg_conf.c, pkg.c: 618 618 both name and value in nv_pair_list must be actual strings 619 619 * pkg_hash.c: do not try to invoke NULL constraint_fcn 620 * ipkg_install.c: added file_hash_{set,get}_file_owner, created620 * opkg_install.c: added file_hash_{set,get}_file_owner, created 621 621 check_downgrade 622 * ipkg_conf.c, ipkg_conf.h, ipkg_remove.c, pkg.c, pkg_hash.c,622 * opkg_conf.c, opkg_conf.h, opkg_remove.c, pkg.c, pkg_hash.c, 623 623 pkg_hash.h: added file_hash_{set,get}_file_owner 624 624 * hash_table.c: check for key already being present in 625 625 hash_table_insert 626 626 * configure.ac: update to 0.99.63 627 * ipkg_hash_test.c: update due to new prototypes628 * ipkg_conf.c: missed a conversion from str_list to nv_pair_list629 * ipkg_install.c: minor tweaks627 * opkg_hash_test.c: update due to new prototypes 628 * opkg_conf.c: missed a conversion from str_list to nv_pair_list 629 * opkg_install.c: minor tweaks 630 630 * pkg.c, pkg.h: added pkg_info_preinstall_check to update 631 631 pkg->arch_priority … … 633 633 pkg_hash_fetch_best_installation_candidate in 634 634 pkg_hash_fetch_unsatisfied_dependencies 635 * pkg_hash.c, pkg_hash.h, ipkg_cmd.c, ipkg_upgrade.c: split635 * pkg_hash.c, pkg_hash.h, opkg_cmd.c, opkg_upgrade.c: split 636 636 pkg_hash_fetch_best_installation_candidate into a by name and a 637 637 constrained version 638 * ipkg_install.c: block SIGINT while doing core of package638 * opkg_install.c: block SIGINT while doing core of package 639 639 installation (single package) 640 * ipkg_conf.c, ipkg_conf.h: support for architecture priority640 * opkg_conf.c, opkg_conf.h: support for architecture priority 641 641 * pkg_depends.c: cleanup, reindent 642 642 * pkg.c, pkg.h: support for architecture_priority 643 * ipkg_cmd.c: installed SIGINT handler when upgrading or removing,643 * opkg_cmd.c: installed SIGINT handler when upgrading or removing, 644 644 support for architecture_priority 645 645 * pkg_hash.c: added support for architecture priority, reindented … … 647 647 2003-03-24 Jamey Hicks <jamey@handhelds.org> 648 648 * configure.ac: updated to 0.99.61 649 * familiar/postinst: mkdir -p /etc/ ipkg649 * familiar/postinst: mkdir -p /etc/opkg 650 650 2003-03-24 Jamey Hicks <jamey@handhelds.org> 651 651 * configure.ac: updated to 0.99.61 652 * ipkg_conf.c: read configuration from all *.conf files in /etc/ipkg/653 * familiar/postinst: create /etc/ ipkg/*.conf according to platform ipkg is installed on652 * opkg_conf.c: read configuration from all *.conf files in /etc/opkg/ 653 * familiar/postinst: create /etc/opkg/*.conf according to platform opkg is installed on 654 654 2003-03-20 Jamey Hicks <jamey@handhelds.org> 655 655 * configure.ac: updated to 0.99.60 656 656 * various: added support for package architectures 657 657 * configure.ac: do not test for malloc 658 2003-03-17 Aman Gupta < ipkg@themastermind1.net>658 2003-03-17 Aman Gupta <opkg@themastermind1.net> 659 659 * configure.ac: updated to 0.99.59 660 660 * args.c: show all verbosity levels in usage info 661 661 * args.h: changed default verbosity level to 1 662 * ipkg_cmd.c: ipkg_multiple_files_scan() was useless, switch to using663 ipkg_prepare_url_for_install()664 * ipkg_install.c: fix --force-reinstall665 * ipkg_remove.c: stop removing of modified conffiles662 * opkg_cmd.c: opkg_multiple_files_scan() was useless, switch to using 663 opkg_prepare_url_for_install() 664 * opkg_install.c: fix --force-reinstall 665 * opkg_remove.c: stop removing of modified conffiles 666 666 2003-03-04 Jamey Hicks <jamey@handhelds.org> 667 667 * configure.ac: updated to 0.99.56 668 * ipkg_message.c: show error messages by default669 * ipkg_message.h: protect against multiple inclusion670 * conffile.[ch]: switch to ipkg_message, added conf argument to conffile_has_been_modified671 * ipkg.h: move EXTENSION macros here668 * opkg_message.c: show error messages by default 669 * opkg_message.h: protect against multiple inclusion 670 * conffile.[ch]: switch to opkg_message, added conf argument to conffile_has_been_modified 671 * opkg.h: move EXTENSION macros here 672 672 * pkg_depends.c: minor cleanup 673 673 * pkg.h: added prefer and obsolete flags 674 674 * pkg.c: parse and unparse SF_PREFER and SF_OBSOLETE 675 * ipkg_install.[ch]:675 * opkg_install.[ch]: 676 676 - added {pkg,name}_mark_dependencies_for_installation, 677 677 - added conf argument to conffile_has_been_modified 678 - missing ifdef IPKG_DEBUG_NO_TMP_CLEANUP679 * ipkg_remove.c: added conf argument to conffile_has_been_modified680 * ipkg_download.c: added ipkg_prepare_for_install678 - missing ifdef OPKG_DEBUG_NO_TMP_CLEANUP 679 * opkg_remove.c: added conf argument to conffile_has_been_modified 680 * opkg_download.c: added opkg_prepare_for_install 681 681 2003-03-01 Jamey Hicks <jamey@handhelds.org> 682 682 * configure.ac: updated to 0.99.55 683 * ipkg.h: wrap #if 0 around definition of of IPKG_DEBUG_NO_TMP_CLEANUP683 * opkg.h: wrap #if 0 around definition of of OPKG_DEBUG_NO_TMP_CLEANUP 684 684 2003-03-01 Jamey Hicks <jamey@handhelds.org> 685 685 * configure.ac: updated to 0.99.54 686 * ipkg_install.c: make old package SW_DEINSTALL during ipkg installation687 * ipkg_cmd.[ch]: added some code to install packages marked SW_INSTALL, but have not enabled this code yet.686 * opkg_install.c: make old package SW_DEINSTALL during opkg installation 687 * opkg_cmd.[ch]: added some code to install packages marked SW_INSTALL, but have not enabled this code yet. 688 688 2003-03-01 Jamey Hicks <jamey@handhelds.org> 689 689 * configure.ac: updated to 0.99.53 690 690 * pkg_depends.c: let SW_INSTALL satisfy dependences (instead of SS_INSTALL) 691 691 2003-03-01 Daniele Nicolodi <daniele@grinta.net> 692 * ipkg_install.c: indentation fixes and finish switch to message692 * opkg_install.c: indentation fixes and finish switch to message 693 693 facility 694 * ipkg_cmd.c: indentation fixes, switch to message facility and694 * opkg_cmd.c: indentation fixes, switch to message facility and 695 695 some code cleanup 696 * ipkg_message.c (ipkg_message): check for a NULL *conf parameter697 * ipkg_message.h: renamed IPKG_ERR in IPKG_ERROR696 * opkg_message.c (opkg_message): check for a NULL *conf parameter 697 * opkg_message.h: renamed OPKG_ERR in OPKG_ERROR 698 698 2003-02-28 Jamey Hicks <jamey@handhelds.org> (patch from Daniele Nicolodi <daniele@grinta.net>) 699 699 * configure.ac: incremented version to 0.99.5 700 * ipkg_message.[ch]: added message facility700 * opkg_message.[ch]: added message facility 701 701 * args.[ch]: verbosity control 702 * ipkg_conf.[ch]: verbosity control703 * ipkg_install.c: switch to using message factility702 * opkg_conf.[ch]: verbosity control 703 * opkg_install.c: switch to using message factility 704 704 2003-02-28 Jamey Hicks <jamey@handhelds.org> 705 705 * configure.ac: incremented version to 0.99.51 706 * ipkg_cmd.c: added ipkg_statisfy_all_dependences, called after706 * opkg_cmd.c: added opkg_statisfy_all_dependences, called after 707 707 install/upgrade of packages to handle packages that were split and 708 708 no longer provide all the resources they used to provide. 709 709 2003-02-27 Jamey Hicks <jamey@handhelds.org> 710 710 * configure.ac: incremented version to 0.99.50 711 * ipkg_cmd.c: write out status after doing an upgrade711 * opkg_cmd.c: write out status after doing an upgrade 712 712 2003-02-27 Jamey Hicks <jamey@handhelds.org> (another patch from pb) 713 713 * configure.ac: incremented version to 0.99.49 … … 715 715 2003-02-27 Jamey Hicks <jamey@handhelds.org> (another patch from pb) 716 716 * configure.ac: incremented version number to 0.99.48 717 * args.c: added help for ipkg flags sub-command718 * ipkg_cmd.c: added ipkg_flag_cmd, do not upgrade package marked hold719 * ipkg_install.c: do not remove obsolesced files if old_pkg is flagged noprune720 * ipkg_remove.c: pkg->state_flag is a bitvector now717 * args.c: added help for opkg flags sub-command 718 * opkg_cmd.c: added opkg_flag_cmd, do not upgrade package marked hold 719 * opkg_install.c: do not remove obsolesced files if old_pkg is flagged noprune 720 * opkg_remove.c: pkg->state_flag is a bitvector now 721 721 * pkg.c: pkg->state_flag is a bitvector now 722 722 * pkg.h: pkg->state_flag is a bitvector now … … 731 731 * configure.ac: incremented version to 0.99.45 732 732 * file_util.c: include space for null in line_size 733 * ipkg_cmd.c: sigint handler while configuring packages734 * ipkg_install.c: state_status != SS_INSTALLED and != SS_UNPACKED735 * ipkg_remove.c: missing i++733 * opkg_cmd.c: sigint handler while configuring packages 734 * opkg_install.c: state_status != SS_INSTALLED and != SS_UNPACKED 735 * opkg_remove.c: missing i++ 736 736 * pkg.c: do not run scripts in offline_root mode 737 737 * pkg_depends.c: every package provides itself … … 742 742 2002-11-26 Jamey Hicks <jamey@handhelds.org> 743 743 * configure.ac: incremented version number to 0.99.43 744 * ipkg_install.c: completely skip the space check when -force_space asserted744 * opkg_install.c: completely skip the space check when -force_space asserted 745 745 2002-11-23 Jamey Hicks <jamey@handhelds.org> 746 746 * configure.ac: incremented version number to 0.99.42 … … 748 748 2002-11-23 Jamey Hicks <jamey@handhelds.org> 749 749 * configure.ac: incremented version number to 0.99.41 750 * ipkg_install.c: added -force_space option to override out of space check750 * opkg_install.c: added -force_space option to override out of space check 751 751 2002-11-23 Aman Gupta <oz@themastermind1.net> 752 752 * configure.ac: incremented version number to 0.99.40 753 * ipkg_configure.c: updated to match new text output format754 * ipkg_install.c: updated to new text output format753 * opkg_configure.c: updated to match new text output format 754 * opkg_install.c: updated to new text output format 755 755 fixed problems where ipks installed from file or 756 756 http were being installed over newer ipks of the 757 757 same name 758 * ipkg_remove.c: updated to new text output format759 made ipkg remove do what ipkg purge originally did,758 * opkg_remove.c: updated to new text output format 759 made opkg remove do what opkg purge originally did, 760 760 by having it remove conffiles, and status entries for 761 ipks that are removed. ipkg_purge now calls762 ipkg_remove761 ipks that are removed. opkg_purge now calls 762 opkg_remove 763 763 2002-11-22 Jamey Hicks <jamey.hicks@hp.com> 764 764 * configure.ac: incremented version number to 0.99.39 … … 772 772 2002-10-29 Jamey Hicks <jamey.hicks@hp.com> 773 773 * configure.ac: incremented version number to 0.99.37 774 * ipkg_cmd.c: ipkg_upgrade_cmd now installs uninstalled packages774 * opkg_cmd.c: opkg_upgrade_cmd now installs uninstalled packages 775 775 instead of getting a segv 776 776 2002-10-29 Jamey Hicks <jamey.hicks@hp.com> … … 779 779 2002-08-08 Jamey Hicks <jamey.hicks@hp.com> 780 780 * configure.ac: incremented version number to 0.99.34 781 * ipkg_cmd.c: fixed problem stringifying HOST_CPU781 * opkg_cmd.c: fixed problem stringifying HOST_CPU 782 782 * Makefile.am: helped fix problem stringifying HOST_CPU 783 783 2002-08-08 Jamey Hicks <jamey.hicks@hp.com> 784 784 * configure.ac: incremented version number to 0.99.33 785 * ipkg_cmd.c, args.c: added print-architecture and print-installation-architecture commands785 * opkg_cmd.c, args.c: added print-architecture and print-installation-architecture commands 786 786 * Makefile.am: added defines for HOST_CPU and BUILD_CPU to CFLAGS and package: target 787 787 2002-08-08 Jamey Hicks <jamey.hicks@hp.com> … … 791 791 * configure.ac: incremented version number to 0.99.31 792 792 * other: applied multiple providers patch from philip blundell 793 * ipkg_cmd.c: implemented compare_versions cmd793 * opkg_cmd.c: implemented compare_versions cmd 794 794 2002-07-25 Jamey Hicks <jamey.hicks@hp.com> 795 795 * configure.ac: incremented version number to 0.99.30 796 * ipkg_conf.c: added offline_root_pre_script_cmd and offline_root_post_script_cmd796 * opkg_conf.c: added offline_root_pre_script_cmd and offline_root_post_script_cmd 797 797 * pkg.c: execute scripts in chroot'ed environment running 798 798 pre_script_cmd and post_script_cmd before and after the pkg script. … … 802 802 2002-07-24 Jamey Hicks <jamey.hicks@hp.com> 803 803 * configure.ac: incremented version number to 0.99.28 804 * ipkg_cmd.c: merged functionality from ipkg_install_cmd into805 ipkg_upgrade_cmd with an eye towards unifying these two commands.806 * ipkg_install.c: installing a package that replaces other804 * opkg_cmd.c: merged functionality from opkg_install_cmd into 805 opkg_upgrade_cmd with an eye towards unifying these two commands. 806 * opkg_install.c: installing a package that replaces other 807 807 packages removes them first. (Upgrade does not do replacements automatically). 808 * ipkg_remove.c: ipkg_remove_pkg will remove a package with808 * opkg_remove.c: opkg_remove_pkg will remove a package with 809 809 installed dependents if state_flag == SF_REPLACE. 810 810 2002-07-24 Jamey Hicks <jamey.hicks@hp.com> … … 822 822 2002-07-17 Jamey Hicks <jamey.hicks@hp.com> 823 823 * configure.ac: incremented version number to 0.99.23 824 * ipkg_remove.c: do not do recursive removal if force-depends is824 * opkg_remove.c: do not do recursive removal if force-depends is 825 825 specified 826 826 * other-files: other cleanups to reduce code clutter … … 828 828 * configure.ac: incremented version number to 0.99.22 829 829 * user.[ch]: moved user interaction procedure here 830 * args.[ch], ipkg_conf.[ch]: added force_removal_of_dependent_packages830 * args.[ch], opkg_conf.[ch]: added force_removal_of_dependent_packages 831 831 * pkg.h: added state_status to abstract_pkg_t 832 * ipkg_remove.c: If package has installed dependents, then only832 * opkg_remove.c: If package has installed dependents, then only 833 833 remove if force_removal_of_dependent_packages is asserted in 834 ipkg.conf or on command line. Will add user interaction option later.834 opkg.conf or on command line. Will add user interaction option later. 835 835 2002-07-16 Jamey Hicks <jamey.hicks@hp.com> 836 836 * configure.ac: incremented version number to 0.99.21 after … … 840 840 841 841 * configure.ac: incremented version number to 0.99.20 842 * ipkg_download.c: removed useless -N flag from wget842 * opkg_download.c: removed useless -N flag from wget 843 843 * update-alternatives: 'head -1' -> 'head -n 1', no sort -k 2 for busybox 844 844 845 845 2002-07-15 Karthikeyan K <karthik@innvo.com> 846 846 847 * ipkg_remove.c (ipkg_remove_dependant_pkgs): removed setting the847 * opkg_remove.c (opkg_remove_dependant_pkgs): removed setting the 848 848 dependencies_checked variable in the while loop b4 actually checking 849 849 the dependencies of that package. 850 * ipkg_cmd.c (ipkg_multiple_files_scan): added check for ".ipk" and850 * opkg_cmd.c (opkg_multiple_files_scan): added check for ".ipk" and 851 851 ".deb" extension, so that no caching is attempted on arguments that 852 852 are not local files … … 876 876 877 877 2002-07-04 Abhaya Shenoy <abhaya@innvo.com> 878 * ipkg_install.c (check_conflicts_for): new function to call878 * opkg_install.c (check_conflicts_for): new function to call 879 879 pkg_hash_fetch_conflicts and print offending packages 880 ( ipkg_install_pkg): added call to check_conflicts_for880 (opkg_install_pkg): added call to check_conflicts_for 881 881 * pkg.c (pkg_merge): provides from oldpkg should be given 882 882 priority … … 894 894 2002-07-04 Karthikeyan K <karthik@innvo.com> 895 895 896 * ipkg_cmd.c (ipkg_multiple_files_scan): new function to handle installation896 * opkg_cmd.c (opkg_multiple_files_scan): new function to handle installation 897 897 of already downloaded files 898 ( ipkg_install_cmd): added call to ipkg_multiple_files_scan899 ( ipkg_remove_cmd): added call to possible_broken_removal_of_packages900 * ipkg_install.c (ipkg_install_pkg): added check to remove redundant upgrade898 (opkg_install_cmd): added call to opkg_multiple_files_scan 899 (opkg_remove_cmd): added call to possible_broken_removal_of_packages 900 * opkg_install.c (opkg_install_pkg): added check to remove redundant upgrade 901 901 when a package to be installed is already installed as a dependancy of 902 902 another 903 * ipkg_remove.c (possible_broken_removal_of_packages): new fnuction903 * opkg_remove.c (possible_broken_removal_of_packages): new fnuction 904 904 to check that all packages can be removed, before actually starting to 905 905 remove them 906 ( ipkg_remove_dependant_pkgs): new function to remove dependant packages907 ( ipkg_remove_pkg): added call to ipkg_remove_dependant_pkgs906 (opkg_remove_dependant_pkgs): new function to remove dependant packages 907 (opkg_remove_pkg): added call to opkg_remove_dependant_pkgs 908 908 * pkg.c (abstract_pkg_init): initialized dependencies_checked 909 909 * pkg_hash.c (pkg_hash_dump): added more information to hash dump … … 912 912 913 913 * configure.ac: incremented version number to 0.99.16 914 * ipkg_install.c: defensive programming in case pkg contains no Size: clause914 * opkg_install.c: defensive programming in case pkg contains no Size: clause 915 915 916 916 2002-07-02 Jamey Hicks <jamey.hicks@hp.com> … … 927 927 928 928 * configure.ac: incremented version number to 0.99.12 929 * args.h, ipkg_conf.h, ipkg_install.c: Added force_overwrite930 option. When this is asserted, ipkg will overwrite files that929 * args.h, opkg_conf.h, opkg_install.c: Added force_overwrite 930 option. When this is asserted, opkg will overwrite files that 931 931 have no owner or that belong to other packages. 932 * ipkg_conf.c, ipkg_dest.c: Update status file atomically, keeping932 * opkg_conf.c, opkg_dest.c: Update status file atomically, keeping 933 933 old copy of status file if cannot update new status file. Applied 934 934 patch from Jukka Santala for this fix. … … 957 957 rather than "make install" and a strip command. 958 958 959 * ipkg_cmd.c (ipkg_install_cmd): Moved an error message up from960 ipkg_install_by_name, (eventually all error messages should come961 up out of what will become lib ipkg, (pkg.c, ipkg_install.c, etc.)962 and into ipkg_cmd.c and friends).963 ( ipkg_upgrade_pkg): Pushed downgrade check down into964 ipkg_install_by_name so that "ipkg install foo" will do the959 * opkg_cmd.c (opkg_install_cmd): Moved an error message up from 960 opkg_install_by_name, (eventually all error messages should come 961 up out of what will become libopkg, (pkg.c, opkg_install.c, etc.) 962 and into opkg_cmd.c and friends). 963 (opkg_upgrade_pkg): Pushed downgrade check down into 964 opkg_install_by_name so that "opkg install foo" will do the 965 965 downgrade check. 966 966 967 * ipkg.h: Rename some ipkg_error_t error codes to be more967 * opkg.h: Rename some opkg_error_t error codes to be more 968 968 consistent. 969 969 970 * ipkg_install.c (resolve_conffiles): Added missing removal of970 * opkg_install.c (resolve_conffiles): Added missing removal of 971 971 backed-up modified conffiles, (which led to bizarre, bogus 972 972 conffile prompting the next time the package was upgraded). 973 973 (user_prefers_old_conffile): Fixed reversed arguments to diff in 974 974 interactive conffiles prompting. 975 ( ipkg_install_by_name): Fixed "ipkg install foo" to never976 downgrade foo, (just like " ipkg upgrade foo").975 (opkg_install_by_name): Fixed "opkg install foo" to never 976 downgrade foo, (just like "opkg upgrade foo"). 977 977 978 978 * familiar/rules: Added installation of 979 /usr/share/doc/ ipkg/copyright file. Fixed so that ipkg.conf goes979 /usr/share/doc/opkg/copyright file. Fixed so that opkg.conf goes 980 980 to /etc, not /usr/etc, (but still keep binary in /usr/bin not 981 /bin). Changed name of installed binary from ipkg-unstable to982 ipkg.981 /bin). Changed name of installed binary from opkg-unstable to 982 opkg. 983 983 984 984 * familiar/control.in (Package): Changed package name from 985 ipkg-unstable to ipkg.985 opkg-unstable to opkg. 986 986 987 987 * pkg_parse.c (parseVersion): Fixed to ignore whitespace at … … 990 990 a package paragraph without a final blank line. 991 991 992 * ipkg_install.c (check_data_file_clashes): Improved wording of992 * opkg_install.c (check_data_file_clashes): Improved wording of 993 993 file clash error message. 994 994 995 * ipkg_download.c (ipkg_download_pkg): Fixed segfault if package995 * opkg_download.c (opkg_download_pkg): Fixed segfault if package 996 996 has no src, (occurs if package had benn installed locally, then 997 997 was removed (but not purged), then tried to reinstall eithout it 998 existing in any /usr/lib/ ipkg/lists/* file).999 1000 * etc/ ipkg.conf: Added a default ipkg.conf to the distribution.998 existing in any /usr/lib/opkg/lists/* file). 999 1000 * etc/opkg.conf: Added a default opkg.conf to the distribution. 1001 1001 1002 1002 2002-03-13 Carl Worth <cworth@east.isi.edu> … … 1007 1007 1008 1008 * pkg.c (pkg_run_script): Added support to export 1009 IPKG_OFFLINE_ROOT. This is really a nasty hack as it means scripts1010 need to be modified to check IPKG_OFFLINE_ROOT. I'd really prefer1009 OPKG_OFFLINE_ROOT. This is really a nasty hack as it means scripts 1010 need to be modified to check OPKG_OFFLINE_ROOT. I'd really prefer 1011 1011 coming up with a good, reliable chroot system. But for now this 1012 1012 will let update-alternatives work, (which already does examine 1013 IPKG_OFFLINE_ROOT).1013 OPKG_OFFLINE_ROOT). 1014 1014 (pkg_run_script): Added missing brace. 1015 1015 1016 * ipkg_conf.c (ipkg_conf_init): Reworked significantly to properly1016 * opkg_conf.c (opkg_conf_init): Reworked significantly to properly 1017 1017 set up the pkg_dest_list stuff to account for offline_root. 1018 1018 … … 1027 1027 * RELEASE_NOTES: Added release notes for 0.99.6. 1028 1028 1029 * ipkg_download.c (ipkg_download): Fixed bug in handling of1029 * opkg_download.c (opkg_download): Fixed bug in handling of 1030 1030 "file://" URLs. 1031 1031 1032 * ipkg.c (main): Fixed to abort if ipkg_conf_init fails.1033 1034 * ipkg_conf.c (ipkg_conf_init): Fixed to complain if given an1032 * opkg.c (main): Fixed to abort if opkg_conf_init fails. 1033 1034 * opkg_conf.c (opkg_conf_init): Fixed to complain if given an 1035 1035 unknown dest. 1036 1036 … … 1046 1046 1047 1047 * familiar/rules (binary-arch): Added strip back in in preparation 1048 of non-unstable release of ipkg.1048 of non-unstable release of opkg. 1049 1049 1050 1050 * str_util.c (str_starts_with): Added convenience function. … … 1052 1052 * pkg_extract.c (pkg_extract_data_file_names_to_file): Fixed 1053 1053 filenames in *.list files to be compatible with dpkg and the old 1054 ipkg, (no prefix of "." for example).1054 opkg, (no prefix of "." for example). 1055 1055 1056 1056 * pkg.c (pkg_run_script): Added export of PKG_ROOT for the benefit 1057 1057 of maintainer scripts. 1058 1058 1059 * ipkg_remove.c (ipkg_remove_pkg): Complain and abort if user1059 * opkg_remove.c (opkg_remove_pkg): Complain and abort if user 1060 1060 attempts to remove an essential package, (also inform them of the 1061 1061 force option if they insist). 1062 1062 1063 * ipkg_install.c (ipkg_install_pkg): Added message about whether1063 * opkg_install.c (opkg_install_pkg): Added message about whether 1064 1064 installing or upgrading. 1065 1065 1066 * ipkg_download.c (ipkg_download): Added support for "file://"1066 * opkg_download.c (opkg_download): Added support for "file://" 1067 1067 URLs, (untested). 1068 ( ipkg_download): Added support for wget proxy options.1069 1070 * ipkg_conf.c (ipkg_conf_init): Added proxy support to ipkg_conf,1068 (opkg_download): Added support for wget proxy options. 1069 1070 * opkg_conf.c (opkg_conf_init): Added proxy support to opkg_conf, 1071 1071 (http_proxy, ftp_proxy, no_proxy, proxy_user, and proxy_passwd). 1072 1072 1073 * ipkg_cmd.c (ipkg_upgrade_pkg): Moved Upgrading message from1074 ipkg_upgrade_cmd to ipkg_install_pkg.1073 * opkg_cmd.c (opkg_upgrade_pkg): Moved Upgrading message from 1074 opkg_upgrade_cmd to opkg_install_pkg. 1075 1075 1076 1076 * args.c (args_parse): Added new option … … 1101 1101 (pkg_print_field): Don't print MD5sum field if NULL. 1102 1102 1103 * ipkg_install.c (satisfy_dependencies_for): Now returns error1103 * opkg_install.c (satisfy_dependencies_for): Now returns error 1104 1104 status if one or more of the dependencies fail to install cleanly. 1105 1105 (unpack_pkg_control_files): Fixed to not tack on a bunch of … … 1110 1110 have ugly things like "///" inside them. 1111 1111 1112 * ipkg_download.c (ipkg_download): Cleaned up error message.1113 ( ipkg_download): Now uses new file_move function.1114 ( ipkg_download_pkg): Created new function, (from old code in ipkg_install).1115 1116 * ipkg_cmd.c (ipkg_download_cmd): Added new "ipkg download"1112 * opkg_download.c (opkg_download): Cleaned up error message. 1113 (opkg_download): Now uses new file_move function. 1114 (opkg_download_pkg): Created new function, (from old code in opkg_install). 1115 1116 * opkg_cmd.c (opkg_download_cmd): Added new "opkg download" 1117 1117 command. 1118 1118 1119 1119 * file_util.c (file_move): Created file_move, (from code that had 1120 been in ipkg_download).1120 been in opkg_download). 1121 1121 (file_copy): Added error message on failure. 1122 1122 … … 1140 1140 * pkg_hash.c (pkg_hash_pkg_owning_file): Moved this function in 1141 1141 from pkg_dest.c. Also, updated it to use pkg_get_installed rather 1142 than mucking around inside /usr/lib/ ipkg and globbing for *.list1142 than mucking around inside /usr/lib/opkg and globbing for *.list 1143 1143 files. 1144 1144 (pkg_hash_fetch_best_installation_candidate): Fixed to only return 1145 1145 a package that actually could be installed, (ie. it must have 1146 1146 either a local_filename or a non-NULL src from which it could be 1147 downloaded). This prevents a segfault during " ipkg upgrade".1147 downloaded). This prevents a segfault during "opkg upgrade". 1148 1148 1149 1149 * pkg.c (pkg_get_installed_files): Fixed to not do strange things 1150 1150 to filenames such as: "//./bin/sh" 1151 1151 1152 * ipkg_cmd.c (ipkg_files_cmd): Added pkg_free_installed_files to1152 * opkg_cmd.c (opkg_files_cmd): Added pkg_free_installed_files to 1153 1153 conserve a bit of memory. 1154 ( ipkg_search_cmd): Updated to use pkg_get_installed rather than1155 mucking around inside /usr/lib/ ipkg and globbing for *.list files.1154 (opkg_search_cmd): Updated to use pkg_get_installed rather than 1155 mucking around inside /usr/lib/opkg and globbing for *.list files. 1156 1156 1157 1157 * pkg.c (pkg_free_installed_files): Added this function to free up 1158 1158 memory from pkg_get_installed_files. 1159 1159 1160 * ipkg_conf.c (ipkg_conf_set_option): Added force_reinstall option1160 * opkg_conf.c (opkg_conf_set_option): Added force_reinstall option 1161 1161 to allow reinstallation of an installed package. 1162 1162 … … 1170 1170 function to plug memory leak. 1171 1171 1172 * ipkg_install.c (check_data_file_clashes): Fixed crash if no1172 * opkg_install.c (check_data_file_clashes): Fixed crash if no 1173 1173 package can be found owning the pre-existing file. 1174 1174 … … 1226 1226 the package is installed. 1227 1227 1228 * ipkg_utils.c (read_raw_pkgs_from_file): Moved fclose out of1228 * opkg_utils.c (read_raw_pkgs_from_file): Moved fclose out of 1229 1229 read_raw_pkgs_from_stream and into this function where it belongs, 1230 1230 (since the fopen occurs here). … … 1232 1232 name to make it obvious that it is allocating memory. 1233 1233 1234 * ipkg_install.c (ipkg_install_from_file): Fixed to be more robust1234 * opkg_install.c (opkg_install_from_file): Fixed to be more robust 1235 1235 to the fact that hash_insert_pkg sometimes frees the data that I 1236 1236 pass into it (!). … … 1241 1241 (satisfy_dependencies_for): Added pkg_vec_deinit to plug memory 1242 1242 leak. 1243 ( ipkg_install_pkg): Added "run ipkg update?" hint to error1243 (opkg_install_pkg): Added "run opkg update?" hint to error 1244 1244 message. 1245 1245 (backup_modified_conffiles): Made more robust to the case that a … … 1252 1252 leak. 1253 1253 1254 * ipkg_download.c (ipkg_download): Cosmetic change to error1254 * opkg_download.c (opkg_download): Cosmetic change to error 1255 1255 messages. 1256 1256 1257 * ipkg_conf.c (ipkg_conf_parse_file): Plugged some small memory1257 * opkg_conf.c (opkg_conf_parse_file): Plugged some small memory 1258 1258 leaks. 1259 ( ipkg_conf_set_option): Changed configuration options from1259 (opkg_conf_set_option): Changed configuration options from 1260 1260 force-depends, force-defaults to force_depdends, force_defaults to 1261 be compatible with old ipkg.conf files.1262 ( ipkg_conf_set_option): Fixed bug in parsing options.1263 ( ipkg_conf_write_status_files): Fixed to list all interesting1261 be compatible with old opkg.conf files. 1262 (opkg_conf_set_option): Fixed bug in parsing options. 1263 (opkg_conf_write_status_files): Fixed to list all interesting 1264 1264 packages, (any with non-default state), in status file rather than 1265 1265 just installed files. 1266 ( ipkg_conf_write_status_files): Plugged a memory leak.1267 1268 * ipkg_cmd.c (ipkg_status_cmd): Changed "ipkg status" to use1266 (opkg_conf_write_status_files): Plugged a memory leak. 1267 1268 * opkg_cmd.c (opkg_status_cmd): Changed "opkg status" to use 1269 1269 pkg_print_info so it is much more verbose, (includes fields such 1270 1270 as Maintainer, etc. that are merged in from the lists files). 1271 1271 1272 * ipkg.h (IPKG_DEBUG_NO_TMP_CLEANUP): Added compile-time option to1272 * opkg.h (OPKG_DEBUG_NO_TMP_CLEANUP): Added compile-time option to 1273 1273 preserve temporary files for easier debugging. 1274 1274 … … 1276 1276 names. 1277 1277 1278 * ipkg_conf.c (ipkg_conf_init): Added support for offline_root1278 * opkg_conf.c (opkg_conf_init): Added support for offline_root 1279 1279 configuration file option. 1280 1280 … … 1283 1283 have any effect yet). 1284 1284 1285 * ipkg_install.c (ipkg_install_pkg): Changed back to marking1285 * opkg_install.c (opkg_install_pkg): Changed back to marking 1286 1286 package as installed before postinst, (the pkg_run_script wanted 1287 to find the scripts in /usr/lib/ ipkg/info). Actually, it could1287 to find the scripts in /usr/lib/opkg/info). Actually, it could 1288 1288 probably find the script in either place at this point so maybe it 1289 1289 doesn't really matter. … … 1291 1291 2002-03-07 Carl Worth <cworth@east.isi.edu> 1292 1292 1293 * ipkg_install.c (ipkg_install_pkg): Changed to only mark package1294 as installed after running ipkg_configure, (to run the postinst1293 * opkg_install.c (opkg_install_pkg): Changed to only mark package 1294 as installed after running opkg_configure, (to run the postinst 1295 1295 script). 1296 1296 1297 * RELEASED ipkg-unstable 0.99.01297 * RELEASED opkg-unstable 0.99.0 1298 1298 1299 1299 * Updated all instances of "XXX" in the code to indicate one of … … 1305 1305 1306 1306 * pkg.c (pkg_print_status): Added the Depends field to package 1307 paragraphs in the status file, (" ipkg remove" will need this).1308 1309 * ipkg_install.c (satisfy_dependencies_for): Fixed "ipkg install"1307 paragraphs in the status file, ("opkg remove" will need this). 1308 1309 * opkg_install.c (satisfy_dependencies_for): Fixed "opkg install" 1310 1310 to not complain several times about "Package foo already 1311 1311 installed" when doing large recursive installs. 1312 ( ipkg_install_pkg): "ipkg install foo" for an installed package1312 (opkg_install_pkg): "opkg install foo" for an installed package 1313 1313 will now check and install any missing dependencies before exiting 1314 1314 with "Package foo is alrady installed." … … 1317 1317 1318 1318 * pkg_dest.c (pkg_dest_pkg_owning_file_alloc): Moved this function 1319 here from ipkg_install.c. Also plugged a memory leak in it with1319 here from opkg_install.c. Also plugged a memory leak in it with 1320 1320 globfree. 1321 1321 1322 1322 * pkg.c (pkg_remove_installed_files_list): Fixed bug that 1323 prevented package.list file from ever being removed during " ipkg1323 prevented package.list file from ever being removed during "opkg 1324 1324 remove". 1325 1325 1326 * ipkg_remove.c (remove_data_files_and_list): Fixed noisy and1327 spurious warnings about non-empty directories. " ipkg remove"1326 * opkg_remove.c (remove_data_files_and_list): Fixed noisy and 1327 spurious warnings about non-empty directories. "opkg remove" 1328 1328 should now only say anything if a directory that was solely 1329 1329 provided by that package is non-empty. 1330 1330 1331 * ipkg_cmd.c (ipkg_install_pending_cmd): Plugged memory leak with1331 * opkg_cmd.c (opkg_install_pending_cmd): Plugged memory leak with 1332 1332 globfree. 1333 1333 1334 * ipkg_install.c: *Many* fixes to enable "ipkg upgrade" to more or1334 * opkg_install.c: *Many* fixes to enable "opkg upgrade" to more or 1335 1335 less work. Primarily fixing file clash identification and conffile 1336 handling/resolution. " ipkg upgrade" has now worked correctly on1336 handling/resolution. "opkg upgrade" has now worked correctly on 1337 1337 several test cases! 1338 1338 1339 * ipkg_install.c (unpack_pkg_control_files): Now initializes1339 * opkg_install.c (unpack_pkg_control_files): Now initializes 1340 1340 conffiles list from the contents of conffiles control file, 1341 1341 (leaves md5sum calculation until the actual conffiles are 1342 1342 extracted later). 1343 ( ipkg_install_pkg): Separated backup_modified_conffiles and1343 (opkg_install_pkg): Separated backup_modified_conffiles and 1344 1344 check_data_file_clashes into separate functions. 1345 1345 (preinst_configure): Simplified this function pushing its old … … 1395 1395 field. 1396 1396 1397 * ipkg_install.c (remove_obsolesced_files): With the fixed1397 * opkg_install.c (remove_obsolesced_files): With the fixed 1398 1398 pkg_get_installed_files_list from below, this function now seems 1399 1399 to work! 1400 ( ipkg_install_pkg): Fixed to mark old package as uninstalled after1400 (opkg_install_pkg): Fixed to mark old package as uninstalled after 1401 1401 upgrading. 1402 1402 … … 1406 1406 package). 1407 1407 1408 * ipkg_cmd.c (ipkg_upgrade_cmd): Fixed ipkg_upgrade to not choke1408 * opkg_cmd.c (opkg_upgrade_cmd): Fixed opkg_upgrade to not choke 1409 1409 if asked to upgrade an un-installed package. 1410 ( ipkg_upgrade_pkg): Fixed printing of version numbers.1410 (opkg_upgrade_pkg): Fixed printing of version numbers. 1411 1411 1412 1412 * file_util.c (file_mkdir_hier): Abstracted call to libbb … … 1421 1421 2002-03-04 Carl Worth <cworth@east.isi.edu> 1422 1422 1423 * ipkg_conf.c (ipkg_conf_init): Added support to ipkg_conf to1423 * opkg_conf.c (opkg_conf_init): Added support to opkg_conf to 1424 1424 pickup command-line arguments for "force-defaults" and 1425 1425 "force-depends". Things set on the command-line should take 1426 1426 precedence over things found in the configuration file. 1427 1427 1428 * ipkg_cmd.c (ipkg_search_cmd): Fixed formatting of "ipkg search"1428 * opkg_cmd.c (opkg_search_cmd): Fixed formatting of "opkg search" 1429 1429 output. 1430 1430 … … 1435 1435 calls to regexec. 1436 1436 1437 * ipkg_install.c (satisfy_dependencies_for): Added support for new1437 * opkg_install.c (satisfy_dependencies_for): Added support for new 1438 1438 "unresolved" argument in 1439 1439 pkg_hash_fetch_unsatisfied_dependencies. Cleaned up warning/error 1440 1440 messages. 1441 1441 1442 * ipkg_cmd.c (ipkg_search_cmd): Implemented first-cut of "ipkg search".1442 * opkg_cmd.c (opkg_search_cmd): Implemented first-cut of "opkg search". 1443 1443 1444 1444 * pkg_depends.c (pkg_hash_fetch_unsatisfied_dependencies): Fixed … … 1447 1447 2002-03-01 Carl Worth <cworth@east.isi.edu> 1448 1448 1449 * RELEASED ipkg-unstable 0.98.01450 1451 * ipkg_configure.c (ipkg_configure): Added flushing of stdout,1449 * RELEASED opkg-unstable 0.98.0 1450 1451 * opkg_configure.c (opkg_configure): Added flushing of stdout, 1452 1452 (here and in a few other modules). 1453 1453 1454 1454 * file_util.c (file_copy): Implemented this function here as one 1455 1455 step toward isolating the calls into libbb functions. Updated old 1456 copy_file calls to file_copy in both ipkg_download.c and1457 ipkg_install.c.1458 1459 * ipkg_install.c, ipkg_remove.c: Demoted several "XXX" comments to1456 copy_file calls to file_copy in both opkg_download.c and 1457 opkg_install.c. 1458 1459 * opkg_install.c, opkg_remove.c: Demoted several "XXX" comments to 1460 1460 DPKG_INCOMPATIBILITY as I really don't intend on addressing them 1461 1461 any time soon, (if ever). 1462 1462 1463 * ipkg_cmd.c (ipkg_files_cmd): Fixed "ipkg files" from crashing on1463 * opkg_cmd.c (opkg_files_cmd): Fixed "opkg files" from crashing on 1464 1464 uninstalled packages. 1465 1465 1466 1466 * familiar/rules: Added support for easy building of an 1467 ipkg.ipk. The version number and the architecture are1467 opkg.ipk. The version number and the architecture are 1468 1468 automatically sucked in correctly from autoconf magic, (even when 1469 1469 cross-compiling). Maybe autoconf will start paying off with … … 1473 1473 cross-compilation. 1474 1474 1475 * ipkg_cmd.c (ipkg_upgrade_pkg): BIG bugfix: Package version1475 * opkg_cmd.c (opkg_upgrade_pkg): BIG bugfix: Package version 1476 1476 comparison was sign-reversed, (hence it would never upgrade). 1477 1477 1478 1478 2002-02-28 Carl Worth <cworth@east.isi.edu> 1479 1479 1480 * ipkg_download.c (ipkg_download): Changed from1480 * opkg_download.c (opkg_download): Changed from 1481 1481 system("/bin/cp",...) to copy_file(...) 1482 1482 … … 1485 1485 1486 1486 * configure.ac: Added AC_CANONICAL_HOST to automatically set the 1487 correct architecture type in the ipkg control file.1487 correct architecture type in the opkg control file. 1488 1488 1489 1489 * configure.ac: Changed version number to 0.98.0 in preparation 1490 1490 for alpha release. 1491 1491 1492 * familiar/rules: Added support for easy building of an ipkg.ipk.1492 * familiar/rules: Added support for easy building of an opkg.ipk. 1493 1493 1494 1494 2002-02-27 Carl Worth <cworth@east.isi.edu> 1495 1495 1496 * ipkg_install.c (ipkg_install_pkg): Fixed to abort on failed1496 * opkg_install.c (opkg_install_pkg): Fixed to abort on failed 1497 1497 download. 1498 1498 … … 1506 1506 1507 1507 * pkg_parse.c (pkg_parse_raw): Added parsing of "MD5Sum" in 1508 addition to "MD5sum" to accomodate bug in old ipkg.1508 addition to "MD5sum" to accomodate bug in old opkg. 1509 1509 1510 1510 * void_list.c (void_list_remove): Added new remove function, (also … … 1515 1515 conffile_list_t datatype. 1516 1516 (pkg_remove_installed_files_list): Pulled this function into 1517 pkg.c, (from ipkg_remove.c), so the mallocs and frees would be in1517 pkg.c, (from opkg_remove.c), so the mallocs and frees would be in 1518 1518 the same C file. 1519 1519 (pkg_get_conffile): Added this convenience function. 1520 1520 1521 * ipkg_remove.c: Fixed several bugs. ipkg_remove now actually1521 * opkg_remove.c: Fixed several bugs. opkg_remove now actually 1522 1522 works for simple packages! 1523 1523 1524 * ipkg_install.c (ipkg_install_pkg): Don't re-install if a package1524 * opkg_install.c (opkg_install_pkg): Don't re-install if a package 1525 1525 is already installed. 1526 ( ipkg_install_pkg): Fixed major bug that all of ipkg_install's1526 (opkg_install_pkg): Fixed major bug that all of opkg_install's 1527 1527 work was always being unwound even when successful. 1528 1528 1529 * ipkg_cmd.c (ipkg_files_cmd): Fixed to use1529 * opkg_cmd.c (opkg_files_cmd): Fixed to use 1530 1530 pkg_get_installed_files_list rather than a private implementation 1531 1531 that sifted through the file lists on disk. … … 1534 1534 (str_chomp): Another convenience. 1535 1535 1536 * ipkg_conf.c: Moved chomp to str_util.c (str_chomp), since1536 * opkg_conf.c: Moved chomp to str_util.c (str_chomp), since 1537 1537 someone else wanted it too. 1538 1538 … … 1556 1556 script. 1557 1557 1558 * ipkg_remove.c: Fleshed out initial version of all ipkg_remove.c1558 * opkg_remove.c: Fleshed out initial version of all opkg_remove.c 1559 1559 functions. 1560 1560 1561 * ipkg_configure.c (ipkg_configure): Added check on return value1561 * opkg_configure.c (opkg_configure): Added check on return value 1562 1562 of pkg_run script. Added comments about dpkg compliance. 1563 1563 1564 * ipkg_cmd.c (ipkg_purge_cmd): Added ipkg_purge_cmd1564 * opkg_cmd.c (opkg_purge_cmd): Added opkg_purge_cmd 1565 1565 1566 1566 2002-02-20 Carl Worth <cworth@east.isi.edu> … … 1568 1568 * Added USC copyright statements, (and Compaq stubs as necessary) 1569 1569 1570 * ipkg_install.c: At this point "ipkg install" on a simple1570 * opkg_install.c: At this point "opkg install" on a simple 1571 1571 package, (no scripts and no dependencies), works just fine. It 1572 1572 might even do some of the script and dependency handling correctly 1573 too, but I haven't tested that yet. " ipkg install libc6" is a nice1573 too, but I haven't tested that yet. "opkg install libc6" is a nice 1574 1574 little test that should complete without any errors or 1575 warnings. Follow that up with " ipkg status" to see that it worked.1575 warnings. Follow that up with "opkg status" to see that it worked. 1576 1576 1577 1577 * pkg.c (pkg_run_script): Added convenience method for running 1578 1578 package scripts. 1579 1579 1580 * ipkg_install.c: Fixed several bugs:1580 * opkg_install.c: Fixed several bugs: 1581 1581 (unpack_pkg_control_files): control files now extract to the 1582 1582 correct temporary directory. 1583 ( ipkg_install_pkg): pkg->state_want is now properly set to SW_INSTALL1584 ( ipkg_install_pkg): status file now gets written after installation1583 (opkg_install_pkg): pkg->state_want is now properly set to SW_INSTALL 1584 (opkg_install_pkg): status file now gets written after installation 1585 1585 (cleanup_temporary_files): All temporary files are cleaned up. 1586 1586 1587 * ipkg_configure.c (ipkg_configure): Fleshed out a very simple1588 ipkg_configure, (simply runs "postinst configure"). Maybe it will1587 * opkg_configure.c (opkg_configure): Fleshed out a very simple 1588 opkg_configure, (simply runs "postinst configure"). Maybe it will 1589 1589 need to be smarter at some point. Moved unwritten conffiles stuff 1590 back to ipkg_install.c.1591 1592 * ipkg_conf.c (ipkg_conf_write_status_files): Moved this function1593 from ipkg_utils to ipkg_conf since it needs access to the1590 back to opkg_install.c. 1591 1592 * opkg_conf.c (opkg_conf_write_status_files): Moved this function 1593 from opkg_utils to opkg_conf since it needs access to the 1594 1594 pkg_dest_list. 1595 1595 … … 1601 1601 2002-02-19 Carl Worth <cworth@east.isi.edu> 1602 1602 1603 * ipkg_install.c: several little bug fixes. "ipkg install" will1603 * opkg_install.c: several little bug fixes. "opkg install" will 1604 1604 now actually install files from a package! There are still some 1605 1605 bugs, (eg. postinst scripts are not called -- probably other … … 1608 1608 * pkg_dest.c (pkg_dest_init): now creates all necessary directories 1609 1609 1610 * ipkg_download.c (ipkg_download): Fixed misleading parameter name.1611 1612 * ipkg_conf.c (ipkg_conf_deinit): Now cleans up tmd_dir on deinit1613 ipkg.c: now calls ipkg_conf_deinit before exiting.1614 ( ipkg_conf_add_nv): Fixed to set default_dest when parsing first1615 dest in ipkg.conf1616 1617 * ipkg_cmd.c (ipkg_list_cmd): Fixed ugly bug in ipkg_list that led1610 * opkg_download.c (opkg_download): Fixed misleading parameter name. 1611 1612 * opkg_conf.c (opkg_conf_deinit): Now cleans up tmd_dir on deinit 1613 opkg.c: now calls opkg_conf_deinit before exiting. 1614 (opkg_conf_add_nv): Fixed to set default_dest when parsing first 1615 dest in opkg.conf 1616 1617 * opkg_cmd.c (opkg_list_cmd): Fixed ugly bug in opkg_list that led 1618 1618 to infinite loops, segfaults, string corruption, and other bizarre 1619 1619 behavior. 1620 1620 1621 * Added many files as we are approaching the first functional ipkg1621 * Added many files as we are approaching the first functional opkg 1622 1622 implementation in C: 1623 1623 file_util.c: convenience for testing if file_exists, reading files, etc. 1624 ipkg_configure.c: mostly just a stub so far1625 ipkg_download.c: convenient function to download a file1624 opkg_configure.c: mostly just a stub so far 1625 opkg_download.c: convenient function to download a file 1626 1626 nv_pair.c: data structure to hold a name-value pair 1627 1627 nv_pair_list.c: data structure to hold a list of nv_pair_t … … 1637 1637 xsystem.c: wrapper around system() with error checking 1638 1638 1639 * ipkg_remove.c: Just added some stubs. Nothing really works at1639 * opkg_remove.c: Just added some stubs. Nothing really works at 1640 1640 all yet. 1641 1641 1642 * ipkg_install.c: Large rework of ipkg_install. It's now close to1642 * opkg_install.c: Large rework of opkg_install. It's now close to 1643 1643 actually being usable, (but it's not quite there yet). Revamped to 1644 1644 match dpkg install order more closely, (with all the stubs in case … … 1646 1646 to use a more recent deb_extract from libbb. 1647 1647 1648 * ipkg_extract_test.c (main): Added support for a third arg, (the1648 * opkg_extract_test.c (main): Added support for a third arg, (the 1649 1649 filename to extract to the buffer). 1650 1650 1651 * ipkg_conf.c (ipkg_conf_init): Added several fields to1652 ipkg_conf_t: pkg_src_list, pkg_dest_list ,1651 * opkg_conf.c (opkg_conf_init): Added several fields to 1652 opkg_conf_t: pkg_src_list, pkg_dest_list , 1653 1653 restrict_to_default_dest, default_dest, tmp_dir, lists_dir, 1654 1654 pending_dir, force_depends, and pkg_hash. There's still a bit of 1655 tension between options stored in the config file, ( ipkg_conf_t),1655 tension between options stored in the config file, (opkg_conf_t), 1656 1656 and command-line arguments, (args_t). 1657 1657 1658 * ipkg_cmd.c: First version that is approaching usability. The1659 following commands are more-or-less in place: " ipkg update", "ipkg1660 list", " ipkg info", "ipkg status". While the rest are in various1658 * opkg_cmd.c: First version that is approaching usability. The 1659 following commands are more-or-less in place: "opkg update", "opkg 1660 list", "opkg info", "opkg status". While the rest are in various 1661 1661 states of being partiallyy written or written but untested. 1662 ( ipkg_upgrade_cmd): Added support for restricting to a dest. Many1662 (opkg_upgrade_cmd): Added support for restricting to a dest. Many 1663 1663 other changes, largely involving plugging into the pkg_hash for 1664 1664 real for the first time, and adding multiple dest support. 1665 1665 1666 * ipkg.c: Added support for setting the dest on the command-line.1667 1668 * args.c: Added support for IPKG_CONF_DIR environment variable and1666 * opkg.c: Added support for setting the dest on the command-line. 1667 1668 * args.c: Added support for OPKG_CONF_DIR environment variable and 1669 1669 -f, -conf, and -conf-file options. 1670 1670 … … 1730 1730 support pkg_dest 1731 1731 1732 * ipkg_utils.h: Added GPL blurb1733 ( IPKG_UTILS_H): Added multiple include protection1734 1735 * ipkg_utils.c:1732 * opkg_utils.h: Added GPL blurb 1733 (OPKG_UTILS_H): Added multiple include protection 1734 1735 * opkg_utils.c: 1736 1736 (read_raw_pkgs_from_file): broke read_raw_pkgs into 1737 1737 read_raw_pkgs_from_file and read_raw-pkgs_from_stream 1738 ( ipkg_write_status_file): Fixed return value1738 (opkg_write_status_file): Fixed return value 1739 1739 (print_pkg_status): Moved this function to pkg.c:pkg_print_status 1740 1740 (line_is_blank): Fixed const char handling … … 1751 1751 2001-12-11 Carl Worth <cworth@east.isi.edu> 1752 1752 1753 * ipkg_conf.c: Now parses /etc/ipkg.conf, (and doesn't do anything1753 * opkg_conf.c: Now parses /etc/opkg.conf, (and doesn't do anything 1754 1754 with it). 1755 1755 1756 * ipkg.c: Started work on ipkg main, (not much here yet).1757 1758 * ipkg_cmd.h: Added a tiny thing to abstract top-level ipkg1756 * opkg.c: Started work on opkg main, (not much here yet). 1757 1758 * opkg_cmd.h: Added a tiny thing to abstract top-level opkg 1759 1759 commands, (not finished). 1760 1760 -
trunk/src/target/ipkg/INSTALL
r3837 r3879 1 ipkg uses autoconf and friends for configuration. The familiar steps of:1 opkg uses autoconf and friends for configuration. The familiar steps of: 2 2 3 3 ./configure -
trunk/src/target/ipkg/Makefile.am
r3871 r3879 4 4 HOST_CPU=@host_cpu@ 5 5 BUILD_CPU=@build_cpu@ 6 IPKGLIBDIR=@ipkglibdir@7 ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -D IPKGLIBDIR=\"@ipkglibdir@\" -DDATADIR=\"@datadir@\"6 OPKGLIBDIR=@opkglibdir@ 7 ALL_CFLAGS=-g -O -Wall -DHOST_CPU_STR=\"@host_cpu@\" -DBUILD_CPU=@build_cpu@ -DLIBDIR=\"@libdir@\" -DOPKGLIBDIR=\"@opkglibdir@\" -DDATADIR=\"@datadir@\" 8 8 9 bin_PROGRAMS = ipkg-cl9 bin_PROGRAMS = opkg-cl 10 10 11 lib_LTLIBRARIES = lib ipkg.la11 lib_LTLIBRARIES = libopkg.la 12 12 13 13 bin_SCRIPTS = update-alternatives 14 14 15 interceptdir = $(datadir)/ ipkg/intercept15 interceptdir = $(datadir)/opkg/intercept 16 16 intercept_DATA = intercept/ldconfig intercept/depmod intercept/update-modules 17 17 18 18 install-data-hook: 19 chmod +x $(DESTDIR)$(datadir)/ ipkg/intercept/*19 chmod +x $(DESTDIR)$(datadir)/opkg/intercept/* 20 20 21 # ipkg_LDADD = libbb/libbb.a replace/libreplace.a21 # opkg_LDADD = libbb/libbb.a replace/libreplace.a 22 22 23 # ipkg_cl_LDADD = libipkg.la libbb/libbb.la replace/libreplace.a24 ipkg_cl_LDADD = libipkg.la libbb/libbb.la23 #opkg_cl_LDADD = libopkg.la libbb/libbb.la replace/libreplace.a 24 opkg_cl_LDADD = libopkg.la libbb/libbb.la 25 25 26 lib ipkg_includedir=$(includedir)/libipkg26 libopkg_includedir=$(includedir)/libopkg 27 27 28 lib ipkg_include_HEADERS= \28 libopkg_include_HEADERS= \ 29 29 args.h \ 30 30 conffile.h \ … … 33 33 hash_table.h \ 34 34 includes.h \ 35 ipkg_conf.h \36 ipkg.h \37 ipkg_message.h \35 opkg_conf.h \ 36 opkg.h \ 37 opkg_message.h \ 38 38 nv_pair.h \ 39 39 nv_pair_list.h \ … … 48 48 str_list.h \ 49 49 void_list.h \ 50 lib ipkg.h50 libopkg.h 51 51 52 52 #\ replace/replace.h 53 53 54 #lib ipkg_la_LIBADD = libbb/libbb.la replace/libreplace.a55 lib ipkg_la_LIBADD = libbb/libbb.la $(CURL_LIBS)54 #libopkg_la_LIBADD = libbb/libbb.la replace/libreplace.a 55 libopkg_la_LIBADD = libbb/libbb.la $(CURL_LIBS) 56 56 57 ipkg_core_sources = args.c args.h ipkg.c \57 opkg_core_sources = args.c args.h opkg.c \ 58 58 user.c user.h 59 ipkg_libcore_sources = args.c args.h libipkg.c libipkg.h ipkg.h\59 opkg_libcore_sources = args.c args.h libopkg.c libopkg.h opkg.h\ 60 60 user.c user.h 61 ipkg_cmd_sources = ipkg_cmd.c ipkg_cmd.h \62 ipkg_configure.c ipkg_configure.h \63 ipkg_download.c ipkg_download.h \64 ipkg_install.c ipkg_install.h \65 ipkg_upgrade.c ipkg_upgrade.h \66 ipkg_remove.c ipkg_remove.h67 ipkg_db_sources = ipkg_conf.c ipkg_conf.h \68 ipkg_utils.c ipkg_utils.h pkg.c pkg.h hash_table.h \61 opkg_cmd_sources = opkg_cmd.c opkg_cmd.h \ 62 opkg_configure.c opkg_configure.h \ 63 opkg_download.c opkg_download.h \ 64 opkg_install.c opkg_install.h \ 65 opkg_upgrade.c opkg_upgrade.h \ 66 opkg_remove.c opkg_remove.h 67 opkg_db_sources = opkg_conf.c opkg_conf.h \ 68 opkg_utils.c opkg_utils.h pkg.c pkg.h hash_table.h \ 69 69 pkg_depends.c pkg_depends.h pkg_extract.c pkg_extract.h \ 70 70 hash_table.c pkg_hash.c pkg_hash.h pkg_parse.c pkg_parse.h \ 71 71 pkg_vec.c pkg_vec.h 72 ipkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \72 opkg_list_sources = conffile.c conffile.h conffile_list.c conffile_list.h \ 73 73 nv_pair.c nv_pair.h nv_pair_list.c nv_pair_list.h \ 74 74 pkg_dest.c pkg_dest.h pkg_dest_list.c pkg_dest_list.h \ 75 75 pkg_src.c pkg_src.h pkg_src_list.c pkg_src_list.h \ 76 76 str_list.c str_list.h void_list.c void_list.h 77 ipkg_util_sources = file_util.c file_util.h ipkg_message.h ipkg_message.c md5.c md5.h \77 opkg_util_sources = file_util.c file_util.h opkg_message.h opkg_message.c md5.c md5.h \ 78 78 sprintf_alloc.c sprintf_alloc.h str_util.c str_util.h \ 79 79 xregex.c xregex.h xsystem.c xsystem.h 80 80 81 # ipkg_SOURCES = $(ipkg_core_sources) $(ipkg_cmd_sources) $(ipkg_db_sources) \82 # $( ipkg_util_sources) $(ipkg_list_sources)81 # opkg_SOURCES = $(opkg_core_sources) $(opkg_cmd_sources) $(opkg_db_sources) \ 82 # $(opkg_util_sources) $(opkg_list_sources) 83 83 84 EXTRA_DIST = ipkg.c update-alternatives $(intercept_DATA)84 EXTRA_DIST = opkg.c update-alternatives $(intercept_DATA) 85 85 86 86 MAINTAINERCLEANFILES= \ … … 93 93 aclocal.m4 94 94 95 lib ipkg_la_SOURCES = $(ipkg_libcore_sources) $(ipkg_cmd_sources) $(ipkg_db_sources) \96 $( ipkg_util_sources) $(ipkg_list_sources)95 libopkg_la_SOURCES = $(opkg_libcore_sources) $(opkg_cmd_sources) $(opkg_db_sources) \ 96 $(opkg_util_sources) $(opkg_list_sources) 97 97 98 ipkg_cl_SOURCES = ipkg-frontend.c98 opkg_cl_SOURCES = opkg-frontend.c 99 99 100 lib ipkg_la_CFLAGS = -DIPKG_LIB $(ALL_CFLAGS) $(CURL_CFLAGS)100 libopkg_la_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS) $(CURL_CFLAGS) 101 101 102 ipkg_CFLAGS = $(ALL_CFLAGS) $(CURL_CFLAGS)102 opkg_CFLAGS = $(ALL_CFLAGS) $(CURL_CFLAGS) 103 103 104 ipkg_cl_CFLAGS = -DIPKG_LIB $(ALL_CFLAGS)104 opkg_cl_CFLAGS = -DOPKG_LIB $(ALL_CFLAGS) 105 105 106 noinst_PROGRAMS = ipkg_hash_test ipkg_extract_test106 noinst_PROGRAMS = opkg_hash_test opkg_extract_test 107 107 108 ipkg_hash_test_LDADD = libbb/libbb.la109 ipkg_hash_test_SOURCES = ipkg_hash_test.c $(ipkg_db_sources) $(ipkg_util_sources) $(ipkg_list_sources)110 ipkg_hash_test_CFLAGS = $(ALL_CFLAGS)108 opkg_hash_test_LDADD = libbb/libbb.la 109 opkg_hash_test_SOURCES = opkg_hash_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources) 110 opkg_hash_test_CFLAGS = $(ALL_CFLAGS) 111 111 112 ipkg_extract_test_LDADD = libbb/libbb.la113 ipkg_extract_test_SOURCES = ipkg_extract_test.c $(ipkg_db_sources) $(ipkg_util_sources) $(ipkg_list_sources)114 ipkg_extract_test_CFLAGS = $(ALL_CFLAGS)112 opkg_extract_test_LDADD = libbb/libbb.la 113 opkg_extract_test_SOURCES = opkg_extract_test.c $(opkg_db_sources) $(opkg_util_sources) $(opkg_list_sources) 114 opkg_extract_test_CFLAGS = $(ALL_CFLAGS) 115 115 116 116 package: all-recursive -
trunk/src/target/ipkg/README
r3837 r3879 1 ipkg - The Itsy Package Management System2 3 See http://www.handhelds.org/moin/moin.cgi/Ipkg for more details about ipkg. -
trunk/src/target/ipkg/TODO
r3837 r3879 1 1 2 Things to do for ipkg, in a partial order:2 Things to do for opkg, in a partial order: 3 3 4 4 0) Play with configure to check for strdup/strndup ( to works with replace/replace.h stuffs ) 5 5 6 1) Fix incompatibilities between current C-based ipkg and original7 sh-based ipkg.6 1) Fix incompatibilities between current C-based opkg and original 7 sh-based opkg. 8 8 9 1.a) Fix ipkg.conf options for http_proxy and friends. DONE:9 1.a) Fix opkg.conf options for http_proxy and friends. DONE: 10 10 http_proxy tested, (ftp_proxy, no_proxy, proxy_user, and 11 11 proxy_passwd have not been tested). … … 19 19 1.e) Fix offline_root mode. DONE: tested. 20 20 21 2) Release ipkg as ipkg, (no longer as ipkg-unstable). This depends on21 2) Release opkg as opkg, (no longer as opkg-unstable). This depends on 22 22 all of (1) being DONE. Although I might let this release proceed 23 23 without offline_root --- only Jamey will complain. ;-) … … 27 27 3.a) fix all code marked "XXX: BUG" 28 28 29 3.b) fix all outstanding ipkg bugzilla bugs29 3.b) fix all outstanding opkg bugzilla bugs 30 30 31 31 3.c) conffiles support seems broken again. It's prompting on just … … 48 48 3.g) Audit all dpkg package fields for both parsing and printing support. 49 49 50 3.h) " ipkg status" and "ipkg info" need to complain about unknown50 3.h) "opkg status" and "opkg info" need to complain about unknown 51 51 packages. For that matter, these two commands should probably just 52 52 become aliases to the same functionality. 53 53 54 Jamey thinks ipkg status should be brief give one line per package, while55 ipkg info can continue to be verbose. 7/23/2002.54 Jamey thinks opkg status should be brief give one line per package, while 55 opkg info can continue to be verbose. 7/23/2002. 56 56 57 3.i) Currently " ipkg install foo" will upgrade foo if possible. The57 3.i) Currently "opkg install foo" will upgrade foo if possible. The 58 58 "Package foo is already installed" check needs to be moved up to 59 59 avoid this. 60 60 61 Jamey thinkgs that " ipkg install foo" should upgrade foo. 7/23/2002.61 Jamey thinkgs that "opkg install foo" should upgrade foo. 7/23/2002. 62 62 63 63 4) Implement new features … … 65 65 4.a) start with all "XXX: FEATURE" comments 66 66 67 4.b) implement all accepted ipkg bugzilla feature requests, (also68 check old post "Subject: Reinventing ipkg" to see if we forgot67 4.b) implement all accepted opkg bugzilla feature requests, (also 68 check old post "Subject: Reinventing opkg" to see if we forgot 69 69 any of the good ideas we had once upon a time) 70 70 71 4.c) ipkg remove needs to (prompt first) then remove packages for71 4.c) opkg remove needs to (prompt first) then remove packages for 72 72 which the dependencies will no longer be met. DONE. 7/19/2002. 73 73 74 74 4.d) Add support for: 75 ipkg install foo from some-feed76 ipkg install foo-0.4.377 ipkg install foo-latest # Only needed if we add a feed-order-priority option75 opkg install foo from some-feed 76 opkg install foo-0.4.3 77 opkg install foo-latest # Only needed if we add a feed-order-priority option 78 78 or something like that. 79 79 … … 90 90 something like uclibc to work well? 91 91 92 4.h) Add support for a deb-src in /etc/ ipkg.conf. (ARGH! Name clash92 4.h) Add support for a deb-src in /etc/opkg.conf. (ARGH! Name clash 93 93 alert! In apt-land, deb-src means something very different than 94 94 what I would mean here. Hrm... Maybe src-deb would be cleaner? ) … … 99 99 offline_root mode. 100 100 101 4.j) Implement ipkg history mechanism, with undo and redo? Keep track of102 packages removed/installed by each call to ipkg.101 4.j) Implement opkg history mechanism, with undo and redo? Keep track of 102 packages removed/installed by each call to opkg. 103 103 104 5) release ipkg-1.0.0104 5) release opkg-1.0.0 105 105 106 106 6) Cleanup the code -
trunk/src/target/ipkg/args.c
r3837 r3879 21 21 #include <unistd.h> 22 22 23 #include " ipkg.h"23 #include "opkg.h" 24 24 25 25 #include "config.h" … … 54 54 args->dest = ARGS_DEFAULT_DEST; 55 55 56 conf_file_dir = getenv(" IPKG_CONF_DIR");56 conf_file_dir = getenv("OPKG_CONF_DIR"); 57 57 if (conf_file_dir == NULL || conf_file_dir[0] == '\0') { 58 58 conf_file_dir = ARGS_DEFAULT_CONF_FILE_DIR; … … 227 227 { 228 228 if (complaint) { 229 fprintf(stderr, " ipkg: %s\n", complaint);229 fprintf(stderr, "opkg: %s\n", complaint); 230 230 } 231 231 print_version(); 232 fprintf(stderr, "usage: ipkg [options...] sub-command [arguments...]\n");232 fprintf(stderr, "usage: opkg [options...] sub-command [arguments...]\n"); 233 233 fprintf(stderr, "where sub-command is one of:\n"); 234 234 … … 248 248 fprintf(stderr, "\tfiles <pkg> List all files belonging to <pkg>\n"); 249 249 fprintf(stderr, "\tsearch <file|regexp> Search for a package providing <file>\n"); 250 #ifndef IPKG_LIB250 #ifndef OPKG_LIB 251 251 fprintf(stderr, "\tinfo [pkg|regexp [<field>]] Display all/some info fields for <pkg> or all\n"); 252 252 fprintf(stderr, "\tstatus [pkg|regexp [<field>]] Display all/some status fields for <pkg> or all\n"); … … 274 274 fprintf(stderr, "\t 2 informative messages\n"); 275 275 fprintf(stderr, "\t 3 debug output\n"); 276 fprintf(stderr, "\t-f <conf_file> Use <conf_file> as the ipkg configuration file\n");276 fprintf(stderr, "\t-f <conf_file> Use <conf_file> as the opkg configuration file\n"); 277 277 fprintf(stderr, "\t-conf <conf_file> Default configuration file location\n"); 278 278 fprintf(stderr, " is %s/%s\n", ARGS_DEFAULT_CONF_FILE_DIR, ARGS_DEFAULT_CONF_FILE_NAME); … … 286 286 fprintf(stderr, "\t-verbose_wget more wget messages\n"); 287 287 288 fprintf(stderr, "\tForce Options (use when ipkg is too smart for its own good):\n");288 fprintf(stderr, "\tForce Options (use when opkg is too smart for its own good):\n"); 289 289 fprintf(stderr, "\t-force-depends Make dependency checks warnings instead of errors\n"); 290 290 fprintf(stderr, "\t Install/remove package in spite of failed dependences\n"); 291 fprintf(stderr, "\t-force-defaults Use default options for questions asked by ipkg.\n");291 fprintf(stderr, "\t-force-defaults Use default options for questions asked by opkg.\n"); 292 292 fprintf(stderr, " (no prompts). Note that this will not prevent\n"); 293 293 fprintf(stderr, " package installation scripts from prompting.\n"); 294 fprintf(stderr, "\t-force-reinstall Allow ipkg to reinstall a package.\n");295 fprintf(stderr, "\t-force-overwrite Allow ipkg to overwrite files from another package during an install.\n");296 fprintf(stderr, "\t-force-downgrade Allow ipkg to downgrade packages.\n");294 fprintf(stderr, "\t-force-reinstall Allow opkg to reinstall a package.\n"); 295 fprintf(stderr, "\t-force-overwrite Allow opkg to overwrite files from another package during an install.\n"); 296 fprintf(stderr, "\t-force-downgrade Allow opkg to downgrade packages.\n"); 297 297 fprintf(stderr, "\t-force_space Install even if there does not seem to be enough space.\n"); 298 298 fprintf(stderr, "\t-noaction No action -- test only\n"); 299 299 fprintf(stderr, "\t-nodeps Do not follow dependences\n"); 300 300 fprintf(stderr, "\t-force-removal-of-dependent-packages\n"); 301 fprintf(stderr, "\t-recursive Allow ipkg to remove package and all that depend on it.\n");301 fprintf(stderr, "\t-recursive Allow opkg to remove package and all that depend on it.\n"); 302 302 fprintf(stderr, "\t-test No action -- test only\n"); 303 303 fprintf(stderr, "\t-t Specify tmp-dir.\n"); … … 305 305 fprintf(stderr, "\n"); 306 306 fprintf(stderr, "\tregexp could be something like 'pkgname*' '*file*' or similar\n"); 307 fprintf(stderr, "\teg: ipkg info 'libstd*' or ipkg search '*libop*' or ipkg remove 'libncur*'\n");308 /* -force-removal-of-essential-packages Let ipkg remove essential packages.307 fprintf(stderr, "\teg: opkg info 'libstd*' or opkg search '*libop*' or opkg remove 'libncur*'\n"); 308 /* -force-removal-of-essential-packages Let opkg remove essential packages. 309 309 Using this option is almost guaranteed to break your system, hence this option 310 310 is not even advertised in the usage statement. */ … … 314 314 static void print_version(void) 315 315 { 316 fprintf(stderr, " ipkg version %s\n", VERSION);317 } 316 fprintf(stderr, "opkg version %s\n", VERSION); 317 } -
trunk/src/target/ipkg/args.h
r3837 r3879 47 47 48 48 #define ARGS_DEFAULT_CONF_FILE_DIR "/etc" 49 #define ARGS_DEFAULT_CONF_FILE_NAME " ipkg.conf"49 #define ARGS_DEFAULT_CONF_FILE_NAME "opkg.conf" 50 50 #define ARGS_DEFAULT_DEST NULL 51 51 #define ARGS_DEFAULT_FORCE_DEFAULTS 0 -
trunk/src/target/ipkg/conffile.c
r3837 r3879 19 19 #include <stdlib.h> 20 20 21 #include " ipkg.h"22 #include " ipkg_message.h"21 #include "opkg.h" 22 #include "opkg_message.h" 23 23 24 24 #include "conffile.h" … … 36 36 } 37 37 38 int conffile_has_been_modified( ipkg_conf_t *conf, conffile_t *conffile)38 int conffile_has_been_modified(opkg_conf_t *conf, conffile_t *conffile) 39 39 { 40 40 char *md5sum; … … 44 44 45 45 if (conffile->value == NULL) { 46 ipkg_message(conf, IPKG_NOTICE, "%s: conffile %s has no md5sum\n", __FUNCTION__, conffile->name);46 opkg_message(conf, OPKG_NOTICE, "%s: conffile %s has no md5sum\n", __FUNCTION__, conffile->name); 47 47 return 1; 48 48 } … … 54 54 ret = strcmp(md5sum, conffile->value); 55 55 if (ret) { 56 ipkg_message(conf, IPKG_NOTICE, "%s: conffile %s: \t\nold md5=%s \t\nnew md5=%s\n", __FUNCTION__,56 opkg_message(conf, OPKG_NOTICE, "%s: conffile %s: \t\nold md5=%s \t\nnew md5=%s\n", __FUNCTION__, 57 57 conffile->name, md5sum, conffile->value); 58 58 } -
trunk/src/target/ipkg/conffile.h
r3837 r3879 25 25 int conffile_init(conffile_t *conffile, const char *file_name, const char *md5sum); 26 26 void conffile_deinit(conffile_t *conffile); 27 int conffile_has_been_modified(struct ipkg_conf *conf, conffile_t *conffile);27 int conffile_has_been_modified(struct opkg_conf *conf, conffile_t *conffile); 28 28 29 29 #endif -
trunk/src/target/ipkg/conffile_list.c
r3837 r3879 16 16 */ 17 17 18 #include " ipkg.h"18 #include "opkg.h" 19 19 20 20 #include "conffile_list.h" -
trunk/src/target/ipkg/configure.ac
r3871 r3879 1 1 # Process this file with autoconf to produce a configure script 2 AC_INIT( ipkg.c)3 AM_INIT_AUTOMAKE([ ipkg], [0.99.163])2 AC_INIT(opkg.c) 3 AM_INIT_AUTOMAKE([opkg], [0.99.163]) 4 4 AM_CONFIG_HEADER(config.h) 5 5 … … 20 20 AC_PROG_LIBTOOL 21 21 22 # Checks for libraries (hah! ipkg is pretty much self-contained)22 # Checks for libraries (hah! opkg is pretty much self-contained) 23 23 PKG_CHECK_MODULES(CURL, libcurl) 24 24 … … 52 52 AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime]) 53 53 54 ipkglibdir=55 AC_ARG_WITH( ipkglibdir,56 [ --with- ipkglibdir=DIR specifies directory to put status and info files.57 "/ ipkg" is always added so if you want your files58 to be in /usr/lib/ ipkg you should indicate59 --with- ipkglibdir=/usr/lib ],54 opkglibdir= 55 AC_ARG_WITH(opkglibdir, 56 [ --with-opkglibdir=DIR specifies directory to put status and info files. 57 "/opkg" is always added so if you want your files 58 to be in /usr/lib/opkg you should indicate 59 --with-opkglibdir=/usr/lib ], 60 60 [case "${withval}" in 61 yes) AC_MSG_ERROR(bad value ${withval} given for ipkg libs directories ) ;;61 yes) AC_MSG_ERROR(bad value ${withval} given for opkg libs directories ) ;; 62 62 no) ;; 63 *) ipkglibdir=$with_ipkglibdir ;;63 *) opkglibdir=$with_opkglibdir ;; 64 64 esac]) 65 65 66 66 # Default local prefix if it is empty 67 if test x$ ipkglibdir = x; then68 ipkglibdir=/usr/lib67 if test x$opkglibdir = x; then 68 opkglibdir=/usr/lib 69 69 fi 70 70 71 AC_SUBST( ipkglibdir)71 AC_SUBST(opkglibdir) 72 72 73 AC_OUTPUT(Makefile etc/Makefile familiar/Makefile familiar/control familiar/control-unstripped familiar/lib ipkg-control familiar/libipkg-dev-control libbb/Makefile libipkg.pc ipkg.h)73 AC_OUTPUT(Makefile etc/Makefile familiar/Makefile familiar/control familiar/control-unstripped familiar/libopkg-control familiar/libopkg-dev-control libbb/Makefile libopkg.pc opkg.h) -
trunk/src/target/ipkg/familiar/control-unstripped.in
r3837 r3879 1 Package: ipkg-unstripped2 Replaces: ipkg1 Package: opkg-unstripped 2 Replaces: opkg 3 3 Version: @VERSION@ 4 4 Section: base … … 7 7 Architecture: @host_cpu@ 8 8 Maintainer: Jamey Hicks <jamey@handhelds.org> 9 Source: http://www.handhelds.org/packages/ ipkg/ipkg-@VERSION@.tar.gz9 Source: http://www.handhelds.org/packages/opkg/opkg-@VERSION@.tar.gz 10 10 Depends: libc6, busybox 11 11 Description: lightweight package management system 12 ipkg is the Itsy Package Management System, for handling12 opkg is the Itsy Package Management System, for handling 13 13 installation and removal of packages on a system. It can 14 14 recursively follow dependencies and download all packages 15 15 necessary to install a particular package. 16 16 . 17 ipkg knows how to install both .ipk and .deb packages.17 opkg knows how to install both .ipk and .deb packages. 18 18 . 19 ipkg is intended to serve the same functions (and more) for19 opkg is intended to serve the same functions (and more) for 20 20 Familiar that dpkg and apt serve for Debian, (while taking 21 21 up much less space). -
trunk/src/target/ipkg/familiar/control.in
r3837 r3879 1 Package: ipkg1 Package: opkg 2 2 Version: @VERSION@ 3 3 Section: base … … 6 6 Architecture: @host_cpu@ 7 7 Maintainer: Pierluigi Frullani <pigi@frumar.it> 8 Source: http://www.handhelds.org/packages/ ipkg/ipkg-@VERSION@.tar.gz9 Depends: libc6, lib ipkg (>= @VERSION@)8 Source: http://www.handhelds.org/packages/opkg/opkg-@VERSION@.tar.gz 9 Depends: libc6, libopkg (>= @VERSION@) 10 10 Description: lightweight package management system 11 ipkg is the Itsy Package Management System, for handling11 opkg is the Itsy Package Management System, for handling 12 12 installation and removal of packages on a system. It can 13 13 recursively follow dependencies and download all packages 14 14 necessary to install a particular package. 15 15 . 16 ipkg knows how to install both .ipk and .deb packages.16 opkg knows how to install both .ipk and .deb packages. 17 17 . 18 ipkg is intended to serve the same functions (and more) for18 opkg is intended to serve the same functions (and more) for 19 19 Familiar that dpkg and apt serve for Debian, (while taking 20 20 up much less space). -
trunk/src/target/ipkg/familiar/libopkg-control.in
r3877 r3879 1 Package: lib ipkg1 Package: libopkg 2 2 Version: @VERSION@ 3 3 Section: base … … 6 6 Architecture: @host_cpu@ 7 7 Maintainer: Jamey Hicks <jamey@handhelds.org> 8 Source: http://www.handhelds.org/packages/ ipkg/ipkg-@VERSION@.tar.gz8 Source: http://www.handhelds.org/packages/opkg/opkg-@VERSION@.tar.gz 9 9 Depends: libc6, busybox 10 10 Description: lightweight package management system 11 ipkg is the Itsy Package Management System, for handling11 opkg is the Itsy Package Management System, for handling 12 12 installation and removal of packages on a system. It can 13 13 recursively follow dependencies and download all packages 14 14 necessary to install a particular package. 15 15 . 16 ipkg knows how to install both .ipk and .deb packages.16 opkg knows how to install both .ipk and .deb packages. 17 17 . 18 ipkg is intended to serve the same functions (and more) for18 opkg is intended to serve the same functions (and more) for 19 19 Familiar that dpkg and apt serve for Debian, (while taking 20 20 up much less space). -
trunk/src/target/ipkg/familiar/libopkg-dev-control.in
r3877 r3879 1 Package: lib ipkg-dev1 Package: libopkg-dev 2 2 Version: @VERSION@ 3 3 Section: base … … 6 6 Architecture: @host_cpu@ 7 7 Maintainer: Jamey Hicks <jamey@handhelds.org> 8 Source: http://www.handhelds.org/packages/ ipkg/ipkg-@VERSION@.tar.gz9 Depends: lib ipkg8 Source: http://www.handhelds.org/packages/opkg/opkg-@VERSION@.tar.gz 9 Depends: libopkg 10 10 Description: lightweight package management system 11 ipkg is the Itsy Package Management System, for handling11 opkg is the Itsy Package Management System, for handling 12 12 installation and removal of packages on a system. It can 13 13 recursively follow dependencies and download all packages 14 14 necessary to install a particular package. 15 15 . 16 ipkg knows how to install both .ipk and .deb packages.16 opkg knows how to install both .ipk and .deb packages. 17 17 . 18 ipkg is intended to serve the same functions (and more) for18 opkg is intended to serve the same functions (and more) for 19 19 Familiar that dpkg and apt serve for Debian, (while taking 20 20 up much less space). -
trunk/src/target/ipkg/file_util.c
r3837 r3879 16 16 */ 17 17 18 #include " ipkg.h"18 #include "opkg.h" 19 19 #include <sys/types.h> 20 20 #include <sys/stat.h> … … 108 108 109 109 /* I put these here to keep libbb dependencies from creeping all over 110 the ipkg code */110 the opkg code */ 111 111 int file_copy(const char *src, const char *dest) 112 112 { -
trunk/src/target/ipkg/hash_table.c
r3837 r3879 1 /* hash.c - hash tables for ipkg1 /* hash.c - hash tables for opkg 2 2 3 3 Steven M. Ayer, Jamey Hicks … … 21 21 #include <string.h> 22 22 #include "hash_table.h" 23 #include " ipkg_message.h"23 #include "opkg_message.h" 24 24 25 25 … … 93 93 { 94 94 if (strcmp(key, hash_entry->key) == 0) { 95 // ipkg_message(NULL, IPKG_DEBUG, "Function: %s. Key found for '%s' \n", __FUNCTION__, key);95 // opkg_message(NULL, OPKG_DEBUG, "Function: %s. Key found for '%s' \n", __FUNCTION__, key); 96 96 return hash_entry->data; 97 97 } … … 106 106 int ndx= hash_index(hash, key); 107 107 hash_entry_t *hash_entry = hash->entries + ndx; 108 if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Inserting in hash for '%s' \n", __FUNCTION__, key);108 if (0) opkg_message(NULL, OPKG_DEBUG2, "Function: %s. Inserting in hash for '%s' \n", __FUNCTION__, key); 109 109 if (hash_entry->key) { 110 110 if (strcmp(hash_entry->key, key) == 0) { 111 111 /* alread in table, update the value */ 112 if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Value already in hash for '%s' \n", __FUNCTION__, key);112 if (0) opkg_message(NULL, OPKG_DEBUG2, "Function: %s. Value already in hash for '%s' \n", __FUNCTION__, key); 113 113 hash_entry->data = value; 114 114 return 0; … … 119 119 * before we can hook up the value 120 120 */ 121 if (0) ipkg_message(NULL, IPKG_DEBUG2, "Function: %s. Value already in hash by collision for '%s' \n", __FUNCTION__, key);121 if (0) opkg_message(NULL, OPKG_DEBUG2, "Function: %s. Value already in hash by collision for '%s' \n", __FUNCTION__, key); 122 122 while (hash_entry->next) 123 123 hash_entry = hash_entry->next; -
trunk/src/target/ipkg/hash_table.h
r3837 r3879 1 /* hash.h - hash tables for ipkg1 /* hash.h - hash tables for opkg 2 2 3 3 Steven M. Ayer, Jamey Hicks -
trunk/src/target/ipkg/intercept/depmod
r3837 r3879 2 2 3 3 if [ "x$1" = "x-a" ] || [ "x$1" = "x-A" ]; then 4 if [ ! -f $ IPKG_INTERCEPT_DIR/depmod ]; then5 echo "depmod -A" > $ IPKG_INTERCEPT_DIR/depmod6 chmod +x $ IPKG_INTERCEPT_DIR/depmod4 if [ ! -f $OPKG_INTERCEPT_DIR/depmod ]; then 5 echo "depmod -A" > $OPKG_INTERCEPT_DIR/depmod 6 chmod +x $OPKG_INTERCEPT_DIR/depmod 7 7 fi 8 8 exit 0 -
trunk/src/target/ipkg/intercept/ldconfig
r3837 r3879 1 1 #!/bin/sh 2 2 3 if [ ! -f $ IPKG_INTERCEPT_DIR/ldconfig ]; then4 echo "ldconfig" > $ IPKG_INTERCEPT_DIR/ldconfig5 chmod +x $ IPKG_INTERCEPT_DIR/ldconfig3 if [ ! -f $OPKG_INTERCEPT_DIR/ldconfig ]; then 4 echo "ldconfig" > $OPKG_INTERCEPT_DIR/ldconfig 5 chmod +x $OPKG_INTERCEPT_DIR/ldconfig 6 6 fi 7 7 -
trunk/src/target/ipkg/intercept/update-modules
r3837 r3879 1 1 #!/bin/sh 2 2 3 if [ ! -f $ IPKG_INTERCEPT_DIR/update-modules ]; then4 echo "update-modules" > $ IPKG_INTERCEPT_DIR/update-modules5 chmod +x $ IPKG_INTERCEPT_DIR/update-modules3 if [ ! -f $OPKG_INTERCEPT_DIR/update-modules ]; then 4 echo "update-modules" > $OPKG_INTERCEPT_DIR/update-modules 5 chmod +x $OPKG_INTERCEPT_DIR/update-modules 6 6 fi 7 7 -
trunk/src/target/ipkg/libbb/libbb.h
r3837 r3879 28 28 #include <netdb.h> 29 29 30 // Include because of single use with ipkg30 // Include because of single use with opkg 31 31 #define _BB_INTERNAL_H_ 32 32 #define L_archive_offset -
trunk/src/target/ipkg/libbb/unarchive.c
r3837 r3879 763 763 return(output_buffer); 764 764 } else if (strncmp(ar_magic, "\037\213", 2) == 0) { 765 /* it's a gz file, let's assume it's an ipkg */766 int unzipped_ ipkg_pid;767 FILE *unzipped_ ipkg_stream;765 /* it's a gz file, let's assume it's an opkg */ 766 int unzipped_opkg_pid; 767 FILE *unzipped_opkg_stream; 768 768 file_header_t *tar_header; 769 769 archive_offset = 0; 770 770 fseek(deb_stream, 0, SEEK_SET); 771 unzipped_ ipkg_stream = gz_open(deb_stream, &unzipped_ipkg_pid);771 unzipped_opkg_stream = gz_open(deb_stream, &unzipped_opkg_pid); 772 772 773 /*fprintf(stderr, __FUNCTION__ ": processing ipkg %s -- ared_file=%s\n", package_filename, ared_file);*/773 /*fprintf(stderr, __FUNCTION__ ": processing opkg %s -- ared_file=%s\n", package_filename, ared_file);*/ 774 774 /* walk through outer tar file to find ared_file */ 775 while ((tar_header = get_header_tar(unzipped_ ipkg_stream)) != NULL) {775 while ((tar_header = get_header_tar(unzipped_opkg_stream)) != NULL) { 776 776 int name_offset = 0; 777 777 if (strncmp(tar_header->name, "./", 2) == 0) … … 779 779 if (strcmp(ared_file, tar_header->name+name_offset) == 0) { 780 780 /* open a stream of decompressed data */ 781 uncompressed_stream = gz_open(unzipped_ ipkg_stream, &gunzip_pid);781 uncompressed_stream = gz_open(unzipped_opkg_stream, &gunzip_pid); 782 782 archive_offset = 0; 783 783 /*fprintf(stderr, __FUNCTION__ ":%d: here -- found file\n", __LINE__);*/ … … 795 795 break; 796 796 } 797 seek_sub_file(unzipped_ ipkg_stream, tar_header->size);797 seek_sub_file(unzipped_opkg_stream, tar_header->size); 798 798 free_header_tar(tar_header); 799 799 } 800 gz_close(unzipped_ ipkg_pid);801 fclose(unzipped_ ipkg_stream);800 gz_close(unzipped_opkg_pid); 801 fclose(unzipped_opkg_stream); 802 802 fclose(deb_stream); 803 803 free(ared_file); -
trunk/src/target/ipkg/libopkg.c
r3877 r3879 1 /* ipkglib.c - the itsy package management system1 /* opkglib.c - the itsy package management system 2 2 3 3 Florina Boor … … 16 16 */ 17 17 18 #ifdef IPKG_LIB19 20 #include " ipkg.h"18 #ifdef OPKG_LIB 19 20 #include "opkg.h" 21 21 #include "includes.h" 22 #include "lib ipkg.h"22 #include "libopkg.h" 23 23 24 24 #include "args.h" 25 #include " ipkg_conf.h"26 #include " ipkg_cmd.h"25 #include "opkg_conf.h" 26 #include "opkg_cmd.h" 27 27 #include "file_util.h" 28 28 29 29 30 30 31 ipkg_message_callback ipkg_cb_message = NULL;32 ipkg_response_callback ipkg_cb_response = NULL;33 ipkg_status_callback ipkg_cb_status = NULL;34 ipkg_list_callback ipkg_cb_list = NULL;35 36 37 int 38 ipkg_init (ipkg_message_callback mcall,39 ipkg_response_callback rcall,31 opkg_message_callback opkg_cb_message = NULL; 32 opkg_response_callback opkg_cb_response = NULL; 33 opkg_status_callback opkg_cb_status = NULL; 34 opkg_list_callback opkg_cb_list = NULL; 35 36 37 int 38 opkg_init (opkg_message_callback mcall, 39 opkg_response_callback rcall, 40 40 args_t * args) 41 41 { 42 ipkg_cb_message = mcall;43 ipkg_cb_response = rcall;42 opkg_cb_message = mcall; 43 opkg_cb_response = rcall; 44 44 45 45 args_init (args); … … 50 50 51 51 int 52 ipkg_deinit (args_t * args)52 opkg_deinit (args_t * args) 53 53 { 54 54 args_deinit (args); 55 ipkg_cb_message = NULL;56 ipkg_cb_response = NULL;55 opkg_cb_message = NULL; 56 opkg_cb_response = NULL; 57 57 58 58 /* place other cleanup stuff here */ … … 63 63 64 64 int 65 ipkg_packages_list(args_t *args,65 opkg_packages_list(args_t *args, 66 66 const char *packages, 67 ipkg_list_callback cblist,67 opkg_list_callback cblist, 68 68 void *userdata) 69 69 { 70 ipkg_cmd_t *cmd;71 ipkg_conf_t ipkg_conf;72 int err; 73 74 err = ipkg_conf_init (&ipkg_conf, args);75 if (err) 76 { 77 return err; 78 } 79 80 ipkg_cb_list = cblist;81 /* we need to do this because of static declarations, 82 * maybe a good idea to change */ 83 cmd = ipkg_cmd_find ("list");70 opkg_cmd_t *cmd; 71 opkg_conf_t opkg_conf; 72 int err; 73 74 err = opkg_conf_init (&opkg_conf, args); 75 if (err) 76 { 77 return err; 78 } 79 80 opkg_cb_list = cblist; 81 /* we need to do this because of static declarations, 82 * maybe a good idea to change */ 83 cmd = opkg_cmd_find ("list"); 84 84 if (packages) 85 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata);85 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata); 86 86 else 87 err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata);88 ipkg_cb_list = NULL;89 ipkg_conf_deinit (&ipkg_conf);90 return (err); 91 } 92 93 94 int 95 ipkg_packages_status(args_t *args,87 err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata); 88 opkg_cb_list = NULL; 89 opkg_conf_deinit (&opkg_conf); 90 return (err); 91 } 92 93 94 int 95 opkg_packages_status(args_t *args, 96 96 const char *packages, 97 ipkg_status_callback cbstatus,97 opkg_status_callback cbstatus, 98 98 void *userdata) 99 99 { 100 ipkg_cmd_t *cmd;101 ipkg_conf_t ipkg_conf;102 int err; 103 104 err = ipkg_conf_init (&ipkg_conf, args);105 if (err) 106 { 107 return err; 108 } 109 110 ipkg_cb_status = cbstatus;100 opkg_cmd_t *cmd; 101 opkg_conf_t opkg_conf; 102 int err; 103 104 err = opkg_conf_init (&opkg_conf, args); 105 if (err) 106 { 107 return err; 108 } 109 110 opkg_cb_status = cbstatus; 111 111 112 112 /* we need to do this because of static declarations, 113 113 * maybe a good idea to change */ 114 cmd = ipkg_cmd_find ("status");114 cmd = opkg_cmd_find ("status"); 115 115 if (packages) 116 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata);116 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata); 117 117 else 118 err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata);119 120 ipkg_cb_status = NULL;121 ipkg_conf_deinit (&ipkg_conf);122 return (err); 123 } 124 125 126 int 127 ipkg_packages_info(args_t *args,118 err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata); 119 120 opkg_cb_status = NULL; 121 opkg_conf_deinit (&opkg_conf); 122 return (err); 123 } 124 125 126 int 127 opkg_packages_info(args_t *args, 128 128 const char *packages, 129 ipkg_status_callback cbstatus,129 opkg_status_callback cbstatus, 130 130 void *userdata) 131 131 { 132 ipkg_cmd_t *cmd;133 ipkg_conf_t ipkg_conf;134 int err; 135 136 err = ipkg_conf_init (&ipkg_conf, args);137 if (err) 138 { 139 return err; 140 } 141 142 ipkg_cb_status = cbstatus;132 opkg_cmd_t *cmd; 133 opkg_conf_t opkg_conf; 134 int err; 135 136 err = opkg_conf_init (&opkg_conf, args); 137 if (err) 138 { 139 return err; 140 } 141 142 opkg_cb_status = cbstatus; 143 143 144 144 /* we need to do this because of static declarations, 145 145 * maybe a good idea to change */ 146 cmd = ipkg_cmd_find ("info");146 cmd = opkg_cmd_find ("info"); 147 147 if (packages) 148 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &packages, userdata);148 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &packages, userdata); 149 149 else 150 err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, userdata);151 152 ipkg_cb_status = NULL;153 ipkg_conf_deinit (&ipkg_conf);154 return (err); 155 } 156 157 158 int 159 ipkg_packages_install (args_t * args, const char *name)160 { 161 ipkg_cmd_t *cmd;162 ipkg_conf_t ipkg_conf;150 err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, userdata); 151 152 opkg_cb_status = NULL; 153 opkg_conf_deinit (&opkg_conf); 154 return (err); 155 } 156 157 158 int 159 opkg_packages_install (args_t * args, const char *name) 160 { 161 opkg_cmd_t *cmd; 162 opkg_conf_t opkg_conf; 163 163 int err; 164 164 … … 167 167 return (-1); 168 168 169 err = ipkg_conf_init (&ipkg_conf, args);169 err = opkg_conf_init (&opkg_conf, args); 170 170 if (err) 171 171 { … … 175 175 /* we need to do this because of static declarations, 176 176 * maybe a good idea to change */ 177 cmd = ipkg_cmd_find ("install");178 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL);179 180 ipkg_conf_deinit(&ipkg_conf);181 return (err); 182 } 183 184 185 int 186 ipkg_packages_remove(args_t *args, const char *name, int purge)187 { 188 ipkg_cmd_t *cmd;189 ipkg_conf_t ipkg_conf;177 cmd = opkg_cmd_find ("install"); 178 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL); 179 180 opkg_conf_deinit(&opkg_conf); 181 return (err); 182 } 183 184 185 int 186 opkg_packages_remove(args_t *args, const char *name, int purge) 187 { 188 opkg_cmd_t *cmd; 189 opkg_conf_t opkg_conf; 190 190 int err; 191 191 … … 194 194 return (-1); 195 195 196 err = ipkg_conf_init (&ipkg_conf, args);196 err = opkg_conf_init (&opkg_conf, args); 197 197 if (err) 198 198 { … … 203 203 * maybe a good idea to change */ 204 204 if (purge) 205 cmd = ipkg_cmd_find ("purge");205 cmd = opkg_cmd_find ("purge"); 206 206 else 207 cmd = ipkg_cmd_find ("remove");208 209 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL);210 211 ipkg_conf_deinit(&ipkg_conf);207 cmd = opkg_cmd_find ("remove"); 208 209 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL); 210 211 opkg_conf_deinit(&opkg_conf); 212 212 return (err); 213 213 } … … 215 215 216 216 int 217 ipkg_lists_update(args_t *args)218 { 219 ipkg_cmd_t *cmd;220 ipkg_conf_t ipkg_conf;221 int err; 222 223 err = ipkg_conf_init (&ipkg_conf, args);224 if (err) 225 { 226 return err; 227 } 228 229 /* we need to do this because of static declarations, 230 * maybe a good idea to change */ 231 cmd = ipkg_cmd_find ("update");232 233 err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, NULL);234 235 ipkg_conf_deinit(&ipkg_conf);217 opkg_lists_update(args_t *args) 218 { 219 opkg_cmd_t *cmd; 220 opkg_conf_t opkg_conf; 221 int err; 222 223 err = opkg_conf_init (&opkg_conf, args); 224 if (err) 225 { 226 return err; 227 } 228 229 /* we need to do this because of static declarations, 230 * maybe a good idea to change */ 231 cmd = opkg_cmd_find ("update"); 232 233 err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, NULL); 234 235 opkg_conf_deinit(&opkg_conf); 236 236 return (err); 237 237 } … … 239 239 240 240 int 241 ipkg_packages_upgrade(args_t *args)242 { 243 ipkg_cmd_t *cmd;244 ipkg_conf_t ipkg_conf;245 int err; 246 247 err = ipkg_conf_init (&ipkg_conf, args);248 if (err) 249 { 250 return err; 251 } 252 253 /* we need to do this because of static declarations, 254 * maybe a good idea to change */ 255 cmd = ipkg_cmd_find ("upgrade");256 257 err = ipkg_cmd_exec (cmd, &ipkg_conf, 0, NULL, NULL);258 259 ipkg_conf_deinit(&ipkg_conf);260 return (err); 261 } 262 263 264 int 265 ipkg_packages_download (args_t * args, const char *name)266 { 267 ipkg_cmd_t *cmd;268 ipkg_conf_t ipkg_conf;241 opkg_packages_upgrade(args_t *args) 242 { 243 opkg_cmd_t *cmd; 244 opkg_conf_t opkg_conf; 245 int err; 246 247 err = opkg_conf_init (&opkg_conf, args); 248 if (err) 249 { 250 return err; 251 } 252 253 /* we need to do this because of static declarations, 254 * maybe a good idea to change */ 255 cmd = opkg_cmd_find ("upgrade"); 256 257 err = opkg_cmd_exec (cmd, &opkg_conf, 0, NULL, NULL); 258 259 opkg_conf_deinit(&opkg_conf); 260 return (err); 261 } 262 263 264 int 265 opkg_packages_download (args_t * args, const char *name) 266 { 267 opkg_cmd_t *cmd; 268 opkg_conf_t opkg_conf; 269 269 int err; 270 270 … … 273 273 return (-1); 274 274 275 err = ipkg_conf_init (&ipkg_conf, args);275 err = opkg_conf_init (&opkg_conf, args); 276 276 if (err) 277 277 { … … 281 281 /* we need to do this because of static declarations, 282 282 * maybe a good idea to change */ 283 cmd = ipkg_cmd_find ("download");284 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, NULL);285 286 ipkg_conf_deinit(&ipkg_conf);287 return (err); 288 } 289 290 291 int 292 ipkg_package_files(args_t *args,283 cmd = opkg_cmd_find ("download"); 284 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, NULL); 285 286 opkg_conf_deinit(&opkg_conf); 287 return (err); 288 } 289 290 291 int 292 opkg_package_files(args_t *args, 293 293 const char *name, 294 ipkg_list_callback cblist,294 opkg_list_callback cblist, 295 295 void *userdata) 296 296 { 297 ipkg_cmd_t *cmd;298 ipkg_conf_t ipkg_conf;297 opkg_cmd_t *cmd; 298 opkg_conf_t opkg_conf; 299 299 int err; 300 300 … … 303 303 return (-1); 304 304 305 err = ipkg_conf_init (&ipkg_conf, args);306 if (err) 307 { 308 return err; 309 } 310 311 ipkg_cb_list = cblist;312 313 /* we need to do this because of static declarations, 314 * maybe a good idea to change */ 315 cmd = ipkg_cmd_find ("files");316 317 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &name, userdata);318 319 ipkg_cb_list = NULL;320 ipkg_conf_deinit(&ipkg_conf);305 err = opkg_conf_init (&opkg_conf, args); 306 if (err) 307 { 308 return err; 309 } 310 311 opkg_cb_list = cblist; 312 313 /* we need to do this because of static declarations, 314 * maybe a good idea to change */ 315 cmd = opkg_cmd_find ("files"); 316 317 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &name, userdata); 318 319 opkg_cb_list = NULL; 320 opkg_conf_deinit(&opkg_conf); 321 321 return (err); 322 322 } … … 324 324 325 325 int 326 ipkg_file_search(args_t *args,326 opkg_file_search(args_t *args, 327 327 const char *file, 328 ipkg_list_callback cblist,328 opkg_list_callback cblist, 329 329 void *userdata) 330 330 { 331 ipkg_cmd_t *cmd;332 ipkg_conf_t ipkg_conf;331 opkg_cmd_t *cmd; 332 opkg_conf_t opkg_conf; 333 333 int err; 334 334 … … 337 337 return (-1); 338 338 339 err = ipkg_conf_init (&ipkg_conf, args);340 if (err) 341 { 342 return err; 343 } 344 345 ipkg_cb_list = cblist;346 347 /* we need to do this because of static declarations, 348 * maybe a good idea to change */ 349 cmd = ipkg_cmd_find ("search");350 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &file, userdata);351 352 ipkg_cb_list = NULL;353 ipkg_conf_deinit(&ipkg_conf);339 err = opkg_conf_init (&opkg_conf, args); 340 if (err) 341 { 342 return err; 343 } 344 345 opkg_cb_list = cblist; 346 347 /* we need to do this because of static declarations, 348 * maybe a good idea to change */ 349 cmd = opkg_cmd_find ("search"); 350 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &file, userdata); 351 352 opkg_cb_list = NULL; 353 opkg_conf_deinit(&opkg_conf); 354 354 return(err); 355 355 } … … 357 357 358 358 int 359 ipkg_file_what(args_t *args, const char *file, const char* command)360 { 361 ipkg_cmd_t *cmd;362 ipkg_conf_t ipkg_conf;359 opkg_file_what(args_t *args, const char *file, const char* command) 360 { 361 opkg_cmd_t *cmd; 362 opkg_conf_t opkg_conf; 363 363 int err; 364 364 … … 367 367 return (-1); 368 368 369 err = ipkg_conf_init (&ipkg_conf, args);370 if (err) 371 { 372 return err; 373 } 374 375 /* we need to do this because of static declarations, 376 * maybe a good idea to change */ 377 cmd = ipkg_cmd_find (command);378 err = ipkg_cmd_exec (cmd, &ipkg_conf, 1, &file, NULL);379 380 ipkg_conf_deinit(&ipkg_conf);369 err = opkg_conf_init (&opkg_conf, args); 370 if (err) 371 { 372 return err; 373 } 374 375 /* we need to do this because of static declarations, 376 * maybe a good idea to change */ 377 cmd = opkg_cmd_find (command); 378 err = opkg_cmd_exec (cmd, &opkg_conf, 1, &file, NULL); 379 380 opkg_conf_deinit(&opkg_conf); 381 381 return(err); 382 382 } 383 383 384 #define ipkg_package_whatdepends(args,file) ipkg_file_what(args,file,"whatdepends")385 #define ipkg_package_whatrecommends(args, file) ipkg_file_what(args,file,"whatrecommends")386 #define ipkg_package_whatprovides(args, file) ipkg_file_what(args,file,"whatprovides")387 #define ipkg_package_whatconflicts(args, file) ipkg_file_what(args,file,"whatconflicts")388 #define ipkg_package_whatreplaces(args, file) ipkg_file_what(args,file,"whatreplaces")389 390 391 int default_ ipkg_message_callback(ipkg_conf_t *conf, message_level_t level,384 #define opkg_package_whatdepends(args,file) opkg_file_what(args,file,"whatdepends") 385 #define opkg_package_whatrecommends(args, file) opkg_file_what(args,file,"whatrecommends") 386 #define opkg_package_whatprovides(args, file) opkg_file_what(args,file,"whatprovides") 387 #define opkg_package_whatconflicts(args, file) opkg_file_what(args,file,"whatconflicts") 388 #define opkg_package_whatreplaces(args, file) opkg_file_what(args,file,"whatreplaces") 389 390 391 int default_opkg_message_callback(opkg_conf_t *conf, message_level_t level, 392 392 char *msg) 393 393 { … … 395 395 return 0; 396 396 } else { 397 #ifdef IPKG_LIB398 if ( level == IPKG_ERROR ){397 #ifdef OPKG_LIB 398 if ( level == OPKG_ERROR ){ 399 399 push_error_list(&error_list, msg); 400 400 // printf(msg); … … 406 406 } 407 407 408 int default_ ipkg_list_callback(char *name, char *desc, char *version,408 int default_opkg_list_callback(char *name, char *desc, char *version, 409 409 pkg_state_status_t status, void *userdata) 410 410 { … … 416 416 } 417 417 418 int default_ ipkg_files_callback(char *name, char *desc, char *version,418 int default_opkg_files_callback(char *name, char *desc, char *version, 419 419 pkg_state_status_t status, void *userdata) 420 420 { … … 424 424 } 425 425 426 int default_ ipkg_status_callback(char *name, int istatus, char *desc,426 int default_opkg_status_callback(char *name, int istatus, char *desc, 427 427 void *userdata) 428 428 { … … 431 431 } 432 432 433 char* default_ ipkg_response_callback(char *question)433 char* default_opkg_response_callback(char *question) 434 434 { 435 435 char *response = NULL; … … 444 444 /* This is used for backward compatibility */ 445 445 int 446 ipkg_op (int argc, char *argv[])446 opkg_op (int argc, char *argv[]) 447 447 { 448 448 int err, optind; 449 449 args_t args; 450 450 char *cmd_name; 451 ipkg_cmd_t *cmd;452 ipkg_conf_t ipkg_conf;451 opkg_cmd_t *cmd; 452 opkg_conf_t opkg_conf; 453 453 454 454 args_init (&args); … … 457 457 if (optind == argc || optind < 0) 458 458 { 459 args_usage (" ipkg must have one sub-command argument");459 args_usage ("opkg must have one sub-command argument"); 460 460 } 461 461 … … 486 486 487 487 488 err = ipkg_conf_init (&ipkg_conf, &args);488 err = opkg_conf_init (&opkg_conf, &args); 489 489 if (err) 490 490 { … … 494 494 args_deinit (&args); 495 495 496 ipkg_cb_message = default_ipkg_message_callback;497 ipkg_cb_response = default_ipkg_response_callback;498 ipkg_cb_status = default_ipkg_status_callback;496 opkg_cb_message = default_opkg_message_callback; 497 opkg_cb_response = default_opkg_response_callback; 498 opkg_cb_status = default_opkg_status_callback; 499 499 if ( strcmp(cmd_name, "files")==0) 500 ipkg_cb_list = default_ipkg_files_callback;500 opkg_cb_list = default_opkg_files_callback; 501 501 else 502 ipkg_cb_list = default_ipkg_list_callback;503 504 cmd = ipkg_cmd_find (cmd_name);502 opkg_cb_list = default_opkg_list_callback; 503 504 cmd = opkg_cmd_find (cmd_name); 505 505 if (cmd == NULL) 506 506 { … … 518 518 } 519 519 520 err = ipkg_cmd_exec (cmd, &ipkg_conf, argc - optind, (const char **) (argv + optind), NULL);521 522 ipkg_conf_deinit (&ipkg_conf);520 err = opkg_cmd_exec (cmd, &opkg_conf, argc - optind, (const char **) (argv + optind), NULL); 521 522 opkg_conf_deinit (&opkg_conf); 523 523 524 524 return err; 525 525 } 526 526 527 #endif /* IPKG_LIB */527 #endif /* OPKG_LIB */ -
trunk/src/target/ipkg/libopkg.h
r3877 r3879 1 /* ipkglib.h - the itsy package management system1 /* opkglib.h - the itsy package management system 2 2 3 3 Florian Boor <florian.boor@kernelconcepts.de> … … 14 14 */ 15 15 16 #ifndef IPKGLIB_H17 #define IPKGLIB_H16 #ifndef OPKGLIB_H 17 #define OPKGLIB_H 18 18 19 19 #ifdef HAVE_CONFIG_H … … 22 22 23 23 24 #ifdef IPKG_LIB24 #ifdef OPKG_LIB 25 25 26 #include " ipkg_conf.h"27 #include " ipkg_message.h"26 #include "opkg_conf.h" 27 #include "opkg_message.h" 28 28 29 29 #include "args.h" 30 30 #include "pkg.h" 31 31 32 typedef int (* ipkg_message_callback)(ipkg_conf_t *conf, message_level_t level,32 typedef int (*opkg_message_callback)(opkg_conf_t *conf, message_level_t level, 33 33 char *msg); 34 typedef int (* ipkg_list_callback)(char *name, char *desc, char *version,34 typedef int (*opkg_list_callback)(char *name, char *desc, char *version, 35 35 pkg_state_status_t status, void *userdata); 36 typedef int (* ipkg_status_callback)(char *name, int istatus, char *desc,36 typedef int (*opkg_status_callback)(char *name, int istatus, char *desc, 37 37 void *userdata); 38 typedef char* (* ipkg_response_callback)(char *question);38 typedef char* (*opkg_response_callback)(char *question); 39 39 40 extern int ipkg_op(int argc, char *argv[]); /* ipkglib.c */41 extern int ipkg_init (ipkg_message_callback mcall,42 ipkg_response_callback rcall,40 extern int opkg_op(int argc, char *argv[]); /* opkglib.c */ 41 extern int opkg_init (opkg_message_callback mcall, 42 opkg_response_callback rcall, 43 43 args_t * args); 44 44 45 extern int ipkg_deinit (args_t *args);46 extern int ipkg_packages_list(args_t *args,45 extern int opkg_deinit (args_t *args); 46 extern int opkg_packages_list(args_t *args, 47 47 const char *packages, 48 ipkg_list_callback cblist,48 opkg_list_callback cblist, 49 49 void *userdata); 50 extern int ipkg_packages_status(args_t *args,50 extern int opkg_packages_status(args_t *args, 51 51 const char *packages, 52 ipkg_status_callback cbstatus,52 opkg_status_callback cbstatus, 53 53 void *userdata); 54 extern int ipkg_packages_info(args_t *args,54 extern int opkg_packages_info(args_t *args, 55 55 const char *packages, 56 ipkg_status_callback cbstatus,56 opkg_status_callback cbstatus, 57 57 void *userdata); 58 extern int ipkg_packages_install(args_t *args, const char *name);59 extern int ipkg_packages_remove(args_t *args, const char *name, int purge);60 extern int ipkg_lists_update(args_t *args);61 extern int ipkg_packages_upgrade(args_t *args);62 extern int ipkg_packages_download(args_t *args, const char *name);63 extern int ipkg_package_files(args_t *args,58 extern int opkg_packages_install(args_t *args, const char *name); 59 extern int opkg_packages_remove(args_t *args, const char *name, int purge); 60 extern int opkg_lists_update(args_t *args); 61 extern int opkg_packages_upgrade(args_t *args); 62 extern int opkg_packages_download(args_t *args, const char *name); 63 extern int opkg_package_files(args_t *args, 64 64 const char *name, 65 ipkg_list_callback cblist,65 opkg_list_callback cblist, 66 66 void *userdata); 67 extern int ipkg_file_search(args_t *args,67 extern int opkg_file_search(args_t *args, 68 68 const char *file, 69 ipkg_list_callback cblist,69 opkg_list_callback cblist, 70 70 void *userdata); 71 extern int ipkg_package_whatdepends(args_t *args, const char *file);72 extern int ipkg_package_whatrecommends(args_t *args, const char *file);73 extern int ipkg_package_whatprovides(args_t *args, const char *file);74 extern int ipkg_package_whatconflicts(args_t *args, const char *file);75 extern int ipkg_package_whatreplaces(args_t *args, const char *file);71 extern int opkg_package_whatdepends(args_t *args, const char *file); 72 extern int opkg_package_whatrecommends(args_t *args, const char *file); 73 extern int opkg_package_whatprovides(args_t *args, const char *file); 74 extern int opkg_package_whatconflicts(args_t *args, const char *file); 75 extern int opkg_package_whatreplaces(args_t *args, const char *file); 76 76 77 extern ipkg_message_callback ipkg_cb_message; /* ipkglib.c */78 extern ipkg_response_callback ipkg_cb_response;79 extern ipkg_status_callback ipkg_cb_status;80 extern ipkg_list_callback ipkg_cb_list;77 extern opkg_message_callback opkg_cb_message; /* opkglib.c */ 78 extern opkg_response_callback opkg_cb_response; 79 extern opkg_status_callback opkg_cb_status; 80 extern opkg_list_callback opkg_cb_list; 81 81 extern void push_error_list(struct errlist **errors,char * msg); 82 82 extern void reverse_error_list(struct errlist **errors); -
trunk/src/target/ipkg/libopkg.pc.in
r3877 r3879 4 4 includedir=${prefix}/include 5 5 6 Name: lib ipkg7 Description: ipkg package manager library6 Name: libopkg 7 Description: opkg package manager library 8 8 Version: @VERSION@ 9 Libs: -L${libdir} -l ipkg10 Cflags: -I${includedir}/lib ipkg9 Libs: -L${libdir} -lopkg 10 Cflags: -I${includedir}/libopkg 11 11 -
trunk/src/target/ipkg/md5.c
r3837 r3879 21 21 /* Hacked to work with BusyBox by Alfred M. Szmidt <ams@trillian.itslinux.org> */ 22 22 23 /* Sucked directly into ipkg since the md5sum functions aren't in libbb24 Dropped a few functions since ipkg only needs md5_stream.23 /* Sucked directly into opkg since the md5sum functions aren't in libbb 24 Dropped a few functions since opkg only needs md5_stream. 25 25 Got rid of evil, twisted defines of FALSE=1 and TRUE=0 26 26 6 March 2002 Carl Worth <cworth@east.isi.edu> -
trunk/src/target/ipkg/nv_pair.c
r3837 r3879 16 16 */ 17 17 18 #include " ipkg.h"18 #include "opkg.h" 19 19 20 20 #include "nv_pair.h" -
trunk/src/target/ipkg/nv_pair_list.c
r3837 r3879 16 16 */ 17 17 18 #include " ipkg.h"18 #include "opkg.h" 19 19 20 20 #include "nv_pair.h" -
trunk/src/target/ipkg/opkg-frontend.c
r3877 r3879 1 /* ipkg-frontend.c - the itsy package management system1 /* opkg-frontend.c - the itsy package management system 2 2 3 3 Florina Boor … … 15 15 General Public License for more details. 16 16 17 ipkg command line frontend using libipkg17 opkg command line frontend using libopkg 18 18 19 19 */ 20 20 21 #include "lib ipkg.h"21 #include "libopkg.h" 22 22 23 23 /* This is really small, eh? ;-) */ … … 25 25 int main(int argc, char *argv[]) 26 26 { 27 return ipkg_op(argc,argv);27 return opkg_op(argc,argv); 28 28 } -
trunk/src/target/ipkg/opkg.c
r3877 r3879 1 /* ipkg.c - the itsy package management system1 /* opkg.c - the itsy package management system 2 2 3 3 Carl D. Worth … … 16 16 */ 17 17 18 #include " ipkg.h"18 #include "opkg.h" 19 19 20 20 #include "args.h" 21 #include " ipkg_conf.h"22 #include " ipkg_cmd.h"21 #include "opkg_conf.h" 22 #include "opkg_cmd.h" 23 23 24 24 int main(int argc, const char *argv[]) … … 27 27 args_t args; 28 28 char *cmd_name; 29 ipkg_cmd_t *cmd;30 ipkg_conf_t ipkg_conf;29 opkg_cmd_t *cmd; 30 opkg_conf_t opkg_conf; 31 31 32 32 error_list=NULL; … … 36 36 optind = args_parse(&args, argc, argv); 37 37 if (optind == argc || optind < 0) { 38 args_usage(" ipkg must have one sub-command argument");38 args_usage("opkg must have one sub-command argument"); 39 39 } 40 40 41 41 cmd_name = argv[optind++]; 42 42 43 err = ipkg_conf_init(&ipkg_conf, &args);43 err = opkg_conf_init(&opkg_conf, &args); 44 44 if (err) { 45 45 return err; … … 48 48 args_deinit(&args); 49 49 50 cmd = ipkg_cmd_find(cmd_name);50 cmd = opkg_cmd_find(cmd_name); 51 51 if (cmd == NULL) { 52 52 fprintf(stderr, "%s: unknown sub-command %s\n", argv[0], cmd_name); … … 60 60 } 61 61 62 err = ipkg_cmd_exec(cmd, &ipkg_conf, argc - optind, argv + optind);62 err = opkg_cmd_exec(cmd, &opkg_conf, argc - optind, argv + optind); 63 63 64 64 if ( err == 0 ) { 65 ipkg_message(ipkg_conf, IPKG_NOTICE, "Succesfully done.\n");65 opkg_message(opkg_conf, OPKG_NOTICE, "Succesfully done.\n"); 66 66 } else { 67 ipkg_message(ipkg_conf, IPKG_NOTICE, "Error returned. Return value is %d\n.",err);67 opkg_message(opkg_conf, OPKG_NOTICE, "Error returned. Return value is %d\n.",err); 68 68 69 69 } … … 71 71 } 72 72 /* XXX: FEATURE request: run ldconfig and/or depmod after package needing them are installed or removed */ 73 // ipkg_global_postinst();73 // opkg_global_postinst(); 74 74 75 ipkg_conf_deinit(&ipkg_conf);75 opkg_conf_deinit(&opkg_conf); 76 76 77 77 return err; -
trunk/src/target/ipkg/opkg.h
r3877 r3879 1 /* ipkg.h - the itsy package management system1 /* opkg.h - the itsy package management system 2 2 3 3 Carl D. Worth … … 16 16 */ 17 17 18 #ifndef IPKG_H19 #define IPKG_H18 #ifndef OPKG_H 19 #define OPKG_H 20 20 21 21 #ifdef HAVE_CONFIG_H … … 24 24 25 25 #if 0 26 #define IPKG_DEBUG_NO_TMP_CLEANUP26 #define OPKG_DEBUG_NO_TMP_CLEANUP 27 27 #endif 28 28 29 29 #include "includes.h" 30 #include " ipkg_conf.h"31 #include " ipkg_message.h"30 #include "opkg_conf.h" 31 #include "opkg_message.h" 32 32 33 #define IPKG_PKG_EXTENSION ".ipk"33 #define OPKG_PKG_EXTENSION ".ipk" 34 34 #define DPKG_PKG_EXTENSION ".deb" 35 35 36 #define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"37 #define IPKG_PKG_VERSION_SEP_CHAR '_'36 #define OPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" 37 #define OPKG_PKG_VERSION_SEP_CHAR '_' 38 38 39 #define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg"40 #define IPKG_LISTS_DIR_SUFFIX "lists"41 #define IPKG_INFO_DIR_SUFFIX "info"42 #define IPKG_STATUS_FILE_SUFFIX "status"39 #define OPKG_STATE_DIR_PREFIX OPKGLIBDIR"/opkg" 40 #define OPKG_LISTS_DIR_SUFFIX "lists" 41 #define OPKG_INFO_DIR_SUFFIX "info" 42 #define OPKG_STATUS_FILE_SUFFIX "status" 43 43 44 #define IPKG_BACKUP_SUFFIX "-ipkg.backup"44 #define OPKG_BACKUP_SUFFIX "-opkg.backup" 45 45 46 #define IPKG_LIST_DESCRIPTION_LENGTH 12846 #define OPKG_LIST_DESCRIPTION_LENGTH 128 47 47 48 enum ipkg_error {49 IPKG_SUCCESS = 0,50 IPKG_PKG_DEPS_UNSATISFIED,51 IPKG_PKG_IS_ESSENTIAL,52 IPKG_PKG_HAS_DEPENDENTS,53 IPKG_PKG_HAS_NO_CANDIDATE48 enum opkg_error { 49 OPKG_SUCCESS = 0, 50 OPKG_PKG_DEPS_UNSATISFIED, 51 OPKG_PKG_IS_ESSENTIAL, 52 OPKG_PKG_HAS_DEPENDENTS, 53 OPKG_PKG_HAS_NO_CANDIDATE 54 54 }; 55 typedef enum ipkg_error ipkg_error_t;55 typedef enum opkg_error opkg_error_t; 56 56 57 extern int ipkg_state_changed;57 extern int opkg_state_changed; 58 58 59 59 -
trunk/src/target/ipkg/opkg.h.in
r3877 r3879 1 /* ipkg.h - the itsy package management system1 /* opkg.h - the itsy package management system 2 2 3 3 Carl D. Worth … … 16 16 */ 17 17 18 #ifndef IPKG_H19 #define IPKG_H18 #ifndef OPKG_H 19 #define OPKG_H 20 20 21 21 #ifdef HAVE_CONFIG_H … … 24 24 25 25 #if 0 26 #define IPKG_DEBUG_NO_TMP_CLEANUP26 #define OPKG_DEBUG_NO_TMP_CLEANUP 27 27 #endif 28 28 29 29 #include "includes.h" 30 #include " ipkg_conf.h"31 #include " ipkg_message.h"30 #include "opkg_conf.h" 31 #include "opkg_message.h" 32 32 33 #define IPKG_PKG_EXTENSION ".ipk"33 #define OPKG_PKG_EXTENSION ".ipk" 34 34 #define DPKG_PKG_EXTENSION ".deb" 35 35 36 #define IPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-"37 #define IPKG_PKG_VERSION_SEP_CHAR '_'36 #define OPKG_LEGAL_PKG_NAME_CHARS "abcdefghijklmnopqrstuvwxyz0123456789.+-" 37 #define OPKG_PKG_VERSION_SEP_CHAR '_' 38 38 39 #define IPKG_STATE_DIR_PREFIX IPKGLIBDIR"/ipkg"40 #define IPKG_LISTS_DIR_SUFFIX "lists"41 #define IPKG_INFO_DIR_SUFFIX "info"42 #define IPKG_STATUS_FILE_SUFFIX "status"39 #define OPKG_STATE_DIR_PREFIX OPKGLIBDIR"/opkg" 40 #define OPKG_LISTS_DIR_SUFFIX "lists" 41 #define OPKG_INFO_DIR_SUFFIX "info" 42 #define OPKG_STATUS_FILE_SUFFIX "status" 43 43 44 #define IPKG_BACKUP_SUFFIX "-ipkg.backup"44 #define OPKG_BACKUP_SUFFIX "-opkg.backup" 45 45 46 #define IPKG_LIST_DESCRIPTION_LENGTH 12846 #define OPKG_LIST_DESCRIPTION_LENGTH 128 47 47 48 enum ipkg_error {49 IPKG_SUCCESS = 0,50 IPKG_PKG_DEPS_UNSATISFIED,51 IPKG_PKG_IS_ESSENTIAL,52 IPKG_PKG_HAS_DEPENDENTS,53 IPKG_PKG_HAS_NO_CANDIDATE48 enum opkg_error { 49 OPKG_SUCCESS = 0, 50 OPKG_PKG_DEPS_UNSATISFIED, 51 OPKG_PKG_IS_ESSENTIAL, 52 OPKG_PKG_HAS_DEPENDENTS, 53 OPKG_PKG_HAS_NO_CANDIDATE 54 54 }; 55 typedef enum ipkg_error ipkg_error_t;55 typedef enum opkg_error opkg_error_t; 56 56 57 extern int ipkg_state_changed;57 extern int opkg_state_changed; 58 58 59 59 -
trunk/src/target/ipkg/opkg_cmd.c
r3877 r3879 1 /* ipkg_cmd.c - the itsy package management system1 /* opkg_cmd.c - the itsy package management system 2 2 3 3 Carl D. Worth … … 18 18 #include <string.h> 19 19 20 #include " ipkg.h"20 #include "opkg.h" 21 21 #include <libgen.h> 22 22 #include <glob.h> … … 28 28 #include <dirent.h> 29 29 30 #include " ipkg_conf.h"31 #include " ipkg_cmd.h"32 #include " ipkg_message.h"30 #include "opkg_conf.h" 31 #include "opkg_cmd.h" 32 #include "opkg_message.h" 33 33 #include "pkg.h" 34 34 #include "pkg_dest.h" … … 43 43 44 44 45 #include " ipkg_download.h"46 #include " ipkg_install.h"47 #include " ipkg_upgrade.h"48 #include " ipkg_remove.h"49 #include " ipkg_configure.h"50 #include " ipkg_message.h"51 52 #ifdef IPKG_LIB53 #include "lib ipkg.h"45 #include "opkg_download.h" 46 #include "opkg_install.h" 47 #include "opkg_upgrade.h" 48 #include "opkg_remove.h" 49 #include "opkg_configure.h" 50 #include "opkg_message.h" 51 52 #ifdef OPKG_LIB 53 #include "libopkg.h" 54 54 static void *p_userdata = NULL; 55 55 #endif 56 56 57 static int ipkg_update_cmd(ipkg_conf_t *conf, int argc, char **argv);58 static int ipkg_upgrade_cmd(ipkg_conf_t *conf, int argc, char **argv);59 static int ipkg_list_cmd(ipkg_conf_t *conf, int argc, char **argv);60 static int ipkg_info_cmd(ipkg_conf_t *conf, int argc, char **argv);61 static int ipkg_status_cmd(ipkg_conf_t *conf, int argc, char **argv);62 static int ipkg_install_pending_cmd(ipkg_conf_t *conf, int argc, char **argv);63 static int ipkg_install_cmd(ipkg_conf_t *conf, int argc, char **argv);64 static int ipkg_list_installed_cmd(ipkg_conf_t *conf, int argc, char **argv);65 static int ipkg_remove_cmd(ipkg_conf_t *conf, int argc, char **argv);66 static int ipkg_purge_cmd(ipkg_conf_t *conf, int argc, char **argv);67 static int ipkg_flag_cmd(ipkg_conf_t *conf, int argc, char **argv);68 static int ipkg_files_cmd(ipkg_conf_t *conf, int argc, char **argv);69 static int ipkg_search_cmd(ipkg_conf_t *conf, int argc, char **argv);70 static int ipkg_download_cmd(ipkg_conf_t *conf, int argc, char **argv);71 static int ipkg_depends_cmd(ipkg_conf_t *conf, int argc, char **argv);72 static int ipkg_whatdepends_cmd(ipkg_conf_t *conf, int argc, char **argv);73 static int ipkg_whatdepends_recursively_cmd(ipkg_conf_t *conf, int argc, char **argv);74 static int ipkg_whatsuggests_cmd(ipkg_conf_t *conf, int argc, char **argv);75 static int ipkg_whatrecommends_cmd(ipkg_conf_t *conf, int argc, char **argv);76 static int ipkg_whatprovides_cmd(ipkg_conf_t *conf, int argc, char **argv);77 static int ipkg_whatconflicts_cmd(ipkg_conf_t *conf, int argc, char **argv);78 static int ipkg_whatreplaces_cmd(ipkg_conf_t *conf, int argc, char **argv);79 static int ipkg_compare_versions_cmd(ipkg_conf_t *conf, int argc, char **argv);80 static int ipkg_print_architecture_cmd(ipkg_conf_t *conf, int argc, char **argv);81 static int ipkg_configure_cmd(ipkg_conf_t *conf, int argc, char **argv);57 static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv); 58 static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv); 59 static int opkg_list_cmd(opkg_conf_t *conf, int argc, char **argv); 60 static int opkg_info_cmd(opkg_conf_t *conf, int argc, char **argv); 61 static int opkg_status_cmd(opkg_conf_t *conf, int argc, char **argv); 62 static int opkg_install_pending_cmd(opkg_conf_t *conf, int argc, char **argv); 63 static int opkg_install_cmd(opkg_conf_t *conf, int argc, char **argv); 64 static int opkg_list_installed_cmd(opkg_conf_t *conf, int argc, char **argv); 65 static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv); 66 static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv); 67 static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv); 68 static int opkg_files_cmd(opkg_conf_t *conf, int argc, char **argv); 69 static int opkg_search_cmd(opkg_conf_t *conf, int argc, char **argv); 70 static int opkg_download_cmd(opkg_conf_t *conf, int argc, char **argv); 71 static int opkg_depends_cmd(opkg_conf_t *conf, int argc, char **argv); 72 static int opkg_whatdepends_cmd(opkg_conf_t *conf, int argc, char **argv); 73 static int opkg_whatdepends_recursively_cmd(opkg_conf_t *conf, int argc, char **argv); 74 static int opkg_whatsuggests_cmd(opkg_conf_t *conf, int argc, char **argv); 75 static int opkg_whatrecommends_cmd(opkg_conf_t *conf, int argc, char **argv); 76 static int opkg_whatprovides_cmd(opkg_conf_t *conf, int argc, char **argv); 77 static int opkg_whatconflicts_cmd(opkg_conf_t *conf, int argc, char **argv); 78 static int opkg_whatreplaces_cmd(opkg_conf_t *conf, int argc, char **argv); 79 static int opkg_compare_versions_cmd(opkg_conf_t *conf, int argc, char **argv); 80 static int opkg_print_architecture_cmd(opkg_conf_t *conf, int argc, char **argv); 81 static int opkg_configure_cmd(opkg_conf_t *conf, int argc, char **argv); 82 82 83 83 /* XXX: CLEANUP: The usage strings should be incorporated into this 84 84 array for easier maintenance */ 85 static ipkg_cmd_t cmds[] = {86 {"update", 0, ( ipkg_cmd_fun_t)ipkg_update_cmd},87 {"upgrade", 0, ( ipkg_cmd_fun_t)ipkg_upgrade_cmd},88 {"list", 0, ( ipkg_cmd_fun_t)ipkg_list_cmd},89 {"list_installed", 0, ( ipkg_cmd_fun_t)ipkg_list_installed_cmd},90 {"info", 0, ( ipkg_cmd_fun_t)ipkg_info_cmd},91 {"flag", 1, ( ipkg_cmd_fun_t)ipkg_flag_cmd},92 {"status", 0, ( ipkg_cmd_fun_t)ipkg_status_cmd},93 {"install_pending", 0, ( ipkg_cmd_fun_t)ipkg_install_pending_cmd},94 {"install", 1, ( ipkg_cmd_fun_t)ipkg_install_cmd},95 {"remove", 1, ( ipkg_cmd_fun_t)ipkg_remove_cmd},96 {"purge", 1, ( ipkg_cmd_fun_t)ipkg_purge_cmd},97 {"configure", 0, ( ipkg_cmd_fun_t)ipkg_configure_cmd},98 {"files", 1, ( ipkg_cmd_fun_t)ipkg_files_cmd},99 {"search", 1, ( ipkg_cmd_fun_t)ipkg_search_cmd},100 {"download", 1, ( ipkg_cmd_fun_t)ipkg_download_cmd},101 {"compare_versions", 1, ( ipkg_cmd_fun_t)ipkg_compare_versions_cmd},102 {"compare-versions", 1, ( ipkg_cmd_fun_t)ipkg_compare_versions_cmd},103 {"print-architecture", 0, ( ipkg_cmd_fun_t)ipkg_print_architecture_cmd},104 {"print_architecture", 0, ( ipkg_cmd_fun_t)ipkg_print_architecture_cmd},105 {"print-installation-architecture", 0, ( ipkg_cmd_fun_t)ipkg_print_architecture_cmd},106 {"print_installation_architecture", 0, ( ipkg_cmd_fun_t)ipkg_print_architecture_cmd},107 {"depends", 1, ( ipkg_cmd_fun_t)ipkg_depends_cmd},108 {"whatdepends", 1, ( ipkg_cmd_fun_t)ipkg_whatdepends_cmd},109 {"whatdependsrec", 1, ( ipkg_cmd_fun_t)ipkg_whatdepends_recursively_cmd},110 {"whatrecommends", 1, ( ipkg_cmd_fun_t)ipkg_whatrecommends_cmd},111 {"whatsuggests", 1, ( ipkg_cmd_fun_t)ipkg_whatsuggests_cmd},112 {"whatprovides", 1, ( ipkg_cmd_fun_t)ipkg_whatprovides_cmd},113 {"whatreplaces", 1, ( ipkg_cmd_fun_t)ipkg_whatreplaces_cmd},114 {"whatconflicts", 1, ( ipkg_cmd_fun_t)ipkg_whatconflicts_cmd},85 static opkg_cmd_t cmds[] = { 86 {"update", 0, (opkg_cmd_fun_t)opkg_update_cmd}, 87 {"upgrade", 0, (opkg_cmd_fun_t)opkg_upgrade_cmd}, 88 {"list", 0, (opkg_cmd_fun_t)opkg_list_cmd}, 89 {"list_installed", 0, (opkg_cmd_fun_t)opkg_list_installed_cmd}, 90 {"info", 0, (opkg_cmd_fun_t)opkg_info_cmd}, 91 {"flag", 1, (opkg_cmd_fun_t)opkg_flag_cmd}, 92 {"status", 0, (opkg_cmd_fun_t)opkg_status_cmd}, 93 {"install_pending", 0, (opkg_cmd_fun_t)opkg_install_pending_cmd}, 94 {"install", 1, (opkg_cmd_fun_t)opkg_install_cmd}, 95 {"remove", 1, (opkg_cmd_fun_t)opkg_remove_cmd}, 96 {"purge", 1, (opkg_cmd_fun_t)opkg_purge_cmd}, 97 {"configure", 0, (opkg_cmd_fun_t)opkg_configure_cmd}, 98 {"files", 1, (opkg_cmd_fun_t)opkg_files_cmd}, 99 {"search", 1, (opkg_cmd_fun_t)opkg_search_cmd}, 100 {"download", 1, (opkg_cmd_fun_t)opkg_download_cmd}, 101 {"compare_versions", 1, (opkg_cmd_fun_t)opkg_compare_versions_cmd}, 102 {"compare-versions", 1, (opkg_cmd_fun_t)opkg_compare_versions_cmd}, 103 {"print-architecture", 0, (opkg_cmd_fun_t)opkg_print_architecture_cmd}, 104 {"print_architecture", 0, (opkg_cmd_fun_t)opkg_print_architecture_cmd}, 105 {"print-installation-architecture", 0, (opkg_cmd_fun_t)opkg_print_architecture_cmd}, 106 {"print_installation_architecture", 0, (opkg_cmd_fun_t)opkg_print_architecture_cmd}, 107 {"depends", 1, (opkg_cmd_fun_t)opkg_depends_cmd}, 108 {"whatdepends", 1, (opkg_cmd_fun_t)opkg_whatdepends_cmd}, 109 {"whatdependsrec", 1, (opkg_cmd_fun_t)opkg_whatdepends_recursively_cmd}, 110 {"whatrecommends", 1, (opkg_cmd_fun_t)opkg_whatrecommends_cmd}, 111 {"whatsuggests", 1, (opkg_cmd_fun_t)opkg_whatsuggests_cmd}, 112 {"whatprovides", 1, (opkg_cmd_fun_t)opkg_whatprovides_cmd}, 113 {"whatreplaces", 1, (opkg_cmd_fun_t)opkg_whatreplaces_cmd}, 114 {"whatconflicts", 1, (opkg_cmd_fun_t)opkg_whatconflicts_cmd}, 115 115 }; 116 116 117 int ipkg_state_changed;118 static void write_status_files_if_changed( ipkg_conf_t *conf)119 { 120 if ( ipkg_state_changed && !conf->noaction) {121 ipkg_message(conf, IPKG_INFO,117 int opkg_state_changed; 118 static void write_status_files_if_changed(opkg_conf_t *conf) 119 { 120 if (opkg_state_changed && !conf->noaction) { 121 opkg_message(conf, OPKG_INFO, 122 122 " writing status file\n"); 123 ipkg_conf_write_status_files(conf);123 opkg_conf_write_status_files(conf); 124 124 pkg_write_changed_filelists(conf); 125 125 } else { 126 ipkg_message(conf, IPKG_NOTICE, "Nothing to be done\n");127 } 128 } 129 130 131 static int num_cmds = sizeof(cmds) / sizeof( ipkg_cmd_t);132 133 ipkg_cmd_t *ipkg_cmd_find(const char *name)126 opkg_message(conf, OPKG_NOTICE, "Nothing to be done\n"); 127 } 128 } 129 130 131 static int num_cmds = sizeof(cmds) / sizeof(opkg_cmd_t); 132 133 opkg_cmd_t *opkg_cmd_find(const char *name) 134 134 { 135 135 int i; 136 ipkg_cmd_t *cmd;136 opkg_cmd_t *cmd; 137 137 138 138 for (i=0; i < num_cmds; i++) { … … 146 146 } 147 147 148 #ifdef IPKG_LIB149 int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv, void *userdata)148 #ifdef OPKG_LIB 149 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, const char **argv, void *userdata) 150 150 { 151 151 int result; … … 155 155 result = (cmd->fun)(conf, argc, argv); 156 156 if ( result == 0 ) { 157 ipkg_message(conf, IPKG_NOTICE, "Successfully terminated.\n");157 opkg_message(conf, OPKG_NOTICE, "Successfully terminated.\n"); 158 158 } else { 159 ipkg_message(conf, IPKG_NOTICE, "An error ocurred, return value: %d.\n", result);159 opkg_message(conf, OPKG_NOTICE, "An error ocurred, return value: %d.\n", result); 160 160 161 161 } … … 163 163 reverse_error_list(&error_list); 164 164 165 ipkg_message(conf, IPKG_NOTICE, "Collected errors:\n");165 opkg_message(conf, OPKG_NOTICE, "Collected errors:\n"); 166 166 /* Here we print the errors collected and free the list */ 167 167 while (error_list != NULL) { 168 ipkg_message(conf, IPKG_NOTICE, "%s",error_list->errmsg);168 opkg_message(conf, OPKG_NOTICE, "%s",error_list->errmsg); 169 169 error_list = error_list->next; 170 170 … … 178 178 } 179 179 #else 180 int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv)180 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, const char **argv) 181 181 { 182 182 return (cmd->fun)(conf, argc, argv); … … 184 184 #endif 185 185 186 static int ipkg_update_cmd(ipkg_conf_t *conf, int argc, char **argv)186 static int opkg_update_cmd(opkg_conf_t *conf, int argc, char **argv) 187 187 { 188 188 int err; … … 197 197 if (! file_is_dir(lists_dir)) { 198 198 if (file_exists(lists_dir)) { 199 ipkg_message(conf, IPKG_ERROR,199 opkg_message(conf, OPKG_ERROR, 200 200 "%s: ERROR: %s exists, but is not a directory\n", 201 201 __FUNCTION__, lists_dir); … … 205 205 err = file_mkdir_hier(lists_dir, 0755); 206 206 if (err) { 207 ipkg_message(conf, IPKG_ERROR,207 opkg_message(conf, OPKG_ERROR, 208 208 "%s: ERROR: failed to make directory %s: %s\n", 209 209 __FUNCTION__, lists_dir, strerror(errno)); … … 231 231 FILE *in, *out; 232 232 233 tmp = strdup ("/tmp/ ipkg.XXXXXX");233 tmp = strdup ("/tmp/opkg.XXXXXX"); 234 234 235 235 if (mkdtemp (tmp) == NULL) { … … 240 240 241 241 sprintf_alloc (&tmp_file_name, "%s/%s.gz", tmp, src->name); 242 err = ipkg_download(conf, url, tmp_file_name);242 err = opkg_download(conf, url, tmp_file_name); 243 243 if (err == 0) { 244 ipkg_message (conf, IPKG_NOTICE, "Inflating %s\n", url);244 opkg_message (conf, OPKG_NOTICE, "Inflating %s\n", url); 245 245 in = fopen (tmp_file_name, "r"); 246 246 out = fopen (list_file_name, "w"); … … 258 258 } 259 259 } else 260 err = ipkg_download(conf, url, list_file_name);260 err = opkg_download(conf, url, list_file_name); 261 261 if (err) { 262 262 failures++; 263 263 } else { 264 ipkg_message(conf, IPKG_NOTICE,264 opkg_message(conf, OPKG_NOTICE, 265 265 "Updated list of available packages in %s\n", 266 266 list_file_name); … … 274 274 #warning here 275 275 /* clear SW_INSTALL on any package where state is SS_NOT_INSTALLED. 276 * this is a hack to work around poor bookkeeping in old ipkg upgrade code276 * this is a hack to work around poor bookkeeping in old opkg upgrade code 277 277 * -Jamey 3/1/03 278 278 */ … … 282 282 pkg_vec_t *available = pkg_vec_alloc(); 283 283 pkg_hash_fetch_available(&conf->pkg_hash, available); 284 ipkg_message(conf, IPKG_DEBUG, "Clearing SW_INSTALL for SS_NOT_INSTALLED packages.\n");284 opkg_message(conf, OPKG_DEBUG, "Clearing SW_INSTALL for SS_NOT_INSTALLED packages.\n"); 285 285 for (i = 0; i < available->len; i++) { 286 286 pkg_t *pkg = available->pkgs[i]; 287 287 if (pkg->state_want == SW_INSTALL && pkg->state_status == SS_NOT_INSTALLED) { 288 ipkg_message(conf, IPKG_DEBUG, "Clearing SW_INSTALL on package %s.\n", pkg->name);288 opkg_message(conf, OPKG_DEBUG, "Clearing SW_INSTALL on package %s.\n", pkg->name); 289 289 pkg->state_want = SW_UNKNOWN; 290 290 changed = 1; … … 303 303 304 304 /* scan the args passed and cache the local filenames of the packages */ 305 int ipkg_multiple_files_scan(ipkg_conf_t *conf, int argc, char **argv)305 int opkg_multiple_files_scan(opkg_conf_t *conf, int argc, char **argv) 306 306 { 307 307 int i; … … 318 318 //int tmplen = strlen (tmp); 319 319 320 //if (strcmp (tmp + (tmplen - strlen ( IPKG_PKG_EXTENSION)), IPKG_PKG_EXTENSION) != 0)320 //if (strcmp (tmp + (tmplen - strlen (OPKG_PKG_EXTENSION)), OPKG_PKG_EXTENSION) != 0) 321 321 // continue; 322 322 //if (strcmp (tmp + (tmplen - strlen (DPKG_PKG_EXTENSION)), DPKG_PKG_EXTENSION) != 0) 323 323 // continue; 324 324 325 ipkg_message(conf, IPKG_DEBUG2, "Debug mfs: %s \n",filename );326 327 err = ipkg_prepare_url_for_install(conf, filename, &argv[i]);325 opkg_message(conf, OPKG_DEBUG2, "Debug mfs: %s \n",filename ); 326 327 err = opkg_prepare_url_for_install(conf, filename, &argv[i]); 328 328 if (err) 329 329 return err; … … 332 332 } 333 333 334 struct ipkg_intercept334 struct opkg_intercept 335 335 { 336 336 char *oldpath; … … 338 338 }; 339 339 340 typedef struct ipkg_intercept *ipkg_intercept_t;341 342 ipkg_intercept_t ipkg_prep_intercepts(ipkg_conf_t *conf)343 { 344 ipkg_intercept_t ctx;340 typedef struct opkg_intercept *opkg_intercept_t; 341 342 opkg_intercept_t opkg_prep_intercepts(opkg_conf_t *conf) 343 { 344 opkg_intercept_t ctx; 345 345 char *newpath; 346 346 int gen; … … 349 349 ctx->oldpath = strdup (getenv ("PATH")); 350 350 351 sprintf_alloc (&newpath, "%s/ ipkg/intercept:%s", DATADIR, ctx->oldpath);351 sprintf_alloc (&newpath, "%s/opkg/intercept:%s", DATADIR, ctx->oldpath); 352 352 setenv ("PATH", newpath, 1); 353 353 free (newpath); … … 355 355 gen = 0; 356 356 retry: 357 sprintf_alloc (&ctx->statedir, "/tmp/ ipkg-intercept-%d-%d", getpid (), gen);357 sprintf_alloc (&ctx->statedir, "/tmp/opkg-intercept-%d-%d", getpid (), gen); 358 358 if (mkdir (ctx->statedir, 0770) < 0) { 359 359 if (errno == EEXIST) { … … 365 365 return NULL; 366 366 } 367 setenv (" IPKG_INTERCEPT_DIR", ctx->statedir, 1);367 setenv ("OPKG_INTERCEPT_DIR", ctx->statedir, 1); 368 368 return ctx; 369 369 } 370 370 371 int ipkg_finalize_intercepts(ipkg_intercept_t ctx)371 int opkg_finalize_intercepts(opkg_intercept_t ctx) 372 372 { 373 373 char *cmd; … … 409 409 } 410 410 411 int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name)411 int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name) 412 412 { 413 413 pkg_vec_t *all; 414 414 int i; 415 415 pkg_t *pkg; 416 ipkg_intercept_t ic;416 opkg_intercept_t ic; 417 417 int r, err = 0; 418 418 419 ipkg_message(conf, IPKG_INFO,419 opkg_message(conf, OPKG_INFO, 420 420 "Configuring unpacked packages\n"); 421 421 fflush( stdout ); … … 424 424 pkg_hash_fetch_available(&conf->pkg_hash, all); 425 425 426 ic = ipkg_prep_intercepts (conf);426 ic = opkg_prep_intercepts (conf); 427 427 428 428 for(i = 0; i < all->len; i++) { … … 433 433 434 434 if (pkg->state_status == SS_UNPACKED) { 435 ipkg_message(conf, IPKG_NOTICE,435 opkg_message(conf, OPKG_NOTICE, 436 436 "Configuring %s\n", pkg->name); 437 437 fflush( stdout ); 438 r = ipkg_configure(conf, pkg);438 r = opkg_configure(conf, pkg); 439 439 if (r == 0) { 440 440 pkg->state_status = SS_INSTALLED; … … 448 448 } 449 449 450 r = ipkg_finalize_intercepts (ic);450 r = opkg_finalize_intercepts (ic); 451 451 if (r && !err) 452 452 err = r; … … 456 456 } 457 457 458 static ipkg_conf_t *global_conf;458 static opkg_conf_t *global_conf; 459 459 460 460 static void sigint_handler(int sig) 461 461 { 462 462 signal(sig, SIG_DFL); 463 ipkg_message(NULL, IPKG_NOTICE,464 " ipkg: interrupted. writing out status database\n");463 opkg_message(NULL, OPKG_NOTICE, 464 "opkg: interrupted. writing out status database\n"); 465 465 write_status_files_if_changed(global_conf); 466 466 exit(128 + sig); 467 467 } 468 468 469 static int ipkg_install_cmd(ipkg_conf_t *conf, int argc, char **argv)469 static int opkg_install_cmd(opkg_conf_t *conf, int argc, char **argv) 470 470 { 471 471 int i; … … 482 482 arg = argv[i]; 483 483 484 ipkg_message(conf, IPKG_DEBUG2, "Debug install_cmd: %s \n",arg );485 err = ipkg_prepare_url_for_install(conf, arg, &argv[i]);484 opkg_message(conf, OPKG_DEBUG2, "Debug install_cmd: %s \n",arg ); 485 err = opkg_prepare_url_for_install(conf, arg, &argv[i]); 486 486 if (err != EINVAL && err != 0) 487 487 return err; … … 492 492 arg = argv[i]; 493 493 if (conf->multiple_providers) 494 err = ipkg_install_multi_by_name(conf, arg);494 err = opkg_install_multi_by_name(conf, arg); 495 495 else{ 496 err = ipkg_install_by_name(conf, arg);496 err = opkg_install_by_name(conf, arg); 497 497 } 498 if (err == IPKG_PKG_HAS_NO_CANDIDATE) {499 ipkg_message(conf, IPKG_ERROR,498 if (err == OPKG_PKG_HAS_NO_CANDIDATE) { 499 opkg_message(conf, OPKG_ERROR, 500 500 "Cannot find package %s.\n" 501 "Check the spelling or perhaps run ' ipkg update'\n",501 "Check the spelling or perhaps run 'opkg update'\n", 502 502 arg); 503 503 } … … 505 505 506 506 /* recheck to verify that all dependences are satisfied */ 507 if (0) ipkg_satisfy_all_dependences(conf);508 509 ipkg_configure_packages(conf, NULL);507 if (0) opkg_satisfy_all_dependences(conf); 508 509 opkg_configure_packages(conf, NULL); 510 510 511 511 write_status_files_if_changed(conf); … … 514 514 } 515 515 516 static int ipkg_upgrade_cmd(ipkg_conf_t *conf, int argc, char **argv)516 static int opkg_upgrade_cmd(opkg_conf_t *conf, int argc, char **argv) 517 517 { 518 518 int i; … … 527 527 char *arg = argv[i]; 528 528 529 err = ipkg_prepare_url_for_install(conf, arg, &arg);529 err = opkg_prepare_url_for_install(conf, arg, &arg); 530 530 if (err != EINVAL && err != 0) 531 531 return err; … … 540 540 conf->default_dest); 541 541 if (pkg == NULL) { 542 ipkg_message(conf, IPKG_NOTICE,542 opkg_message(conf, OPKG_NOTICE, 543 543 "Package %s not installed in %s\n", 544 544 argv[i], conf->default_dest->name); … … 550 550 } 551 551 if (pkg) 552 ipkg_upgrade_pkg(conf, pkg);552 opkg_upgrade_pkg(conf, pkg); 553 553 else { 554 ipkg_install_by_name(conf, arg);554 opkg_install_by_name(conf, arg); 555 555 } 556 556 } … … 563 563 for (i = 0; i < installed->len; i++) { 564 564 pkg = installed->pkgs[i]; 565 ipkg_upgrade_pkg(conf, pkg);565 opkg_upgrade_pkg(conf, pkg); 566 566 } 567 567 pkg_vec_free(installed); … … 569 569 570 570 /* recheck to verify that all dependences are satisfied */ 571 if (0) ipkg_satisfy_all_dependences(conf);572 573 ipkg_configure_packages(conf, NULL);571 if (0) opkg_satisfy_all_dependences(conf); 572 573 opkg_configure_packages(conf, NULL); 574 574 575 575 write_status_files_if_changed(conf); … … 578 578 } 579 579 580 static int ipkg_download_cmd(ipkg_conf_t *conf, int argc, char **argv)580 static int opkg_download_cmd(opkg_conf_t *conf, int argc, char **argv) 581 581 { 582 582 int i, err; … … 590 590 pkg = pkg_hash_fetch_best_installation_candidate_by_name(conf, arg); 591 591 if (pkg == NULL) { 592 ipkg_message(conf, IPKG_ERROR,592 opkg_message(conf, OPKG_ERROR, 593 593 "Cannot find package %s.\n" 594 "Check the spelling or perhaps run ' ipkg update'\n",594 "Check the spelling or perhaps run 'opkg update'\n", 595 595 arg); 596 596 continue; 597 597 } 598 598 599 err = ipkg_download_pkg(conf, pkg, ".");599 err = opkg_download_pkg(conf, pkg, "."); 600 600 601 601 if (err) { 602 ipkg_message(conf, IPKG_ERROR,602 opkg_message(conf, OPKG_ERROR, 603 603 "Failed to download %s\n", pkg->name); 604 604 } else { 605 ipkg_message(conf, IPKG_NOTICE,605 opkg_message(conf, OPKG_NOTICE, 606 606 "Downloaded %s as %s\n", 607 607 pkg->name, pkg->local_filename); … … 613 613 614 614 615 static int ipkg_list_cmd(ipkg_conf_t *conf, int argc, char **argv)615 static int opkg_list_cmd(opkg_conf_t *conf, int argc, char **argv) 616 616 { 617 617 int i ; 618 618 pkg_vec_t *available; 619 619 pkg_t *pkg; 620 char desc_short[ IPKG_LIST_DESCRIPTION_LENGTH];620 char desc_short[OPKG_LIST_DESCRIPTION_LENGTH]; 621 621 char *newline; 622 622 char *pkg_name = NULL; … … 634 634 continue; 635 635 if (pkg->description) { 636 strncpy(desc_short, pkg->description, IPKG_LIST_DESCRIPTION_LENGTH);636 strncpy(desc_short, pkg->description, OPKG_LIST_DESCRIPTION_LENGTH); 637 637 } else { 638 638 desc_short[0] = '\0'; 639 639 } 640 desc_short[ IPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0';640 desc_short[OPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0'; 641 641 newline = strchr(desc_short, '\n'); 642 642 if (newline) { 643 643 *newline = '\0'; 644 644 } 645 #ifndef IPKG_LIB645 #ifndef OPKG_LIB 646 646 printf("%s - %s\n", pkg->name, desc_short); 647 647 #else 648 if ( ipkg_cb_list) {648 if (opkg_cb_list) { 649 649 version_str = pkg_version_str_alloc(pkg); 650 ipkg_cb_list(pkg->name,desc_short,650 opkg_cb_list(pkg->name,desc_short, 651 651 version_str, 652 652 pkg->state_status, … … 662 662 663 663 664 static int ipkg_list_installed_cmd(ipkg_conf_t *conf, int argc, char **argv)664 static int opkg_list_installed_cmd(opkg_conf_t *conf, int argc, char **argv) 665 665 { 666 666 int i ; 667 667 pkg_vec_t *available; 668 668 pkg_t *pkg; 669 char desc_short[ IPKG_LIST_DESCRIPTION_LENGTH];669 char desc_short[OPKG_LIST_DESCRIPTION_LENGTH]; 670 670 char *newline; 671 671 char *pkg_name = NULL; … … 683 683 continue; 684 684 if (pkg->description) { 685 strncpy(desc_short, pkg->description, IPKG_LIST_DESCRIPTION_LENGTH);685 strncpy(desc_short, pkg->description, OPKG_LIST_DESCRIPTION_LENGTH); 686 686 } else { 687 687 desc_short[0] = '\0'; 688 688 } 689 desc_short[ IPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0';689 desc_short[OPKG_LIST_DESCRIPTION_LENGTH - 1] = '\0'; 690 690 newline = strchr(desc_short, '\n'); 691 691 if (newline) { 692 692 *newline = '\0'; 693 693 } 694 #ifndef IPKG_LIB694 #ifndef OPKG_LIB 695 695 printf("%s - %s\n", pkg->name, desc_short); 696 696 #else 697 if ( ipkg_cb_list) {697 if (opkg_cb_list) { 698 698 version_str = pkg_version_str_alloc(pkg); 699 ipkg_cb_list(pkg->name,desc_short,699 opkg_cb_list(pkg->name,desc_short, 700 700 version_str, 701 701 pkg->state_status, … … 709 709 } 710 710 711 static int ipkg_info_status_cmd(ipkg_conf_t *conf, int argc, char **argv, int installed_only)711 static int opkg_info_status_cmd(opkg_conf_t *conf, int argc, char **argv, int installed_only) 712 712 { 713 713 int i; … … 737 737 continue; 738 738 } 739 #ifndef IPKG_LIB739 #ifndef OPKG_LIB 740 740 if (n_fields) { 741 741 for (j = 0; j < n_fields; j++) … … 748 748 buff = pkg_formatted_info(pkg); 749 749 if ( buff ) { 750 if ( ipkg_cb_status) ipkg_cb_status(pkg->name,750 if (opkg_cb_status) opkg_cb_status(pkg->name, 751 751 pkg->state_status, 752 752 buff, … … 764 764 conffile_t *cf = iter->data; 765 765 int modified = conffile_has_been_modified(conf, cf); 766 ipkg_message(conf, IPKG_NOTICE, "conffile=%s md5sum=%s modified=%d\n",766 opkg_message(conf, OPKG_NOTICE, "conffile=%s md5sum=%s modified=%d\n", 767 767 cf->name, cf->value, modified); 768 768 } 769 769 } 770 770 } 771 #ifndef IPKG_LIB771 #ifndef OPKG_LIB 772 772 if (buff) 773 773 free(buff); … … 778 778 } 779 779 780 static int ipkg_info_cmd(ipkg_conf_t *conf, int argc, char **argv)781 { 782 return ipkg_info_status_cmd(conf, argc, argv, 0);783 } 784 785 static int ipkg_status_cmd(ipkg_conf_t *conf, int argc, char **argv)786 { 787 return ipkg_info_status_cmd(conf, argc, argv, 1);788 } 789 790 static int ipkg_configure_cmd(ipkg_conf_t *conf, int argc, char **argv)780 static int opkg_info_cmd(opkg_conf_t *conf, int argc, char **argv) 781 { 782 return opkg_info_status_cmd(conf, argc, argv, 0); 783 } 784 785 static int opkg_status_cmd(opkg_conf_t *conf, int argc, char **argv) 786 { 787 return opkg_info_status_cmd(conf, argc, argv, 1); 788 } 789 790 static int opkg_configure_cmd(opkg_conf_t *conf, int argc, char **argv) 791 791 { 792 792 … … 797 797 pkg_name = argv[0]; 798 798 799 err = ipkg_configure_packages (conf, pkg_name);799 err = opkg_configure_packages (conf, pkg_name); 800 800 801 801 } else { 802 err = ipkg_configure_packages (conf, NULL);802 err = opkg_configure_packages (conf, NULL); 803 803 } 804 804 … … 808 808 } 809 809 810 static int ipkg_install_pending_cmd(ipkg_conf_t *conf, int argc, char **argv)810 static int opkg_install_pending_cmd(opkg_conf_t *conf, int argc, char **argv) 811 811 { 812 812 int i, err; … … 814 814 glob_t globbuf; 815 815 816 sprintf_alloc(&globpattern, "%s/*" IPKG_PKG_EXTENSION, conf->pending_dir);816 sprintf_alloc(&globpattern, "%s/*" OPKG_PKG_EXTENSION, conf->pending_dir); 817 817 err = glob(globpattern, 0, NULL, &globbuf); 818 818 free(globpattern); … … 821 821 } 822 822 823 ipkg_message(conf, IPKG_NOTICE,823 opkg_message(conf, OPKG_NOTICE, 824 824 "The following packages in %s will now be installed.\n", 825 825 conf->pending_dir); 826 826 for (i = 0; i < globbuf.gl_pathc; i++) { 827 ipkg_message(conf, IPKG_NOTICE,827 opkg_message(conf, OPKG_NOTICE, 828 828 "%s%s", i == 0 ? "" : " ", globbuf.gl_pathv[i]); 829 829 } 830 ipkg_message(conf, IPKG_NOTICE, "\n");830 opkg_message(conf, OPKG_NOTICE, "\n"); 831 831 for (i = 0; i < globbuf.gl_pathc; i++) { 832 err = ipkg_install_from_file(conf, globbuf.gl_pathv[i]);832 err = opkg_install_from_file(conf, globbuf.gl_pathv[i]); 833 833 if (err == 0) { 834 834 err = unlink(globbuf.gl_pathv[i]); 835 835 if (err) { 836 ipkg_message(conf, IPKG_ERROR,836 opkg_message(conf, OPKG_ERROR, 837 837 "%s: ERROR: failed to unlink %s: %s\n", 838 838 __FUNCTION__, globbuf.gl_pathv[i], strerror(err)); … … 846 846 } 847 847 848 static int ipkg_remove_cmd(ipkg_conf_t *conf, int argc, char **argv)848 static int opkg_remove_cmd(opkg_conf_t *conf, int argc, char **argv) 849 849 { 850 850 int i,a,done; … … 881 881 882 882 if (pkg == NULL) { 883 ipkg_message(conf, IPKG_ERROR, "Package %s is not installed.\n", pkg->name);883 opkg_message(conf, OPKG_ERROR, "Package %s is not installed.\n", pkg->name); 884 884 continue; 885 885 } 886 886 if (pkg->state_status == SS_NOT_INSTALLED) { // Added the control, so every already removed package could be skipped 887 ipkg_message(conf, IPKG_ERROR, "Package seems to be %s not installed (STATUS = NOT_INSTALLED).\n", pkg->name);887 opkg_message(conf, OPKG_ERROR, "Package seems to be %s not installed (STATUS = NOT_INSTALLED).\n", pkg->name); 888 888 continue; 889 889 } 890 ipkg_remove_pkg(conf, pkg_to_remove,0);890 opkg_remove_pkg(conf, pkg_to_remove,0); 891 891 done = 1; 892 892 } … … 908 908 } else { 909 909 if (!pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) 910 ipkg_message(conf, IPKG_NOTICE, "Non-user leaf package: %s\n", pkg->name);910 opkg_message(conf, OPKG_NOTICE, "Non-user leaf package: %s\n", pkg->name); 911 911 } 912 912 } 913 913 if (!flagged_pkg_count) { 914 ipkg_message(conf, IPKG_NOTICE, "No packages flagged as installed by user, \n"914 opkg_message(conf, OPKG_NOTICE, "No packages flagged as installed by user, \n" 915 915 "so refusing to uninstall unflagged non-leaf packages\n"); 916 916 return 0; … … 927 927 && !pkg_has_installed_dependents(conf, pkg->parent, pkg, NULL)) { 928 928 removed++; 929 ipkg_message(conf, IPKG_NOTICE, "Removing non-user leaf package %s\n");930 ipkg_remove_pkg(conf, pkg,0);929 opkg_message(conf, OPKG_NOTICE, "Removing non-user leaf package %s\n"); 930 opkg_remove_pkg(conf, pkg,0); 931 931 done = 1; 932 932 } … … 937 937 938 938 if ( done == 0 ) 939 ipkg_message(conf, IPKG_NOTICE, "No packages removed.\n");939 opkg_message(conf, OPKG_NOTICE, "No packages removed.\n"); 940 940 941 941 write_status_files_if_changed(conf); … … 943 943 } 944 944 945 static int ipkg_purge_cmd(ipkg_conf_t *conf, int argc, char **argv)945 static int opkg_purge_cmd(opkg_conf_t *conf, int argc, char **argv) 946 946 { 947 947 int i; … … 963 963 964 964 if (pkg == NULL) { 965 ipkg_message(conf, IPKG_ERROR,965 opkg_message(conf, OPKG_ERROR, 966 966 "Package %s is not installed.\n", argv[i]); 967 967 continue; 968 968 } 969 ipkg_purge_pkg(conf, pkg);969 opkg_purge_pkg(conf, pkg); 970 970 } 971 971 … … 974 974 } 975 975 976 static int ipkg_flag_cmd(ipkg_conf_t *conf, int argc, char **argv)976 static int opkg_flag_cmd(opkg_conf_t *conf, int argc, char **argv) 977 977 { 978 978 int i; … … 993 993 994 994 if (pkg == NULL) { 995 ipkg_message(conf, IPKG_ERROR,995 opkg_message(conf, OPKG_ERROR, 996 996 "Package %s is not installed.\n", argv[i]); 997 997 continue; … … 1006 1006 pkg->state_status = pkg_state_status_from_str(flags); 1007 1007 } 1008 ipkg_state_changed++;1009 ipkg_message(conf, IPKG_NOTICE,1008 opkg_state_changed++; 1009 opkg_message(conf, OPKG_NOTICE, 1010 1010 "Setting flags for package %s to %s\n", 1011 1011 pkg->name, flags); … … 1016 1016 } 1017 1017 1018 static int ipkg_files_cmd(ipkg_conf_t *conf, int argc, char **argv)1018 static int opkg_files_cmd(opkg_conf_t *conf, int argc, char **argv) 1019 1019 { 1020 1020 pkg_t *pkg; … … 1039 1039 argv[0]); 1040 1040 if (pkg == NULL) { 1041 ipkg_message(conf, IPKG_ERROR,1041 opkg_message(conf, OPKG_ERROR, 1042 1042 "Package %s not installed.\n", argv[0]); 1043 1043 return 0; … … 1047 1047 pkg_version = pkg_version_str_alloc(pkg); 1048 1048 1049 #ifndef IPKG_LIB1049 #ifndef OPKG_LIB 1050 1050 printf("Package %s (%s) is installed on %s and has the following files:\n", 1051 1051 pkg->name, pkg_version, pkg->dest->name); … … 1072 1072 strncat(buff, "\n", buff_len); 1073 1073 } 1074 if ( ipkg_cb_list) ipkg_cb_list(pkg->name,1074 if (opkg_cb_list) opkg_cb_list(pkg->name, 1075 1075 buff, 1076 1076 pkg_version_str_alloc(pkg), … … 1087 1087 } 1088 1088 1089 static int ipkg_depends_cmd(ipkg_conf_t *conf, int argc, char **argv)1089 static int opkg_depends_cmd(opkg_conf_t *conf, int argc, char **argv) 1090 1090 { 1091 1091 … … 1105 1105 int j; 1106 1106 1107 ipkg_message(conf, IPKG_ERROR, "target=%s\n", target);1107 opkg_message(conf, OPKG_ERROR, "target=%s\n", target); 1108 1108 1109 1109 for (j = 0; j < available_pkgs->len; j++) { … … 1112 1112 int k; 1113 1113 int count = pkg->depends_count + pkg->pre_depends_count; 1114 ipkg_message(conf, IPKG_ERROR, "What %s (arch=%s) %s\n",1114 opkg_message(conf, OPKG_ERROR, "What %s (arch=%s) %s\n", 1115 1115 target, pkg->architecture, rel_str); 1116 1116 for (k = 0; k < count; k++) { … … 1119 1119 for (l = 0; l < cdepend->possibility_count; l++) { 1120 1120 depend_t *possibility = cdepend->possibilities[l]; 1121 ipkg_message(conf, IPKG_ERROR, " %s", possibility->pkg->name);1121 opkg_message(conf, OPKG_ERROR, " %s", possibility->pkg->name); 1122 1122 if (conf->verbosity > 0) { 1123 1123 // char *ver = abstract_pkg_version_str_alloc(possibility->pkg); 1124 ipkg_message(conf, IPKG_NOTICE, " %s", possibility->version);1124 opkg_message(conf, OPKG_NOTICE, " %s", possibility->version); 1125 1125 if (possibility->version) { 1126 1126 char *typestr = NULL; … … 1133 1133 case LATER: typestr = ">"; break; 1134 1134 } 1135 ipkg_message(conf, IPKG_NOTICE, " (%s %s)", typestr, possibility->version);1135 opkg_message(conf, OPKG_NOTICE, " (%s %s)", typestr, possibility->version); 1136 1136 } 1137 1137 // free(ver); 1138 1138 } 1139 ipkg_message(conf, IPKG_ERROR, "\n");1139 opkg_message(conf, OPKG_ERROR, "\n"); 1140 1140 } 1141 1141 } … … 1157 1157 }; 1158 1158 1159 static int ipkg_what_depends_conflicts_cmd(ipkg_conf_t *conf, enum what_field_type what_field_type, int recursive, int argc, char **argv)1159 static int opkg_what_depends_conflicts_cmd(opkg_conf_t *conf, enum what_field_type what_field_type, int recursive, int argc, char **argv) 1160 1160 { 1161 1161 … … 1182 1182 /* mark the root set */ 1183 1183 pkg_vec_clear_marks(available_pkgs); 1184 ipkg_message(conf, IPKG_NOTICE, "Root set:\n");1184 opkg_message(conf, OPKG_NOTICE, "Root set:\n"); 1185 1185 for (i = 0; i < argc; i++) { 1186 1186 const char *dependee_pattern = argv[i]; … … 1192 1192 /* mark the parent (abstract) package */ 1193 1193 pkg_mark_provides(pkg); 1194 ipkg_message(conf, IPKG_NOTICE, " %s\n", pkg->name);1194 opkg_message(conf, OPKG_NOTICE, " %s\n", pkg->name); 1195 1195 } 1196 1196 } 1197 1197 1198 ipkg_message(conf, IPKG_NOTICE, "What %s root set\n", rel_str);1198 opkg_message(conf, OPKG_NOTICE, "What %s root set\n", rel_str); 1199 1199 do { 1200 1200 int j; … … 1223 1223 changed++; 1224 1224 1225 ipkg_message(conf, IPKG_NOTICE, " %s", pkg->name);1225 opkg_message(conf, OPKG_NOTICE, " %s", pkg->name); 1226 1226 if (conf->verbosity > 0) { 1227 1227 char *ver = pkg_version_str_alloc(pkg); 1228 ipkg_message(conf, IPKG_NOTICE, " %s", ver);1229 ipkg_message(conf, IPKG_NOTICE, "\t%s %s", rel_str, possibility->pkg->name);1228 opkg_message(conf, OPKG_NOTICE, " %s", ver); 1229 opkg_message(conf, OPKG_NOTICE, "\t%s %s", rel_str, possibility->pkg->name); 1230 1230 if (possibility->version) { 1231 1231 char *typestr = NULL; … … 1238 1238 case LATER: typestr = ">"; break; 1239 1239 } 1240 ipkg_message(conf, IPKG_NOTICE, " (%s %s)", typestr, possibility->version);1240 opkg_message(conf, OPKG_NOTICE, " (%s %s)", typestr, possibility->version); 1241 1241 } 1242 1242 free(ver); 1243 1243 if (!pkg_dependence_satisfiable(conf, possibility)) 1244 ipkg_message(conf, IPKG_NOTICE, " unsatisfiable");1244 opkg_message(conf, OPKG_NOTICE, " unsatisfiable"); 1245 1245 } 1246 ipkg_message(conf, IPKG_NOTICE, "\n");1246 opkg_message(conf, OPKG_NOTICE, "\n"); 1247 1247 goto next_package; 1248 1248 } … … 1271 1271 } 1272 1272 1273 static int ipkg_whatdepends_recursively_cmd(ipkg_conf_t *conf, int argc, char **argv)1274 { 1275 return ipkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 1, argc, argv);1276 } 1277 static int ipkg_whatdepends_cmd(ipkg_conf_t *conf, int argc, char **argv)1278 { 1279 return ipkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 0, argc, argv);1280 } 1281 1282 static int ipkg_whatsuggests_cmd(ipkg_conf_t *conf, int argc, char **argv)1283 { 1284 return ipkg_what_depends_conflicts_cmd(conf, WHATSUGGESTS, 0, argc, argv);1285 } 1286 1287 static int ipkg_whatrecommends_cmd(ipkg_conf_t *conf, int argc, char **argv)1288 { 1289 return ipkg_what_depends_conflicts_cmd(conf, WHATRECOMMENDS, 0, argc, argv);1290 } 1291 1292 static int ipkg_whatconflicts_cmd(ipkg_conf_t *conf, int argc, char **argv)1293 { 1294 return ipkg_what_depends_conflicts_cmd(conf, WHATCONFLICTS, 0, argc, argv);1295 } 1296 1297 static int ipkg_what_provides_replaces_cmd(ipkg_conf_t *conf, enum what_field_type what_field_type, int argc, char **argv)1273 static int opkg_whatdepends_recursively_cmd(opkg_conf_t *conf, int argc, char **argv) 1274 { 1275 return opkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 1, argc, argv); 1276 } 1277 static int opkg_whatdepends_cmd(opkg_conf_t *conf, int argc, char **argv) 1278 { 1279 return opkg_what_depends_conflicts_cmd(conf, WHATDEPENDS, 0, argc, argv); 1280 } 1281 1282 static int opkg_whatsuggests_cmd(opkg_conf_t *conf, int argc, char **argv) 1283 { 1284 return opkg_what_depends_conflicts_cmd(conf, WHATSUGGESTS, 0, argc, argv); 1285 } 1286 1287 static int opkg_whatrecommends_cmd(opkg_conf_t *conf, int argc, char **argv) 1288 { 1289 return opkg_what_depends_conflicts_cmd(conf, WHATRECOMMENDS, 0, argc, argv); 1290 } 1291 1292 static int opkg_whatconflicts_cmd(opkg_conf_t *conf, int argc, char **argv) 1293 { 1294 return opkg_what_depends_conflicts_cmd(conf, WHATCONFLICTS, 0, argc, argv); 1295 } 1296 1297 static int opkg_what_provides_replaces_cmd(opkg_conf_t *conf, enum what_field_type what_field_type, int argc, char **argv) 1298 1298 { 1299 1299 … … 1313 1313 int j; 1314 1314 1315 ipkg_message(conf, IPKG_ERROR, "What %s %s\n",1315 opkg_message(conf, OPKG_ERROR, "What %s %s\n", 1316 1316 rel_str, target); 1317 1317 for (j = 0; j < available_pkgs->len; j++) { … … 1325 1325 : pkg->replaces[k]); 1326 1326 if (fnmatch(target, apkg->name, 0) == 0) { 1327 ipkg_message(conf, IPKG_ERROR, " %s", pkg->name);1327 opkg_message(conf, OPKG_ERROR, " %s", pkg->name); 1328 1328 if (strcmp(target, apkg->name) != 0) 1329 ipkg_message(conf, IPKG_ERROR, "\t%s %s\n", rel_str, apkg->name);1330 ipkg_message(conf, IPKG_ERROR, "\n");1329 opkg_message(conf, OPKG_ERROR, "\t%s %s\n", rel_str, apkg->name); 1330 opkg_message(conf, OPKG_ERROR, "\n"); 1331 1331 } 1332 1332 } … … 1338 1338 } 1339 1339 1340 static int ipkg_whatprovides_cmd(ipkg_conf_t *conf, int argc, char **argv)1341 { 1342 return ipkg_what_provides_replaces_cmd(conf, WHATPROVIDES, argc, argv);1343 } 1344 1345 static int ipkg_whatreplaces_cmd(ipkg_conf_t *conf, int argc, char **argv)1346 { 1347 return ipkg_what_provides_replaces_cmd(conf, WHATREPLACES, argc, argv);1348 } 1349 1350 static int ipkg_search_cmd(ipkg_conf_t *conf, int argc, char **argv)1340 static int opkg_whatprovides_cmd(opkg_conf_t *conf, int argc, char **argv) 1341 { 1342 return opkg_what_provides_replaces_cmd(conf, WHATPROVIDES, argc, argv); 1343 } 1344 1345 static int opkg_whatreplaces_cmd(opkg_conf_t *conf, int argc, char **argv) 1346 { 1347 return opkg_what_provides_replaces_cmd(conf, WHATREPLACES, argc, argv); 1348 } 1349 1350 static int opkg_search_cmd(opkg_conf_t *conf, int argc, char **argv) 1351 1351 { 1352 1352 int i; … … 1373 1373 installed_file = iter->data; 1374 1374 if (fnmatch(argv[0], installed_file, 0)==0) { 1375 #ifndef IPKG_LIB1375 #ifndef OPKG_LIB 1376 1376 printf("%s: %s\n", pkg->name, installed_file); 1377 1377 #else 1378 if ( ipkg_cb_list) ipkg_cb_list(pkg->name,1378 if (opkg_cb_list) opkg_cb_list(pkg->name, 1379 1379 installed_file, 1380 1380 pkg_version_str_alloc(pkg), … … 1395 1395 } 1396 1396 1397 static int ipkg_compare_versions_cmd(ipkg_conf_t *conf, int argc, char **argv)1397 static int opkg_compare_versions_cmd(opkg_conf_t *conf, int argc, char **argv) 1398 1398 { 1399 1399 if (argc == 3) { … … 1404 1404 return pkg_version_satisfied(&p1, &p2, argv[1]); 1405 1405 } else { 1406 ipkg_message(conf, IPKG_ERROR,1407 " ipkg compare_versions <v1> <op> <v2>\n"1406 opkg_message(conf, OPKG_ERROR, 1407 "opkg compare_versions <v1> <op> <v2>\n" 1408 1408 "<op> is one of <= >= << >> =\n"); 1409 1409 return -1; … … 1417 1417 #endif 1418 1418 1419 static int ipkg_print_architecture_cmd(ipkg_conf_t *conf, int argc, char **argv)1419 static int opkg_print_architecture_cmd(opkg_conf_t *conf, int argc, char **argv) 1420 1420 { 1421 1421 nv_pair_list_elt_t *l; -
trunk/src/target/ipkg/opkg_cmd.h
r3877 r3879 1 /* ipkg_cmd.h - the itsy package management system1 /* opkg_cmd.h - the itsy package management system 2 2 3 3 Carl D. Worth … … 16 16 */ 17 17 18 #ifndef IPKG_CMD_H19 #define IPKG_CMD_H18 #ifndef OPKG_CMD_H 19 #define OPKG_CMD_H 20 20 21 typedef int (* ipkg_cmd_fun_t)(ipkg_conf_t *conf, int argc, const char **argv);21 typedef int (*opkg_cmd_fun_t)(opkg_conf_t *conf, int argc, const char **argv); 22 22 23 struct ipkg_cmd23 struct opkg_cmd 24 24 { 25 25 char *name; 26 26 int requires_args; 27 ipkg_cmd_fun_t fun;27 opkg_cmd_fun_t fun; 28 28 }; 29 typedef struct ipkg_cmd ipkg_cmd_t;29 typedef struct opkg_cmd opkg_cmd_t; 30 30 31 ipkg_cmd_t *ipkg_cmd_find(const char *name);32 #ifdef IPKG_LIB33 int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc,31 opkg_cmd_t *opkg_cmd_find(const char *name); 32 #ifdef OPKG_LIB 33 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, 34 34 const char **argv, void *userdata); 35 35 #else 36 int ipkg_cmd_exec(ipkg_cmd_t *cmd, ipkg_conf_t *conf, int argc, const char **argv);36 int opkg_cmd_exec(opkg_cmd_t *cmd, opkg_conf_t *conf, int argc, const char **argv); 37 37 #endif 38 int ipkg_multiple_files_scan (ipkg_conf_t *conf, int argc, char *argv[]);38 int opkg_multiple_files_scan (opkg_conf_t *conf, int argc, char *argv[]); 39 39 /* install any packges with state_want == SW_INSTALL */ 40 int ipkg_install_wanted_packages(ipkg_conf_t *conf);40 int opkg_install_wanted_packages(opkg_conf_t *conf); 41 41 /* ensure that all dependences are satisfied */ 42 int ipkg_configure_packages(ipkg_conf_t *conf, char *pkg_name);42 int opkg_configure_packages(opkg_conf_t *conf, char *pkg_name); 43 43 44 44 int pkg_mark_provides(pkg_t *pkg); -
trunk/src/target/ipkg/opkg_conf.c
r3877 r3879 1 /* ipkg_conf.c - the itsy package management system1 /* opkg_conf.c - the itsy package management system 2 2 3 3 Carl D. Worth … … 18 18 #include <glob.h> 19 19 20 #include " ipkg.h"21 #include " ipkg_conf.h"20 #include "opkg.h" 21 #include "opkg_conf.h" 22 22 23 23 #include "xregex.h" 24 24 #include "sprintf_alloc.h" 25 #include " ipkg_conf.h"26 #include " ipkg_message.h"25 #include "opkg_conf.h" 26 #include "opkg_message.h" 27 27 #include "file_util.h" 28 28 #include "str_util.h" 29 29 #include "xsystem.h" 30 30 31 static int ipkg_conf_parse_file(ipkg_conf_t *conf, const char *filename,31 static int opkg_conf_parse_file(opkg_conf_t *conf, const char *filename, 32 32 pkg_src_list_t *pkg_src_list, 33 33 nv_pair_list_t *tmp_dest_nv_pair_list, 34 34 char **tmp_lists_dir); 35 static int ipkg_init_options_array(const ipkg_conf_t *conf, ipkg_option_t **options);36 static int ipkg_conf_set_option(const ipkg_option_t *options,35 static int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options); 36 static int opkg_conf_set_option(const opkg_option_t *options, 37 37 const char *name, const char *value); 38 static int ipkg_conf_set_default_dest(ipkg_conf_t *conf,38 static int opkg_conf_set_default_dest(opkg_conf_t *conf, 39 39 const char *default_dest_name); 40 static int set_and_load_pkg_src_list( ipkg_conf_t *conf,40 static int set_and_load_pkg_src_list(opkg_conf_t *conf, 41 41 pkg_src_list_t *nv_pair_list); 42 static int set_and_load_pkg_dest_list( ipkg_conf_t *conf,42 static int set_and_load_pkg_dest_list(opkg_conf_t *conf, 43 43 nv_pair_list_t *nv_pair_list, char * lists_dir); 44 44 45 int ipkg_init_options_array(const ipkg_conf_t *conf, ipkg_option_t **options)46 { 47 ipkg_option_t tmp[] = {48 { "force_defaults", IPKG_OPT_TYPE_BOOL, &conf->force_defaults },49 { "force_depends", IPKG_OPT_TYPE_BOOL, &conf->force_depends },50 { "force_overwrite", IPKG_OPT_TYPE_BOOL, &conf->force_overwrite },51 { "force_downgrade", IPKG_OPT_TYPE_BOOL, &conf->force_downgrade },52 { "force_reinstall", IPKG_OPT_TYPE_BOOL, &conf->force_reinstall },53 { "force_space", IPKG_OPT_TYPE_BOOL, &conf->force_space },54 { "ftp_proxy", IPKG_OPT_TYPE_STRING, &conf->ftp_proxy },55 { "http_proxy", IPKG_OPT_TYPE_STRING, &conf->http_proxy },56 { "multiple_providers", IPKG_OPT_TYPE_BOOL, &conf->multiple_providers },57 { "no_proxy", IPKG_OPT_TYPE_STRING, &conf->no_proxy },58 { "test", IPKG_OPT_TYPE_INT, &conf->noaction },59 { "noaction", IPKG_OPT_TYPE_INT, &conf->noaction },60 { "nodeps", IPKG_OPT_TYPE_BOOL, &conf->nodeps },61 { "offline_root", IPKG_OPT_TYPE_STRING, &conf->offline_root },62 { "offline_root_post_script_cmd", IPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd },63 { "offline_root_pre_script_cmd", IPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd },64 { "proxy_passwd", IPKG_OPT_TYPE_STRING, &conf->proxy_passwd },65 { "proxy_user", IPKG_OPT_TYPE_STRING, &conf->proxy_user },66 { "query-all", IPKG_OPT_TYPE_BOOL, &conf->query_all },67 { "verbose-wget", IPKG_OPT_TYPE_BOOL, &conf->verbose_wget },68 { "verbosity", IPKG_OPT_TYPE_BOOL, &conf->verbosity },45 int opkg_init_options_array(const opkg_conf_t *conf, opkg_option_t **options) 46 { 47 opkg_option_t tmp[] = { 48 { "force_defaults", OPKG_OPT_TYPE_BOOL, &conf->force_defaults }, 49 { "force_depends", OPKG_OPT_TYPE_BOOL, &conf->force_depends }, 50 { "force_overwrite", OPKG_OPT_TYPE_BOOL, &conf->force_overwrite }, 51 { "force_downgrade", OPKG_OPT_TYPE_BOOL, &conf->force_downgrade }, 52 { "force_reinstall", OPKG_OPT_TYPE_BOOL, &conf->force_reinstall }, 53 { "force_space", OPKG_OPT_TYPE_BOOL, &conf->force_space }, 54 { "ftp_proxy", OPKG_OPT_TYPE_STRING, &conf->ftp_proxy }, 55 { "http_proxy", OPKG_OPT_TYPE_STRING, &conf->http_proxy }, 56 { "multiple_providers", OPKG_OPT_TYPE_BOOL, &conf->multiple_providers }, 57 { "no_proxy", OPKG_OPT_TYPE_STRING, &conf->no_proxy }, 58 { "test", OPKG_OPT_TYPE_INT, &conf->noaction }, 59 { "noaction", OPKG_OPT_TYPE_INT, &conf->noaction }, 60 { "nodeps", OPKG_OPT_TYPE_BOOL, &conf->nodeps }, 61 { "offline_root", OPKG_OPT_TYPE_STRING, &conf->offline_root }, 62 { "offline_root_post_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_post_script_cmd }, 63 { "offline_root_pre_script_cmd", OPKG_OPT_TYPE_STRING, &conf->offline_root_pre_script_cmd }, 64 { "proxy_passwd", OPKG_OPT_TYPE_STRING, &conf->proxy_passwd }, 65 { "proxy_user", OPKG_OPT_TYPE_STRING, &conf->proxy_user }, 66 { "query-all", OPKG_OPT_TYPE_BOOL, &conf->query_all }, 67 { "verbose-wget", OPKG_OPT_TYPE_BOOL, &conf->verbose_wget }, 68 { "verbosity", OPKG_OPT_TYPE_BOOL, &conf->verbosity }, 69 69 { NULL } 70 70 }; 71 71 72 *options = ( ipkg_option_t *)malloc(sizeof(tmp));72 *options = (opkg_option_t *)malloc(sizeof(tmp)); 73 73 if ( options == NULL ){ 74 74 fprintf(stderr,"%s: Unable to allocate memory\n",__FUNCTION__); … … 80 80 }; <81 81
