Remove single-function upgrade.c

Move pacman_upgrade into add.c, at least for now. It really doesn't need
its own file. For the long term, we may want to move this whole file
back to upgrade.c if we deprecate the add operation.

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2007-04-25 02:27:16 -04:00
parent 5e1419c0b5
commit 34aefc62e4
4 changed files with 10 additions and 48 deletions

View File

@ -24,7 +24,6 @@ pacman_SOURCES = \
remove.c \
sync.c \
trans.h trans.c \
upgrade.c \
util.h util.c
pacman_LDADD = $(top_builddir)/lib/libalpm/.libs/libalpm.la \

View File

@ -1,7 +1,7 @@
/*
* add.c
*
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
* Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -39,6 +39,14 @@
extern config_t *config;
int pacman_upgrade(alpm_list_t *targets)
{
/* this is basically just a remove-then-add process. pacman_add() will */
/* handle it */
config->upgrade = 1;
return(pacman_add(targets));
}
int pacman_add(alpm_list_t *targets)
{
alpm_list_t *i = targets, *data = NULL;

View File

@ -25,14 +25,13 @@
/* add.c, this should merge with upgrade.c */
int pacman_add(alpm_list_t *targets);
int pacman_upgrade(alpm_list_t *targets);
/* sync.c */
int pacman_sync(alpm_list_t *targets);
/* query.c */
int pacman_query(alpm_list_t *targets);
/* remove.c */
int pacman_remove(alpm_list_t *targets);
/* upgrade.c */
int pacman_upgrade(alpm_list_t *targets);
/* deptest.c */
int pacman_deptest(alpm_list_t *targets);

View File

@ -1,44 +0,0 @@
/*
* upgrade.c
*
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include "config.h"
#include <stdlib.h>
#include <alpm.h>
#include <alpm_list.h>
/* pacman */
#include "pacman.h"
#include "conf.h"
extern config_t *config;
int pacman_upgrade(alpm_list_t *targets)
{
/* this is basically just a remove-then-add process. pacman_add() will */
/* handle it */
config->upgrade = 1;
return(pacman_add(targets));
}
/* vim: set ts=2 sw=2 noet: */