Properly build shared/static libxbps and utils.
xbps-fetch: added -v flag to see verbose messages in libfetch. --HG-- extra : convert_revision : xtraeme%40gmail.com-20091030111726-axf9paz2k01ntqzz
This commit is contained in:
@@ -3,7 +3,6 @@ include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-bin
|
||||
OBJS = check.o install.o main.o remove.o show-deps.o ../xbps-repo/util.o
|
||||
STATIC_LIBS += -lz -lacl -lbz2 -llzma
|
||||
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
||||
|
||||
@@ -164,7 +164,7 @@ download_package_list(prop_object_iterator_t iter)
|
||||
}
|
||||
printf("Downloading %s-%s binary package ...\n",
|
||||
pkgname, version);
|
||||
rv = xbps_fetch_file(binfile, savedir);
|
||||
rv = xbps_fetch_file(binfile, savedir, NULL);
|
||||
free(savedir);
|
||||
free(binfile);
|
||||
if (rv != 0) {
|
||||
|
||||
@@ -1,21 +1,40 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <xbps_api.h>
|
||||
#include "fetch.h"
|
||||
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
printf("usage: xbps-fetch [-v] URL\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int rv = 0;
|
||||
char flags[8];
|
||||
int c, rv = 0;
|
||||
|
||||
if (argc != 2) {
|
||||
printf("Usage: xbps-fetch [options] URL\n");
|
||||
exit(EXIT_FAILURE);
|
||||
while ((c = getopt(argc, argv, "v")) != -1) {
|
||||
switch (c) {
|
||||
case 'v':
|
||||
strcat(flags, "v");
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
rv = xbps_fetch_file(argv[1], ".");
|
||||
if (argc != 1)
|
||||
usage();
|
||||
|
||||
rv = xbps_fetch_file(argv[0], ".", flags);
|
||||
if (rv != 0) {
|
||||
printf("xbps-fetch: couldn't download %s!\n", argv[1]);
|
||||
printf("xbps-fetch: %s\n", xbps_fetch_error_string());
|
||||
printf("%s: %s\n", argv[0], xbps_fetch_error_string());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
exit(EXIT_SUCCESS);
|
||||
|
||||
@@ -3,6 +3,5 @@ include $(TOPDIR)/vars.mk
|
||||
|
||||
BIN = xbps-repo
|
||||
OBJS = main.o util.o index.o
|
||||
STATIC_LIBS += -lz -lbz2 -lacl -llzma
|
||||
|
||||
include $(TOPDIR)/prog.mk
|
||||
|
||||
Reference in New Issue
Block a user