aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2005-03-01 03:05:19 +0000
committerJason Woodward2005-03-01 03:05:19 +0000
commit3fc5ed3048941124e9c2816c7349a809ba0cf57c (patch)
treea999c6ba7c1dd2e6bb46e701d8d26b9a7f3fb12f
parent8cbda017ff9439b80e2f40988890ee4247c94463 (diff)
downloadslapt-get-3fc5ed3048941124e9c2816c7349a809ba0cf57c.tar.gz
fixed --remove bug
-rw-r--r--ChangeLog1
-rw-r--r--src/action.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ac3ee6f..a746d17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
0.9.9i Feb 28, 2005
+ * fixed --remove bug
* --list now properly shows installed packages
* installed packages now parse out package location from /var/log/packages entry
* added add_source() (libslapt)
diff --git a/src/action.c b/src/action.c
index f580df1..bb7ef7e 100644
--- a/src/action.c
+++ b/src/action.c
@@ -257,7 +257,7 @@ void pkg_action_remove(const rc_config *global_config,const pkg_action_args_t *a
pkg_regex.pmatch[2].rm_eo - pkg_regex.pmatch[2].rm_so
);
- pkg = get_exact_pkg(avail_pkgs, pkg_name, pkg_version);
+ pkg = get_exact_pkg(installed_pkgs, pkg_name, pkg_version);
free(pkg_name);
free(pkg_version);
@@ -266,7 +266,7 @@ void pkg_action_remove(const rc_config *global_config,const pkg_action_args_t *a
/* If regex doesnt match */
if( pkg_regex.reg_return != 0 || pkg == NULL ){
/* make sure there is a package called action_args->pkgs[i] */
- pkg = get_newest_pkg(avail_pkgs,action_args->pkgs[i]);
+ pkg = get_newest_pkg(installed_pkgs,action_args->pkgs[i]);
if( pkg == NULL ){
printf(_("%s is not installed.\n"),action_args->pkgs[i]);