xbps-install: remove dead code.
This commit is contained in:
parent
0a1859987a
commit
bb17958212
@ -2,8 +2,7 @@ TOPDIR = ../..
|
|||||||
-include $(TOPDIR)/config.mk
|
-include $(TOPDIR)/config.mk
|
||||||
|
|
||||||
BIN = xbps-install
|
BIN = xbps-install
|
||||||
OBJS = main.o transaction.o main.o question.o fetch_cb.o state_cb.o
|
OBJS = main.o transaction.o main.o question.o fetch_cb.o state_cb.o util.o
|
||||||
OBJS += unpack_cb.o util.o
|
|
||||||
MAN = $(BIN).8
|
MAN = $(BIN).8
|
||||||
|
|
||||||
include $(TOPDIR)/mk/prog.mk
|
include $(TOPDIR)/mk/prog.mk
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2009-2012 Juan Romero Pardines.
|
* Copyright (c) 2009-2013 Juan Romero Pardines.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -50,10 +50,6 @@ void fetch_file_progress_cb(struct xbps_fetch_cb_data *, void *);
|
|||||||
/* from state_cb.c */
|
/* from state_cb.c */
|
||||||
void state_cb(struct xbps_state_cb_data *, void *);
|
void state_cb(struct xbps_state_cb_data *, void *);
|
||||||
|
|
||||||
/* from unpack_cb.c */
|
|
||||||
void unpack_progress_cb_verbose(struct xbps_unpack_cb_data *, void *);
|
|
||||||
void unpack_progress_cb(struct xbps_unpack_cb_data *, void *);
|
|
||||||
|
|
||||||
/* From util.c */
|
/* From util.c */
|
||||||
void print_package_line(const char *, size_t, bool);
|
void print_package_line(const char *, size_t, bool);
|
||||||
size_t get_maxcols(void);
|
size_t get_maxcols(void);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*-
|
/*-
|
||||||
* Copyright (c) 2008-2012 Juan Romero Pardines.
|
* Copyright (c) 2008-2013 Juan Romero Pardines.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -62,6 +62,20 @@ usage(bool fail)
|
|||||||
exit(fail ? EXIT_FAILURE : EXIT_SUCCESS);
|
exit(fail ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
unpack_progress_cb(struct xbps_unpack_cb_data *xpd, void *cbdata)
|
||||||
|
{
|
||||||
|
(void)cbdata;
|
||||||
|
|
||||||
|
if (xpd->entry == NULL || xpd->entry_total_count <= 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
printf("%s: unpacked %sfile `%s' (%" PRIi64 " bytes)\n",
|
||||||
|
xpd->pkgver,
|
||||||
|
xpd->entry_is_conf ? "configuration " : "", xpd->entry,
|
||||||
|
xpd->entry_size);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@ -163,7 +177,7 @@ main(int argc, char **argv)
|
|||||||
xh.flags = flags;
|
xh.flags = flags;
|
||||||
xh.repository = defrepo;
|
xh.repository = defrepo;
|
||||||
if (flags & XBPS_FLAG_VERBOSE)
|
if (flags & XBPS_FLAG_VERBOSE)
|
||||||
xh.unpack_cb = unpack_progress_cb_verbose;
|
xh.unpack_cb = unpack_progress_cb;
|
||||||
|
|
||||||
if ((rv = xbps_init(&xh)) != 0) {
|
if ((rv = xbps_init(&xh)) != 0) {
|
||||||
xbps_error_printf("Failed to initialize libxbps: %s\n",
|
xbps_error_printf("Failed to initialize libxbps: %s\n",
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
/*-
|
|
||||||
* Copyright (c) 2008-2011 Juan Romero Pardines.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* Redistribution and use in source and binary forms, with or without
|
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer.
|
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
|
||||||
* documentation and/or other materials provided with the distribution.
|
|
||||||
*
|
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
||||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
||||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
||||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
||||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
||||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
||||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
||||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <errno.h>
|
|
||||||
|
|
||||||
#include "defs.h"
|
|
||||||
|
|
||||||
void
|
|
||||||
unpack_progress_cb_verbose(struct xbps_unpack_cb_data *xpd, void *cbdata)
|
|
||||||
{
|
|
||||||
(void)cbdata;
|
|
||||||
|
|
||||||
if (xpd->entry == NULL || xpd->entry_total_count <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
printf("%s: unpacked %sfile `%s' (%" PRIi64 " bytes)\n",
|
|
||||||
xpd->pkgver,
|
|
||||||
xpd->entry_is_conf ? "configuration " : "", xpd->entry,
|
|
||||||
xpd->entry_size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
unpack_progress_cb(struct xbps_unpack_cb_data *xpd, void *cbdata)
|
|
||||||
{
|
|
||||||
(void)cbdata;
|
|
||||||
|
|
||||||
if (xpd->entry_total_count <= 0)
|
|
||||||
return;
|
|
||||||
|
|
||||||
printf("%s: unpacked %zd of %zd files...\n",
|
|
||||||
xpd->pkgver, xpd->entry_extract_count, xpd->entry_total_count);
|
|
||||||
printf("\033[1A\033[K");
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user