diff options
author | Dan McGee <dan@archlinux.org> | 2007-04-25 08:27:16 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-04-25 17:07:48 +0200 |
commit | 34aefc62e45cf221eccf65dd2bcf42ecd51630f3 (patch) | |
tree | 11fe5a8621e7243e228150bef55322d842e120d6 | |
parent | 5e1419c0b5cf717e57959bc27eeab1cfa4bea5dc (diff) | |
download | pacman-34aefc62e45cf221eccf65dd2bcf42ecd51630f3.tar.gz pacman-34aefc62e45cf221eccf65dd2bcf42ecd51630f3.tar.xz |
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>
-rw-r--r-- | src/pacman/Makefile.am | 1 | ||||
-rw-r--r-- | src/pacman/add.c | 10 | ||||
-rw-r--r-- | src/pacman/pacman.h | 3 | ||||
-rw-r--r-- | src/pacman/upgrade.c | 44 |
4 files changed, 10 insertions, 48 deletions
diff --git a/src/pacman/Makefile.am b/src/pacman/Makefile.am index 91912991..21099657 100644 --- a/src/pacman/Makefile.am +++ b/src/pacman/Makefile.am @@ -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 \ diff --git a/src/pacman/add.c b/src/pacman/add.c index 632366c6..86091bdc 100644 --- a/src/pacman/add.c +++ b/src/pacman/add.c @@ -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; diff --git a/src/pacman/pacman.h b/src/pacman/pacman.h index 38c89fb3..fbd419d7 100644 --- a/src/pacman/pacman.h +++ b/src/pacman/pacman.h @@ -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); diff --git a/src/pacman/upgrade.c b/src/pacman/upgrade.c deleted file mode 100644 index 177484f5..00000000 --- a/src/pacman/upgrade.c +++ /dev/null @@ -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: */ |