summaryrefslogtreecommitdiffstats
path: root/libopkg/opkg_install.c
Commit message (Collapse)AuthorAgeFilesLines
* opkg_install_by_name: Support multiarch coinstallationfeature/multiarch-coinstallationP. J. McDermott2014-07-061-9/+43
| | | | Signed-off-by: P. J. McDermott <pj@pehjota.net>
* Add architecture to package control file namesP. J. McDermott2014-07-051-0/+4
| | | | Signed-off-by: P. J. McDermott <pj@pehjota.net>
* opkg_install_check_downgrade: Refactor and improvePaul Barker2014-02-231-51/+70
| | | | | | | This function is tidied up and handling for force_reinstall is added so that the correct message is printed. Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
* opkg_install.c: Fix typopaul.betafive@gmail.com2013-08-111-1/+1
| | | | | | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> git-svn-id: http://opkg.googlecode.com/svn/trunk@656 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* detect circular dependenciespixdamix@gmail.com2012-11-221-0/+8
| | | | | | | | | | | Add logic to detect circular dependencies. If we see any dependency from any given parent twice, ignore it the second time and print a notice message that we did so. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@641 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix dependency issues for preinst scriptspixdamix@gmail.com2012-11-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a problem with dependency order when installing packages. The key problem revolves around the satisfy_dependencies_for() function which is called from opkg_install_pkg just before the installation (and preinst) happens. The satisfy_dependencies_for() function calls pkg_hash_fetch_unsatisfied_dependencies() which will only return packages which were previously not marked as *going* to be installed at some point. For the purposes of opkg_install_pkg() we really need to know which dependencies haven't been installed yet. This patch adds pkg_hash_fetch_satisfied_dependencies() which returns a list of package dependencies. We can then directly check the status of these and ensure any hard dependencies (not suggestions or recommendations) are installed before returning. Consider the situation (where -> means 'depends on'): X -> A,E A -> B,E E -> B B -> C Currently X would install A and E. When installing A the packages B, E and C would be marked as "to install". When the package B is considered the second time (as a dependency of E rather than A), it would install straight away even though C was not currently installed, just marked as needing to be installed. The patch changes the behaviour so B can't install until C really is installed. This change is required to run the postinst scripts in the correct order. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@638 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fixed opkg losing auto_installed flag on upgradingpixdamix@gmail.com2012-01-191-0/+3
| | | | | | Thanks-to: Christian Hitz <christian.hitz@aizo.com> git-svn-id: http://opkg.googlecode.com/svn/trunk@635 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add overlay_root config option. Opkg checks this location for available space.graham.gower@gmail.com2011-02-131-3/+15
| | | | | | | | | This option is useful in the case where root is mounted ro, and another rw filesystem is overlaid on top with e.g. mini_fo. From Nicolas Thill via OpenWrt. git-svn-id: http://opkg.googlecode.com/svn/trunk@601 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fixed a bug causing segfaults when an upgraded package has less dependencies ↵pixdamix2011-02-011-1/+1
| | | | | | than the old package. git-svn-id: http://opkg.googlecode.com/svn/trunk@598 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't print the function name when just outputting a \n.graham.gower@gmail.com2010-12-221-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@591 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix formatting issues found with the last commit.graham.gower@gmail.com2010-11-191-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@585 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove trailing whitespace. Sorry if this breaks your patches.graham.gower2010-08-171-42/+42
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@552 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove outdated comment regarding an old bug.graham.gower2010-08-171-1/+1
| | | | | | | | | | I managed to track down the "bug 1277" this comment referred to. http://web.archive.org/web/20050503234854/http://handhelds.org/~bugzilla/show_bug.cgi?id=1277 This referred to the status file containing incorrect information after a failed upgrade. git-svn-id: http://opkg.googlecode.com/svn/trunk@551 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix --force-reinstall by removing special case code. Just remove the pkg first.graham.gower2010-06-211-20/+10
| | | | | | This should fix Issue #51. git-svn-id: http://opkg.googlecode.com/svn/trunk@538 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Claim ownership of a file if the previous owner has obsoleted it.graham.gower2010-06-101-3/+6
| | | | | | This commit, along with the last few, should fix Issue #50. git-svn-id: http://opkg.googlecode.com/svn/trunk@536 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Promote file removal message from INFO to NOTICE.graham.gower2010-06-101-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@535 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Correctly update the obs_file_hash in offline root mode.graham.gower2010-06-101-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@533 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix check_data_file_clashes() for offline root mode. (almost anyway)graham.gower2010-06-101-9/+6
| | | | | | | | | pkg_get_installed_files() returns a list of files with the offline root path already included, so don't add it again. Fix some error message formatting while here. git-svn-id: http://opkg.googlecode.com/svn/trunk@532 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add a message for the case that no installation candidate can be found.graham.gower2010-04-291-1/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@529 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Upgrade message from NOTICE to ERROR.graham.gower2010-03-041-1/+1
| | | | | | | | Koen pointed out that this information is important enough for users that it should be deferred until the end of the output, so that its not lost in a small scroll buffer. git-svn-id: http://opkg.googlecode.com/svn/trunk@526 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Make the error message easier to read for multiple unsatisfied dependencies.graham.gower2010-02-091-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@520 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Propagate errors up the call stack. Patch by Jens Erdmann <j.erdmann@road.de>.graham.gower2010-01-271-17/+19
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@519 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* s/dependences/dependencies/ Pointed out by klemmster in Issue 40.graham.gower2010-01-111-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@515 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* --download-only download using original namespixdamix2010-01-051-1/+9
| | | | | | | --download-only will download the packages using original names when --cache isn't supplied (in the current working directory) git-svn-id: http://opkg.googlecode.com/svn/trunk@513 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Add an option to download packages but do not install/upgrade anythingpixdamix2010-01-051-12/+25
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@512 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Include config.h to pull in HAVE_* macros where needed.graham.gower2009-12-201-0/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@505 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Initial stab at untangling the #include maze. Probably needs a second pass.graham.gower2009-12-201-4/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@504 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Print \n where needed.graham.gower2009-12-171-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@494 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Merge commit 'grg' into HEADgraham.gower2009-12-081-320/+235
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@471 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Free memory when there are unresolved dependencies.graham.gower2009-12-021-1/+4
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@437 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused parameter from pkg_hash_fetch_best_installation_candidate().graham.gower2009-11-271-3/+3
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@397 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove enum opkg_error.graham.gower2009-11-261-64/+51
| | | | | | | | The return codes aren't particularly useful and trying to have a useful one for every error scenario would be like extending errno. Good error messages via opkg_message() are far more appropriate. git-svn-id: http://opkg.googlecode.com/svn/trunk@395 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix some errno abuse.graham.gower2009-11-261-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@393 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Provide error checking for users of pkg_extract_* functions.graham.gower2009-11-261-14/+59
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@391 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove str_util.{c,h}graham.gower2009-11-251-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@383 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* file_util.c cleanups. Remove redundant str_chomp from str_util.c.graham.gower2009-11-251-1/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@382 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Various cleanups in opkg_remove.{c,h}graham.gower2009-11-251-5/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@373 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove unused functions. Shuffle things around and remove forward declarations.graham.gower2009-11-241-676/+515
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@369 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix a leak found when using --force-reinstall.graham.gower2009-11-231-2/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@355 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Allow to install a package from a read-only dirpixdamix2009-11-231-1/+1
| | | | | | | | This patch allows to install a package which is located on a readonly filesystem or folder by moving the control file into the tmp_dir directory git-svn-id: http://opkg.googlecode.com/svn/trunk@351 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Iterate the whole depends array, in the unlikely event that pre_depends_count!=0graham.gower2009-11-191-2/+11
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@343 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Clean up pkg_remove_orphan_dependent() and remove_autoinstalled().graham.gower2009-11-191-50/+78
| | | | | | | | This is motivated by a desire to remove usage of depends_str, but fixes real problems with these functions as a side effect. pkg_remove_orphan_dependent() works as advertised now. git-svn-id: http://opkg.googlecode.com/svn/trunk@341 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Use vfork()/execvp() instead of system().graham.gower2009-11-161-7/+2
| | | | | | Parts based on a patch by Mike Westerhof for OpenEmbedded. git-svn-id: http://opkg.googlecode.com/svn/trunk@320 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Pass the correct file to diff when using an offline_root.graham.gower2009-11-161-1/+1
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@319 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix pkg_get_installed_files() to work with an offline_root + dest.graham.gower2009-11-161-6/+6
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@318 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Remove redundant function.graham.gower2009-11-151-61/+0
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@315 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't prompt for user input from stdin if it's not a tty.graham.gower2009-11-121-0/+4
| | | | | | Based off a patch by Chris Larson <clarson@mvista.com> for OpenEmbedded. git-svn-id: http://opkg.googlecode.com/svn/trunk@290 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Fix leak when downgrading a package.graham.gower2009-11-121-0/+2
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@285 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Dead code removal.graham.gower2009-11-101-24/+7
| | | | git-svn-id: http://opkg.googlecode.com/svn/trunk@282 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
* Don't try to rerun control scripts, problems caused by circular dependencies.graham.gower2009-11-101-0/+3
| | | | | | | | Symptoms of this problem are seeing the following when installing a package: opkg: (null): Bad address opkg: (null): Bad address git-svn-id: http://opkg.googlecode.com/svn/trunk@281 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358