aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-14 23:41:02 +0000
committerJason Woodward2003-10-14 23:41:02 +0000
commit24757d291ae9732d6a5bd55672a01a5af1625e2b (patch)
treeeebf0ceda191812ba732e16ef40180f4fbdcb034
parentc59e2442eb11484895e3dea6e1eb61575b2776e3 (diff)
downloadslapt-get-24757d291ae9732d6a5bd55672a01a5af1625e2b.tar.gz
fixed bug when removing pkg by base pkg name and removepkg wouldn't find entry in /var/log/packages.
-rw-r--r--ChangeLog5
-rw-r--r--src/package.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b68425d..9b995e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
+0.9.6b Oct 14, 2003
+ * fixed bug when removing pkg by base pkg name and removepkg wouldn't find
+ entry in /var/log/packages. Thanks to DanB at mojolin dot com and
+ tg at linuxpackages dot net.
+
0.9.6a Oct 14, 2003
* fixed issue with allocated strings with --install and --remove
* fixed --install pkgname --reinstall regression
diff --git a/src/package.c b/src/package.c
index e568092..92a4a5c 100644
--- a/src/package.c
+++ b/src/package.c
@@ -666,10 +666,15 @@ int remove_pkg(const rc_config *global_config,pkg_info_t *pkg){
}
/* build and execute our command */
- command = calloc( strlen(REMOVE_CMD) + strlen(pkg->name) + 1 , sizeof *command );
+ command = calloc(
+ strlen(REMOVE_CMD) + strlen(pkg->name) + strlen("-") + strlen(pkg->version) + 1,
+ sizeof *command
+ );
command[0] = '\0';
command = strcat(command,REMOVE_CMD);
command = strcat(command,pkg->name);
+ command = strcat(command,"-");
+ command = strcat(command,pkg->version);
if( (cmd_return = system(command)) == -1 ){
printf("Failed to execute command: [%s]\n",command);
exit(1);