diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2010-06-21 19:34:25 (EDT) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2010-06-21 19:34:25 (EDT) |
commit | 7fc9b3b1705f104eb66510d771994fb46b01d1e6 (patch) | |
tree | bf4ca40de2c2f733d6afd6c89542f04b1fc51632 /libopkg/opkg_cmd.c | |
parent | 3e60267249bb3d164fa94a29770c2b923626f823 (diff) |
Fix --force-reinstall by removing special case code. Just remove the pkg first.
This should fix Issue #51.
git-svn-id: http://opkg.googlecode.com/svn/trunk@538 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg/opkg_cmd.c')
-rw-r--r-- | libopkg/opkg_cmd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c index 63de047..b0e5552 100644 --- a/libopkg/opkg_cmd.c +++ b/libopkg/opkg_cmd.c @@ -424,12 +424,23 @@ error: } static int +opkg_remove_cmd(int argc, char **argv); + +static int opkg_install_cmd(int argc, char **argv) { int i, r; char *arg; int err=0; + if (conf->force_reinstall) { + int saved_force_depends = conf->force_depends; + conf->force_depends = 1; + (void)opkg_remove_cmd(argc, argv); + conf->force_depends = saved_force_depends; + conf->force_reinstall = 0; + } + signal(SIGINT, sigint_handler); /* |