War on whitespace
Run the kernel's cleanfile script on all of our source files. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
3cd684b41d
commit
2322909703
53 changed files with 205 additions and 206 deletions
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* add.c
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -169,7 +169,7 @@ int _alpm_add_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
|||
_alpm_log(PM_LOG_ERROR, _("replacing packages with -A and -U is not supported yet\n"));
|
||||
_alpm_log(PM_LOG_ERROR, _("please remove '%s' first, using -Rd\n"), miss->depend.name);
|
||||
RET_ERR(PM_ERR_CONFLICTING_DEPS, -1);
|
||||
|
||||
|
||||
/* Attempt to resolve conflicts */
|
||||
/*
|
||||
int skip_this = 0;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* add.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_ADD_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* alpm.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2007 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* alpm.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_H
|
||||
|
@ -39,7 +39,7 @@ extern "C" {
|
|||
* Arch Linux Package Management library
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* Structures
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* alpm_list.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -179,7 +179,7 @@ alpm_list_t SYMEXPORT *alpm_list_add_sorted(alpm_list_t *list, void *data, alpm_
|
|||
/* At end, adjust tail pointer on head node */
|
||||
list->prev = add;
|
||||
}
|
||||
|
||||
|
||||
return(list);
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, a
|
|||
{
|
||||
alpm_list_t *newlist, *lp;
|
||||
|
||||
if (left == NULL)
|
||||
if (left == NULL)
|
||||
return right;
|
||||
if (right == NULL)
|
||||
return left;
|
||||
|
@ -219,7 +219,7 @@ alpm_list_t SYMEXPORT *alpm_list_mmerge(alpm_list_t *left, alpm_list_t *right, a
|
|||
lp->next = left;
|
||||
left->prev = lp;
|
||||
left = left->next;
|
||||
}
|
||||
}
|
||||
else {
|
||||
lp->next = right;
|
||||
right->prev = lp;
|
||||
|
@ -264,7 +264,7 @@ alpm_list_t SYMEXPORT *alpm_list_msort(alpm_list_t *list, int n, alpm_list_fn_cm
|
|||
alpm_list_t *lastleft = alpm_list_nth(list, n/2 - 1);
|
||||
alpm_list_t *right = lastleft->next;
|
||||
/* terminate first list */
|
||||
lastleft->next = NULL;
|
||||
lastleft->next = NULL;
|
||||
|
||||
left = alpm_list_msort(left, n/2, fn);
|
||||
right = alpm_list_msort(right, n - (n/2), fn);
|
||||
|
@ -363,7 +363,7 @@ alpm_list_t SYMEXPORT *alpm_list_remove_dupes(const alpm_list_t *list)
|
|||
|
||||
/**
|
||||
* @brief Copy a string list, including data.
|
||||
*
|
||||
*
|
||||
* @param list the list to copy
|
||||
*
|
||||
* @return a copy of the original list
|
||||
|
@ -542,7 +542,7 @@ int SYMEXPORT alpm_list_count(const alpm_list_t *list)
|
|||
|
||||
/**
|
||||
* @brief Find an item in a list.
|
||||
*
|
||||
*
|
||||
* Search for the item whos data matches that of the `needle`.
|
||||
*
|
||||
* @param needle the data to search for (== comparison)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* alpm_list.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_LIST_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* backup.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2005 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -50,7 +50,7 @@ char *_alpm_needbackup(const char *file, const alpm_list_t *backup)
|
|||
for(lp = backup; lp; lp = lp->next) {
|
||||
char *str = strdup(lp->data);
|
||||
char *ptr;
|
||||
|
||||
|
||||
/* tab delimiter */
|
||||
ptr = strchr(str, '\t');
|
||||
if(ptr == NULL) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* backup.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_BACKUP_H
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/*
|
||||
* be_files.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -54,7 +54,7 @@ int _alpm_db_install(pmdb_t *db, const char *dbfile)
|
|||
{
|
||||
ALPM_LOG_FUNC;
|
||||
|
||||
/* TODO we should not simply unpack the archive, but better parse it and
|
||||
/* TODO we should not simply unpack the archive, but better parse it and
|
||||
* db_write each entry (see sync_load_dbarchive to get archive content) */
|
||||
_alpm_log(PM_LOG_DEBUG, "unpacking database '%s'\n", dbfile);
|
||||
|
||||
|
@ -479,7 +479,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq)
|
|||
* not the local one. *
|
||||
while(fgets(line, 512, fp) && strlen(_alpm_strtrim(line))) {
|
||||
info->replaces = alpm_list_add(info->replaces, strdup(line));
|
||||
}
|
||||
}
|
||||
} else if(!strcmp(line, "%FORCE%")) {
|
||||
* FORCE tag only appears in sync repositories,
|
||||
* not the local one. *
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* cache.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* cache.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_CACHE_H
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* conflict.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.org>
|
||||
* Copyright (c) 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* conflict.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_CONFLICT_H
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* db.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -635,7 +635,7 @@ alpm_list_t *_alpm_db_search(pmdb_t *db, const alpm_list_t *needles)
|
|||
}
|
||||
targ = i->data;
|
||||
_alpm_log(PM_LOG_DEBUG, "searching for target '%s'\n", targ);
|
||||
|
||||
|
||||
if(regcomp(®, targ, REG_EXTENDED | REG_NOSUB | REG_ICASE | REG_NEWLINE) != 0) {
|
||||
RET_ERR(PM_ERR_INVALID_REGEX, NULL);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* db.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_DB_H
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* delta.c
|
||||
*
|
||||
* Copyright (c) 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* delta.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_DELTA_H
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* deps.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -152,13 +152,13 @@ static alpm_list_t *_alpm_graph_init(alpm_list_t *targets)
|
|||
* Target order is A,B,C,D
|
||||
*
|
||||
* Should be re-ordered to C,A,B,D
|
||||
*
|
||||
*
|
||||
* mode should be either PM_TRANS_TYPE_ADD or PM_TRANS_TYPE_REMOVE. This
|
||||
* affects the dependency order sortbydeps() will use.
|
||||
*
|
||||
* This function returns the new alpm_list_t* target list.
|
||||
*
|
||||
*/
|
||||
*/
|
||||
alpm_list_t *_alpm_sortbydeps(alpm_list_t *targets, pmtranstype_t mode)
|
||||
{
|
||||
alpm_list_t *newtargs = NULL;
|
||||
|
@ -356,11 +356,11 @@ alpm_list_t *_alpm_checkdeps(pmdb_t *db, pmtranstype_t op,
|
|||
|
||||
for(j = alpm_pkg_get_depends(tp); j; j = j->next) {
|
||||
pmdepend_t *depend = j->data;
|
||||
|
||||
|
||||
found = 0;
|
||||
/* check other targets */
|
||||
for(k = packages; k && !found; k = k->next) {
|
||||
pmpkg_t *p = k->data;
|
||||
/* check other targets */
|
||||
for(k = packages; k && !found; k = k->next) {
|
||||
pmpkg_t *p = k->data;
|
||||
found = alpm_depcmp(p, depend);
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ pmdepend_t SYMEXPORT *alpm_splitdep(const char *depstring)
|
|||
return(NULL);
|
||||
}
|
||||
newstr = strdup(depstring);
|
||||
|
||||
|
||||
MALLOC(depend, sizeof(pmdepend_t), return(NULL));
|
||||
|
||||
/* Find a version comparator if one exists. If it does, set the type and
|
||||
|
@ -746,7 +746,7 @@ int _alpm_resolvedeps(pmdb_t *local, alpm_list_t *dbs_sync, pmpkg_t *syncpkg,
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_alpm_log(PM_LOG_DEBUG, "finished resolving dependencies\n");
|
||||
|
||||
FREELIST(deps);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* deps.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_DEPS_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* error.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* error.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_ERROR_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* group.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_GROUP_H
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* handle.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* handle.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,13 +15,13 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_HANDLE_H
|
||||
#define _ALPM_HANDLE_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "alpm_list.h"
|
||||
|
@ -38,7 +38,7 @@ typedef struct _pmhandle_t {
|
|||
FILE *logstream; /* log file stream pointer */
|
||||
int lckfd; /* lock file descriptor if one exists */
|
||||
pmtrans_t *trans;
|
||||
|
||||
|
||||
/* callback functions */
|
||||
alpm_cb_log logcb; /* Log callback function */
|
||||
alpm_cb_download dlcb; /* Download callback function */
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* log.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* log.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_LOG_H
|
||||
|
|
|
@ -333,4 +333,3 @@ int md5_file( const char *path, unsigned char *output )
|
|||
fclose( f );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -773,7 +773,7 @@ int _alpm_pkg_cmp(const void *p1, const void *p2)
|
|||
{
|
||||
pmpkg_t *pk1 = (pmpkg_t *)p1;
|
||||
pmpkg_t *pk2 = (pmpkg_t *)p2;
|
||||
|
||||
|
||||
return(strcmp(alpm_pkg_get_name(pk1), alpm_pkg_get_name(pk2)));
|
||||
}
|
||||
|
||||
|
@ -963,7 +963,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full)
|
|||
char *fn;
|
||||
char str[PATH_MAX+1];
|
||||
int fd;
|
||||
|
||||
|
||||
fn = strdup("/tmp/alpm_XXXXXX");
|
||||
fd = mkstemp(fn);
|
||||
archive_read_data_into_fd(archive,fd);
|
||||
|
@ -1015,7 +1015,7 @@ pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full)
|
|||
_alpm_log(PM_LOG_ERROR, _("missing package metadata in %s\n"), pkgfile);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
archive_read_finish(archive);
|
||||
|
||||
if(!filelist) {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* package.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_PACKAGE_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* provide.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* provide.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_PROVIDE_H
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* remove.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -137,7 +137,7 @@ int _alpm_remove_prepare(pmtrans_t *trans, pmdb_t *db, alpm_list_t **data)
|
|||
}
|
||||
}
|
||||
|
||||
/* re-order w.r.t. dependencies */
|
||||
/* re-order w.r.t. dependencies */
|
||||
_alpm_log(PM_LOG_DEBUG, "sorting by dependencies\n");
|
||||
lp = _alpm_sortbydeps(trans->packages, PM_TRANS_TYPE_REMOVE);
|
||||
/* free the old alltargs */
|
||||
|
@ -194,7 +194,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
|
|||
needbackup = 1;
|
||||
FREE(hash);
|
||||
}
|
||||
|
||||
|
||||
snprintf(file, PATH_MAX, "%s%s", handle->root, (char *)lp->data);
|
||||
|
||||
if(trans->type == PM_TRANS_TYPE_REMOVEUPGRADE) {
|
||||
|
@ -210,7 +210,7 @@ static void unlink_file(pmpkg_t *info, alpm_list_t *lp, pmtrans_t *trans)
|
|||
_alpm_log(PM_LOG_DEBUG, "file %s does not exist\n", file);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(S_ISDIR(buf.st_mode)) {
|
||||
if(rmdir(file)) {
|
||||
/* this is okay, other packages are probably using it (like /usr) */
|
||||
|
@ -343,7 +343,7 @@ int _alpm_remove_commit(pmtrans_t *trans, pmdb_t *db)
|
|||
_alpm_log(PM_LOG_ERROR, _("could not remove entry '%s' from cache\n"),
|
||||
pkgname);
|
||||
}
|
||||
|
||||
|
||||
/* call a done event if this isn't an upgrade */
|
||||
if(trans->type != PM_TRANS_TYPE_REMOVEUPGRADE) {
|
||||
EVENT(trans, PM_TRANS_EVT_REMOVE_DONE, info, NULL);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* remove.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_REMOVE_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* server.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -160,7 +160,7 @@ int _alpm_downloadfiles(alpm_list_t *servers, const char *localpath,
|
|||
* set to the final download amount for the calling function to use.
|
||||
* - totalsize is the total download size for use when TotalDownload
|
||||
* is set. Use 0 if the total download size is not known.
|
||||
*
|
||||
*
|
||||
* RETURN: 0 for successful download
|
||||
* 1 if the mtimes are identical
|
||||
* -1 on error
|
||||
|
@ -227,7 +227,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
|||
fileurl->offset = (off_t)0;
|
||||
dl_thisfile = 0;
|
||||
}
|
||||
|
||||
|
||||
/* libdownload does not reset the error code, reset it in
|
||||
* the case of previous errors */
|
||||
downloadLastErrCode = 0;
|
||||
|
@ -249,7 +249,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
|||
} else {
|
||||
_alpm_log(PM_LOG_DEBUG, "connected to %s successfully\n", fileurl->host);
|
||||
}
|
||||
|
||||
|
||||
if(ust.mtime && mtime1 && ust.mtime == mtime1) {
|
||||
_alpm_log(PM_LOG_DEBUG, "mtimes are identical, skipping %s\n", fn);
|
||||
complete = alpm_list_add(complete, fn);
|
||||
|
@ -262,7 +262,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
|||
downloadFreeURL(fileurl);
|
||||
return(1);
|
||||
}
|
||||
|
||||
|
||||
if(ust.mtime && mtime2) {
|
||||
*mtime2 = ust.mtime;
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
|||
downloadFreeURL(fileurl);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
int nwritten = 0;
|
||||
while(nwritten < nread) {
|
||||
nwritten += fwrite(buffer, 1, (nread - nwritten), localf);
|
||||
|
@ -322,7 +322,7 @@ int _alpm_downloadfiles_forreal(alpm_list_t *servers, const char *localpath,
|
|||
}
|
||||
|
||||
if(nwritten != nread) {
|
||||
|
||||
|
||||
}
|
||||
dl_thisfile += nread;
|
||||
if (dl_total != NULL) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* server.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_SERVER_H
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* sync.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -61,7 +61,7 @@ pmsyncpkg_t *_alpm_sync_new(int type, pmpkg_t *spkg, void *data)
|
|||
sync->type = type;
|
||||
sync->pkg = spkg;
|
||||
sync->data = data;
|
||||
|
||||
|
||||
return(sync);
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ static int find_replacements(pmtrans_t *trans, pmdb_t *db_local,
|
|||
|
||||
for(k = alpm_pkg_get_replaces(spkg); k; k = k->next) {
|
||||
const char *replacement = k->data;
|
||||
|
||||
|
||||
pmpkg_t *lpkg = _alpm_db_get_pkgfromcache(db_local, replacement);
|
||||
if(!lpkg) {
|
||||
continue;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/*
|
||||
* sync.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -17,7 +17,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_SYNC_H
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/*
|
||||
* trans.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_TRANS_H
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -308,7 +308,7 @@ char *_alpm_strreplace(const char *str, const char *needle, const char *replace)
|
|||
|
||||
while (1) {
|
||||
q = strstr(p, needle);
|
||||
if(!q) { /* not found */
|
||||
if(!q) { /* not found */
|
||||
if(*p) {
|
||||
/* add the rest of 'p' */
|
||||
_strnadd(&newstr, p, strlen(p));
|
||||
|
@ -343,7 +343,7 @@ int _alpm_lckmk()
|
|||
}
|
||||
_alpm_makepath(dir);
|
||||
|
||||
while((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000)) == -1 && errno == EACCES) {
|
||||
while((fd = open(file, O_WRONLY | O_CREAT | O_EXCL, 0000)) == -1 && errno == EACCES) {
|
||||
if(++count < 1) {
|
||||
sleep(1);
|
||||
} else {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*
|
||||
* util.h
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2006 by Judd Vinet <jvinet@zeroflux.org>
|
||||
* Copyright (c) 2005 by Aurelien Foret <orelien@chez.com>
|
||||
* Copyright (c) 2005 by Christian Hamar <krics@linuxforum.hu>
|
||||
* Copyright (c) 2006 by David Kimpe <dnaku@frugalware.org>
|
||||
* Copyright (c) 2005, 2006 by Miklos Vajna <vmiklos@frugalware.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
|
||||
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _ALPM_UTIL_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* add.c
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -136,7 +136,7 @@ int pacman_add(alpm_list_t *targets)
|
|||
pmdepmissing_t *miss = alpm_list_getdata(i);
|
||||
pmdepend_t *dep = alpm_miss_get_dep(miss);
|
||||
char *depstring = alpm_dep_get_string(dep);
|
||||
|
||||
|
||||
/* TODO indicate if the error was a virtual package or not:
|
||||
* :: %s: requires %s, provided by %s
|
||||
*/
|
||||
|
|
|
@ -441,7 +441,7 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
|||
int list_xfered, int list_total)
|
||||
{
|
||||
const int infolen = 50;
|
||||
char *fname, *p;
|
||||
char *fname, *p;
|
||||
|
||||
float rate = 0.0, timediff = 0.0, f_xfered = 0.0;
|
||||
unsigned int eta_h = 0, eta_m = 0, eta_s = 0;
|
||||
|
@ -485,7 +485,7 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
|||
/* compute final values */
|
||||
struct timeval current_time;
|
||||
float diff_sec, diff_usec;
|
||||
|
||||
|
||||
gettimeofday(¤t_time, NULL);
|
||||
diff_sec = current_time.tv_sec - initial_time.tv_sec;
|
||||
diff_usec = current_time.tv_usec - initial_time.tv_usec;
|
||||
|
@ -548,15 +548,15 @@ void cb_dl_progress(const char *filename, int file_xfered, int file_total,
|
|||
xfered_size = 'G';
|
||||
/* I should seriously hope that archlinux packages never break
|
||||
* the 9999.9GB mark... we'd have more serious problems than the progress
|
||||
* bar in pacman */
|
||||
* bar in pacman */
|
||||
}
|
||||
}
|
||||
|
||||
printf(" %-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", FILENAME_TRIM_LEN, fname,
|
||||
printf(" %-*s %6.1f%c %#6.1f%c/s %02u:%02u:%02u", FILENAME_TRIM_LEN, fname,
|
||||
f_xfered, xfered_size, rate, rate_size, eta_h, eta_m, eta_s);
|
||||
|
||||
free(fname);
|
||||
|
||||
|
||||
/* The progress bar is based on the file percent regardless of the
|
||||
* TotalDownload option. */
|
||||
graph_percent = (int)((float)file_xfered) / ((float)file_total) * 100;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* conf.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* conf.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _PM_CONF_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* deptest.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -42,7 +42,7 @@ int pacman_deptest(alpm_list_t *targets)
|
|||
if(targets == NULL) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
for(i = targets; i; i = alpm_list_next(i)) {
|
||||
int found = 0;
|
||||
pmpkg_t *pkg;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* package.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -144,7 +144,7 @@ void dump_pkg_sync(pmpkg_t *pkg, const char *treename)
|
|||
descheader = _("Description : ");
|
||||
|
||||
md5sum = alpm_pkg_get_md5sum(pkg);
|
||||
|
||||
|
||||
printf(_("Repository : %s\n"), treename);
|
||||
printf(_("Name : %s\n"), (char *)alpm_pkg_get_name(pkg));
|
||||
printf(_("Version : %s\n"), (char *)alpm_pkg_get_version(pkg));
|
||||
|
@ -155,12 +155,12 @@ void dump_pkg_sync(pmpkg_t *pkg, const char *treename)
|
|||
list_display(_("Replaces :"), alpm_pkg_get_replaces(pkg));
|
||||
printf(_("Download Size : %6.2f K\n"), (float)alpm_pkg_get_size(pkg) / 1024.0);
|
||||
printf(_("Installed Size : %6.2f K\n"), (float)alpm_pkg_get_isize(pkg) / 1024.0);
|
||||
|
||||
|
||||
/* printed using a variable to make i18n safe */
|
||||
printf("%s", descheader);
|
||||
indentprint(alpm_pkg_get_desc(pkg), mbstowcs(NULL, descheader, 0));
|
||||
printf("\n");
|
||||
|
||||
|
||||
if (md5sum != NULL && md5sum[0] != '\0') {
|
||||
printf(_("MD5 Sum : %s"), md5sum);
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ void dump_pkg_backups(pmpkg_t *pkg)
|
|||
printf(_("(none)\n"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* List all files contained in a package
|
||||
*/
|
||||
void dump_pkg_files(pmpkg_t *pkg)
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* package.h
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
#ifndef _PM_PACKAGE_H
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* remove.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -66,7 +66,7 @@ int pacman_remove(alpm_list_t *targets)
|
|||
return(1);
|
||||
}
|
||||
|
||||
/* If the target is a group, ask if its packages should be removed
|
||||
/* If the target is a group, ask if its packages should be removed
|
||||
* (the library can't remove groups for now)
|
||||
*/
|
||||
for(i = targets; i; i = alpm_list_next(i)) {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* util.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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -234,7 +234,7 @@ char *strtrim(char *str)
|
|||
if(pch != str) {
|
||||
memmove(str, pch, (strlen(pch) + 1));
|
||||
}
|
||||
|
||||
|
||||
/* check if there wasn't anything but whitespace in the string. */
|
||||
if(*str == '\0') {
|
||||
return(str);
|
||||
|
@ -380,7 +380,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local)
|
|||
* installed. */
|
||||
if(alpm_sync_get_type(sync) == PM_SYNC_TYPE_REPLACE) {
|
||||
alpm_list_t *to_replace = alpm_sync_get_data(sync);
|
||||
|
||||
|
||||
for(j = to_replace; j; j = alpm_list_next(j)) {
|
||||
pmpkg_t *rp = alpm_list_getdata(j);
|
||||
const char *name = alpm_pkg_get_name(rp);
|
||||
|
@ -422,7 +422,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local)
|
|||
list_display(_("Remove:"), to_remove);
|
||||
printf("\n");
|
||||
FREELIST(to_remove);
|
||||
|
||||
|
||||
printf(_("Total Removed Size: %.2f MB\n"), mbrsize);
|
||||
printf("\n");
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ void display_targets(const alpm_list_t *syncpkgs, pmdb_t *db_local)
|
|||
printf("\n");
|
||||
|
||||
printf(_("Total Download Size: %.2f MB\n"), mbdlsize);
|
||||
|
||||
|
||||
/* TODO because all pkgs don't include isize, this is a crude hack */
|
||||
if(mbisize > mbdlsize) {
|
||||
printf(_("Total Installed Size: %.2f MB\n"), mbisize);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* testdb.c : Test a pacman local database for validity
|
||||
*
|
||||
* Copyright (c) 2007 by Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -68,7 +68,7 @@ static int db_test(char *dbpath)
|
|||
int ret = 0;
|
||||
|
||||
DIR *dir;
|
||||
|
||||
|
||||
if(!(dir = opendir(dbpath))) {
|
||||
fprintf(stderr, "error : %s : %s\n", dbpath, strerror(errno));
|
||||
return(1);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* testpkg.c : Test a pacman package for validity
|
||||
*
|
||||
* Copyright (c) 2007 by Aaron Griffin <aaronmgriffin@gmail.com>
|
||||
*
|
||||
*
|
||||
* 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -65,7 +65,7 @@ int main(int argc, char **argv)
|
|||
alpm_pkg_free(pkg);
|
||||
retval = 0;
|
||||
}
|
||||
|
||||
|
||||
if(alpm_release() == -1) {
|
||||
fprintf(stderr, "error releasing alpm: %s\n", alpm_strerrorlast());
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* vercmp.c
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2002-2005 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
|
||||
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* 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,
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||
* USA.
|
||||
*/
|
||||
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char *argv[])
|
|||
printf("0\n");
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
ret = alpm_pkg_vercmp(s1, s2);
|
||||
printf("%d\n", ret);
|
||||
return(ret);
|
||||
|
|
Loading…
Add table
Reference in a new issue