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