summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pacman/Makefile.am11
-rw-r--r--src/pacman/add.c2
-rw-r--r--src/pacman/conf.c2
-rw-r--r--src/pacman/pacman.c8
-rw-r--r--src/pacman/query.c1
-rw-r--r--src/pacman/sync.c24
6 files changed, 24 insertions, 24 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am
index 0e11d82f..956cdecb 100644
--- a/src/pacman/Makefile.am
+++ b/src/pacman/Makefile.am
@@ -6,20 +6,17 @@ localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@
AM_CFLAGS = $(CFLAGS) -D_GNU_SOURCE \
- -I$(top_srcdir)/lib/libalpm \
- -I$(top_srcdir)/lib/libfetch
+ -I$(top_srcdir)/lib/libalpm
-pacman_SOURCES = util.c log.c list.c package.c download.c trans.c add.c \
+pacman_SOURCES = util.c log.c list.c package.c downloadprog.c trans.c add.c \
remove.c upgrade.c query.c sync.c conf.c deptest.c pacman.c
pacman_static_SOURCES = $(pacman_SOURCES)
pacman_LDADD = -L$(top_srcdir)/lib/libalpm/.libs \
- -L$(top_srcdir)/lib/libfetch -lfetch \
- -larchive -lm -lalpm -lssl -lcrypto
+ -ldownload -larchive -lm -lalpm -lssl -lcrypto
pacman_static_LDADD = -L$(top_srcdir)/lib/libalpm/.libs/ \
- -L$(top_srcdir)/lib/libfetch -lfetch \
- -larchive -lm -lalpm -lssl -lcrypto
+ -ldownload -larchive -lm -lalpm -lssl -lcrypto
pacman_static_LDFLAGS = $(LDFLAGS) -all-static
diff --git a/src/pacman/add.c b/src/pacman/add.c
index 7c4cd909..600bc625 100644
--- a/src/pacman/add.c
+++ b/src/pacman/add.c
@@ -28,7 +28,7 @@
/* pacman */
#include "log.h"
#include "list.h"
-#include "download.h"
+#include "downloadprog.h"
#include "trans.h"
#include "add.h"
#include "conf.h"
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index dc7b64b6..72c55f35 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -31,7 +31,7 @@
#include "log.h"
#include "list.h"
#include "sync.h"
-#include "download.h"
+#include "downloadprog.h"
#include "conf.h"
extern list_t *pmc_syncs;
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index c5be07d6..79c15c3f 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -46,7 +46,7 @@
#include "list.h"
#include "util.h"
#include "log.h"
-#include "download.h"
+#include "downloadprog.h"
#include "conf.h"
#include "package.h"
#include "add.h"
@@ -187,8 +187,8 @@ static void cleanup(int signum)
fprintf(stderr, "Internal pacman error: Segmentation fault\n"
"Please submit a full bug report, with the given package if appropriate.\n");
exit(signum);
- } else if((signum == SIGINT) && (alpm_trans_release() == -1) && (pm_errno ==
- PM_ERR_TRANS_COMMITING)) {
+ } else if((signum == SIGINT) && (alpm_trans_release() == -1)
+ && (pm_errno == PM_ERR_TRANS_COMMITING)) {
return;
}
if(signum != 0 && config->op_d_vertest == 0) {
@@ -411,7 +411,7 @@ int main(int argc, char *argv[])
list_t *lp;
#if defined(PACMAN_DEBUG) && !defined(CYGWIN) && !defined(BSD)
- setenv("MALLOC_TRACE","pacman.mtrace", 0);
+ /*setenv("MALLOC_TRACE","pacman.mtrace", 0);*/
mtrace();
#endif
cenv = getenv("COLUMNS");
diff --git a/src/pacman/query.c b/src/pacman/query.c
index 1736a935..517ade74 100644
--- a/src/pacman/query.c
+++ b/src/pacman/query.c
@@ -119,6 +119,7 @@ int pacman_query(list_t *targets)
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
printf("\n");
}
+ alpm_list_free_outer(ret);
return(0);
}
diff --git a/src/pacman/sync.c b/src/pacman/sync.c
index 113e1675..5c6c7ac5 100644
--- a/src/pacman/sync.c
+++ b/src/pacman/sync.c
@@ -37,11 +37,11 @@
#endif
#include <alpm.h>
-#include <fetch.h> /* fetchLastErrString */
+#include <download.h> /* downloadLastErrString */
/* pacman */
#include "util.h"
#include "log.h"
-#include "download.h"
+#include "downloadprog.h"
#include "list.h"
#include "package.h"
#include "trans.h"
@@ -168,8 +168,8 @@ static int sync_synctree(int level, list_t *syncs)
ret = alpm_db_update((level < 2 ? 0 : 1), sync->db);
if(ret < 0) {
if(pm_errno == PM_ERR_DB_SYNC) {
- /* use libfetch error */
- ERR(NL, _("failed to synchronize %s: %s\n"), sync->treename, fetchLastErrString);
+ /* use libdownload error */
+ ERR(NL, _("failed to synchronize %s: %s\n"), sync->treename, downloadLastErrString);
} else {
ERR(NL, _("failed to update %s (%s)\n"), sync->treename, alpm_strerror(pm_errno));
}
@@ -216,6 +216,7 @@ static int sync_search(list_t *syncs, list_t *targets)
indentprint((char *)alpm_pkg_getinfo(pkg, PM_PKG_DESC), 4);
printf("\n");
}
+ alpm_list_free_outer(ret);
} else {
PM_LIST *lp;
@@ -546,25 +547,22 @@ int pacman_sync(list_t *targets)
}
MSG(CL, "\n");
}
- alpm_list_free(data);
break;
case PM_ERR_CONFLICTING_DEPS:
- for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
+ for(lp = alpm_list_first(data); lp; lp = alpm_list_next(lp)) {
PM_DEPMISS *miss = alpm_list_getdata(lp);
MSG(NL, _(":: %s: conflicts with %s"),
- alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
+ alpm_dep_getinfo(miss, PM_DEP_TARGET), alpm_dep_getinfo(miss, PM_DEP_NAME));
}
- alpm_list_free(data);
break;
case PM_ERR_DISK_FULL:
lp = alpm_list_first(data);
pkgsize = alpm_list_getdata(lp);
lp = alpm_list_next(lp);
freespace = alpm_list_getdata(lp);
- MSG(NL, _(":: %.1f MB required, have %.1f MB"),
- (double)(*pkgsize / 1048576.0), (double)(*freespace / 1048576.0));
- alpm_list_free(data);
+ MSG(NL, _(":: %.1f MB required, have %.1f MB"),
+ (double)(*pkgsize / 1048576.0), (double)(*freespace / 1048576.0));
break;
default:
break;
@@ -712,6 +710,10 @@ int pacman_sync(list_t *targets)
/* Step 4: release transaction resources
*/
cleanup:
+ if(data) {
+ alpm_list_free(data);
+ data = NULL;
+ }
if(alpm_trans_release() == -1) {
ERR(NL, _("failed to release transaction (%s)\n"), alpm_strerror(pm_errno));
retval = 1;