forked from mirrors/pacman
Compare commits
27 Commits
morganamil
...
morganamil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
219941734a | ||
|
|
fe055bec1f | ||
|
|
ee31b4c12e | ||
|
|
cde562bb4d | ||
|
|
15eb65c839 | ||
|
|
40f59fd6ac | ||
|
|
3c68d11f3c | ||
|
|
2200dd8797 | ||
|
|
c7c280115f | ||
|
|
564fd18c9a | ||
|
|
5c55ef2db5 | ||
|
|
de5fb9ae2f | ||
|
|
d4b4d315aa | ||
|
|
97d127588e | ||
|
|
c301327ad5 | ||
|
|
841236a1c9 | ||
|
|
6ce85053c5 | ||
|
|
e877472509 | ||
|
|
2b4c022925 | ||
|
|
689223f40d | ||
|
|
8d48332069 | ||
|
|
a61c500557 | ||
|
|
c7c88f880a | ||
|
|
753083d241 | ||
|
|
36d3d8401c | ||
|
|
ddcceb9314 | ||
|
|
0c701af590 |
@@ -240,7 +240,7 @@ link:translation-help.html[translation-help].
|
|||||||
Bugs
|
Bugs
|
||||||
----
|
----
|
||||||
If you find bugs (which is quite likely), please email them to the pacman-dev
|
If you find bugs (which is quite likely), please email them to the pacman-dev
|
||||||
mailing last at mailto:pacman-dev@archlinux.org[] with specific information
|
mailing last at mailto:pacman-dev@lists.archlinux.org[] with specific information
|
||||||
such as your command-line, the nature of the bug, and even the package database
|
such as your command-line, the nature of the bug, and even the package database
|
||||||
if it helps.
|
if it helps.
|
||||||
|
|
||||||
@@ -251,6 +251,6 @@ bugs under the Pacman project.
|
|||||||
Copyright
|
Copyright
|
||||||
---------
|
---------
|
||||||
pacman is Copyright (C) 2006-2021 Pacman Development Team
|
pacman is Copyright (C) 2006-2021 Pacman Development Team
|
||||||
<pacman-dev@archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
<pacman-dev@lists.archlinux.org> and Copyright (C) 2002-2006 Judd Vinet
|
||||||
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
<jvinet@zeroflux.org> and is licensed through the GNU General Public License,
|
||||||
version 2 or later.
|
version 2 or later.
|
||||||
|
|||||||
@@ -210,6 +210,11 @@ Transaction Options (apply to '-S', '-R' and '-U')
|
|||||||
dependencies are installed and there are no package conflicts in the
|
dependencies are installed and there are no package conflicts in the
|
||||||
system. Specify this option twice to skip all dependency checks.
|
system. Specify this option twice to skip all dependency checks.
|
||||||
|
|
||||||
|
*-n, \--nosave*::
|
||||||
|
Instructs pacman to ignore file backup designations. Normally, when a
|
||||||
|
file is removed from the system, the database is checked to see if the
|
||||||
|
file should be renamed with a '.pacsave' extension.
|
||||||
|
|
||||||
*\--assume-installed* <package=version>::
|
*\--assume-installed* <package=version>::
|
||||||
Add a virtual package "package" with version "version" to the transaction
|
Add a virtual package "package" with version "version" to the transaction
|
||||||
to satisfy dependencies. This allows to disable specific dependency checks
|
to satisfy dependencies. This allows to disable specific dependency checks
|
||||||
@@ -275,6 +280,9 @@ Upgrade Options (apply to '-S' and '-U')[[UO]]
|
|||||||
*\--needed*::
|
*\--needed*::
|
||||||
Do not reinstall the targets that are already up-to-date.
|
Do not reinstall the targets that are already up-to-date.
|
||||||
|
|
||||||
|
*\--nokeep*::
|
||||||
|
Overwrite backup files when installing packages.
|
||||||
|
|
||||||
*\--overwrite* <glob>::
|
*\--overwrite* <glob>::
|
||||||
Bypass file conflict checks and overwrite conflicting files. If the
|
Bypass file conflict checks and overwrite conflicting files. If the
|
||||||
package that is about to be installed contains files that are already
|
package that is about to be installed contains files that are already
|
||||||
@@ -370,6 +378,9 @@ Query Options (apply to '-Q')[[QO]]
|
|||||||
replacements are not checked here. This option works best if the sync
|
replacements are not checked here. This option works best if the sync
|
||||||
database is refreshed using '-Sy'.
|
database is refreshed using '-Sy'.
|
||||||
|
|
||||||
|
*-w, \--backup*::
|
||||||
|
List all modified backup files owened by a given package. Multiple packages can
|
||||||
|
be specified on the command line. Pass twice to print all backup files.
|
||||||
|
|
||||||
Remove Options (apply to '-R')[[RO]]
|
Remove Options (apply to '-R')[[RO]]
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@@ -378,11 +389,6 @@ Remove Options (apply to '-R')[[RO]]
|
|||||||
or more target packages. This operation is recursive and must be used
|
or more target packages. This operation is recursive and must be used
|
||||||
with care, since it can remove many potentially needed packages.
|
with care, since it can remove many potentially needed packages.
|
||||||
|
|
||||||
*-n, \--nosave*::
|
|
||||||
Instructs pacman to ignore file backup designations. Normally, when a
|
|
||||||
file is removed from the system, the database is checked to see if the
|
|
||||||
file should be renamed with a '.pacsave' extension.
|
|
||||||
|
|
||||||
*-s, \--recursive*::
|
*-s, \--recursive*::
|
||||||
Remove each target specified including all of their dependencies, provided
|
Remove each target specified including all of their dependencies, provided
|
||||||
that (A) they are not required by other packages; and (B) they were not
|
that (A) they are not required by other packages; and (B) they were not
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ Pre-release Updates
|
|||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
A week or two before each release, the codebase will go into a string freeze
|
A week or two before each release, the codebase will go into a string freeze
|
||||||
and an email will be sent to the mailto:pacman-dev@archlinux.org[pacman-dev]
|
and an email will be sent to the mailto:pacman-dev@lists.archlinux.org[pacman-dev]
|
||||||
mailing list asking for translations. This email will have a prefix of
|
mailing list asking for translations. This email will have a prefix of
|
||||||
*[translation]* for anyone looking to set up an email filter.
|
*[translation]* for anyone looking to set up an email filter.
|
||||||
|
|
||||||
@@ -150,4 +150,4 @@ There are currently no efforts underway to include translated manual pages in
|
|||||||
the pacman codebase. However, this is not to say translations are unwelcome. If
|
the pacman codebase. However, this is not to say translations are unwelcome. If
|
||||||
someone has experience with i18n man pages and how to best include them with our
|
someone has experience with i18n man pages and how to best include them with our
|
||||||
source, please contact the pacman-dev mailing list at
|
source, please contact the pacman-dev mailing list at
|
||||||
mailto:pacman-dev@archlinux.org[].
|
mailto:pacman-dev@lists.archlinux.org[].
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.c
|
* add.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* add.h
|
* add.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.c
|
* alpm.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm.h
|
* alpm.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -101,6 +101,11 @@ typedef struct _alpm_handle_t alpm_handle_t;
|
|||||||
typedef struct _alpm_db_t alpm_db_t;
|
typedef struct _alpm_db_t alpm_db_t;
|
||||||
|
|
||||||
|
|
||||||
|
/** A Database file iterator
|
||||||
|
* @ingroup libalpm_databases
|
||||||
|
*/
|
||||||
|
typedef struct __alpm_db_files_t alpm_db_files_t;
|
||||||
|
|
||||||
/** A package.
|
/** A package.
|
||||||
*
|
*
|
||||||
* A package can be loaded from disk via \link alpm_pkg_load \endlink or retrieved from a database.
|
* A package can be loaded from disk via \link alpm_pkg_load \endlink or retrieved from a database.
|
||||||
@@ -158,6 +163,9 @@ typedef struct _alpm_backup_t {
|
|||||||
*/
|
*/
|
||||||
alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path);
|
alpm_file_t *alpm_filelist_contains(alpm_filelist_t *filelist, const char *path);
|
||||||
|
|
||||||
|
/** Frees a file list */
|
||||||
|
void alpm_filelist_free(alpm_filelist_t *files);
|
||||||
|
|
||||||
/* End of libalpm_files */
|
/* End of libalpm_files */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@@ -1281,6 +1289,12 @@ int alpm_unregister_all_syncdbs(alpm_handle_t *handle);
|
|||||||
*/
|
*/
|
||||||
int alpm_db_unregister(alpm_db_t *db);
|
int alpm_db_unregister(alpm_db_t *db);
|
||||||
|
|
||||||
|
/** Get the handle of a package database.
|
||||||
|
* @param db pointer to the package database
|
||||||
|
* @return the alpm handle that the package database belongs to
|
||||||
|
*/
|
||||||
|
alpm_handle_t *alpm_db_get_handle(alpm_db_t *db);
|
||||||
|
|
||||||
/** Get the name of a package database.
|
/** Get the name of a package database.
|
||||||
* @param db pointer to the package database
|
* @param db pointer to the package database
|
||||||
* @return the name of the package database, NULL on error
|
* @return the name of the package database, NULL on error
|
||||||
@@ -1444,6 +1458,42 @@ int alpm_db_get_usage(alpm_db_t *db, int *usage);
|
|||||||
/* End of usage accessors */
|
/* End of usage accessors */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
/** @name File iterators
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** Opens a handle to the db files iterator.
|
||||||
|
* @param db the db files to iterate over
|
||||||
|
* @return handle to the iterator
|
||||||
|
*/
|
||||||
|
alpm_db_files_t *alpm_db_files_open(alpm_db_t *db);
|
||||||
|
|
||||||
|
/** Goes to the next package.
|
||||||
|
* @param files handle to the file iterator
|
||||||
|
* @param pkgname stores the pkgname of the current package
|
||||||
|
* @return 0 on success, 1 if end of iterator, -1 on error
|
||||||
|
*/
|
||||||
|
int alpm_db_files_next(alpm_db_files_t *files, char** pkgname);
|
||||||
|
|
||||||
|
/** Loads the files for a package into a file list.
|
||||||
|
*
|
||||||
|
* This extends the file list as needed, reusing the memory alloced.
|
||||||
|
* You can reuse the same file list for calls to this function but
|
||||||
|
* the list should be freed with \link alpm_filelist_free alpm_filelist_free \endlink
|
||||||
|
* after use.
|
||||||
|
* @param files handle to the file iterator
|
||||||
|
* @param filelist the filelist to load files into
|
||||||
|
* @return 0 on success, -1 on error
|
||||||
|
*/
|
||||||
|
int alpm_db_files_load(alpm_db_files_t *files, alpm_filelist_t *filelist);
|
||||||
|
|
||||||
|
/** Close the db file iterator
|
||||||
|
* @param files handle to the file iterator
|
||||||
|
*/
|
||||||
|
void alpm_db_files_close(alpm_db_files_t *files);
|
||||||
|
|
||||||
|
/* End of file iterators */
|
||||||
|
/** @} */
|
||||||
|
|
||||||
/* End of libalpm_databases */
|
/* End of libalpm_databases */
|
||||||
/** @} */
|
/** @} */
|
||||||
@@ -2386,6 +2436,12 @@ int alpm_pkg_should_ignore(alpm_handle_t *handle, alpm_pkg_t *pkg);
|
|||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/** Gets the handle of a package
|
||||||
|
* @param pkg a pointer to package
|
||||||
|
* @return the alpm handle that the package belongs to
|
||||||
|
*/
|
||||||
|
alpm_handle_t *alpm_pkg_get_handle(alpm_pkg_t *pkg);
|
||||||
|
|
||||||
/** Gets the name of the file from which the package was loaded.
|
/** Gets the name of the file from which the package was loaded.
|
||||||
* @param pkg a pointer to package
|
* @param pkg a pointer to package
|
||||||
* @return a reference to an internal string
|
* @return a reference to an internal string
|
||||||
@@ -2693,7 +2749,6 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive);
|
|||||||
/* End of mtree accessors */
|
/* End of mtree accessors */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
|
||||||
/* End of libalpm_packages */
|
/* End of libalpm_packages */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
@@ -2719,7 +2774,8 @@ int alpm_pkg_mtree_close(const alpm_pkg_t *pkg, struct archive *archive);
|
|||||||
typedef enum _alpm_transflag_t {
|
typedef enum _alpm_transflag_t {
|
||||||
/** Ignore dependency checks. */
|
/** Ignore dependency checks. */
|
||||||
ALPM_TRANS_FLAG_NODEPS = 1,
|
ALPM_TRANS_FLAG_NODEPS = 1,
|
||||||
/* (1 << 1) flag can go here */
|
/** Don't keep backup files when installing packages. */
|
||||||
|
ALPM_TRANS_FLAG_NOKEEP = (1 << 1),
|
||||||
/** Delete files even if they are tagged as backup. */
|
/** Delete files even if they are tagged as backup. */
|
||||||
ALPM_TRANS_FLAG_NOSAVE = (1 << 2),
|
ALPM_TRANS_FLAG_NOSAVE = (1 << 2),
|
||||||
/** Ignore version numbers when checking dependencies. */
|
/** Ignore version numbers when checking dependencies. */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.c
|
* alpm_list.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* alpm_list.h
|
* alpm_list.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.c
|
* backup.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* backup.h
|
* backup.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_local.c : backend for the local database
|
* be_local.c : backend for the local database
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_package.c : backend for packages
|
* be_package.c : backend for packages
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* be_sync.c : backend for sync databases
|
* be_sync.c : backend for sync databases
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
@@ -566,8 +566,7 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0
|
if(strcmp(filename, "desc") == 0 || strcmp(filename, "depends") == 0) {
|
||||||
|| strcmp(filename, "files") == 0) {
|
|
||||||
int ret;
|
int ret;
|
||||||
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
|
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
|
||||||
char *line = buf.line;
|
char *line = buf.line;
|
||||||
@@ -636,36 +635,6 @@ static int sync_db_read(alpm_db_t *db, struct archive *archive,
|
|||||||
READ_AND_SPLITDEP(pkg->conflicts);
|
READ_AND_SPLITDEP(pkg->conflicts);
|
||||||
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
} else if(strcmp(line, "%PROVIDES%") == 0) {
|
||||||
READ_AND_SPLITDEP(pkg->provides);
|
READ_AND_SPLITDEP(pkg->provides);
|
||||||
} else if(strcmp(line, "%FILES%") == 0) {
|
|
||||||
/* TODO: this could lazy load if there is future demand */
|
|
||||||
size_t files_count = 0, files_size = 0;
|
|
||||||
alpm_file_t *files = NULL;
|
|
||||||
|
|
||||||
while(1) {
|
|
||||||
if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
line = buf.line;
|
|
||||||
if(_alpm_strip_newline(line, buf.real_line_size) == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!_alpm_greedy_grow((void **)&files, &files_size,
|
|
||||||
(files_count ? (files_count + 1) * sizeof(alpm_file_t) : 8 * sizeof(alpm_file_t)))) {
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
STRDUP(files[files_count].name, line, goto error);
|
|
||||||
files_count++;
|
|
||||||
}
|
|
||||||
/* attempt to hand back any memory we don't need */
|
|
||||||
if(files_count > 0) {
|
|
||||||
REALLOC(files, sizeof(alpm_file_t) * files_count, (void)0);
|
|
||||||
} else {
|
|
||||||
FREE(files);
|
|
||||||
}
|
|
||||||
pkg->files.count = files_count;
|
|
||||||
pkg->files.files = files;
|
|
||||||
_alpm_filelist_sort(&pkg->files);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(ret != ARCHIVE_EOF) {
|
if(ret != ARCHIVE_EOF) {
|
||||||
@@ -716,3 +685,152 @@ alpm_db_t *_alpm_db_register_sync(alpm_handle_t *handle, const char *treename,
|
|||||||
handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
|
handle->dbs_sync = alpm_list_add(handle->dbs_sync, db);
|
||||||
return db;
|
return db;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int load_files(struct archive *archive, alpm_filelist_t *filelist)
|
||||||
|
{
|
||||||
|
struct archive_read_buffer buf = {0};
|
||||||
|
|
||||||
|
/* 512K for a line length seems reasonable */
|
||||||
|
buf.max_line_size = 512 * 1024;
|
||||||
|
|
||||||
|
_alpm_filelist_truncate(filelist);
|
||||||
|
|
||||||
|
int ret;
|
||||||
|
while((ret = _alpm_archive_fgets(archive, &buf)) == ARCHIVE_OK) {
|
||||||
|
char *line = buf.line;
|
||||||
|
if(_alpm_strip_newline(line, buf.real_line_size) == 0) {
|
||||||
|
/* length of stripped line was zero */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strcmp(line, "%FILES%") == 0) {
|
||||||
|
size_t files_size = 0;
|
||||||
|
|
||||||
|
while(1) {
|
||||||
|
if(_alpm_archive_fgets(archive, &buf) != ARCHIVE_OK) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
line = buf.line;
|
||||||
|
if(_alpm_strip_newline(line, buf.real_line_size) == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!_alpm_greedy_grow((void **)&filelist->files, &files_size,
|
||||||
|
(filelist->count ? (filelist->count + 1) * sizeof(alpm_file_t) : 8 * sizeof(alpm_file_t)))) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
STRDUP(filelist->files[filelist->count].name, line, goto error);
|
||||||
|
filelist->count++;
|
||||||
|
}
|
||||||
|
_alpm_filelist_sort(filelist);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ret != ARCHIVE_EOF) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
error:
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
alpm_db_files_t SYMEXPORT *alpm_db_files_open(alpm_db_t *db)
|
||||||
|
{
|
||||||
|
const char *dbpath;
|
||||||
|
int fd;
|
||||||
|
struct stat buf;
|
||||||
|
struct archive *archive;
|
||||||
|
alpm_db_files_t *files = NULL;
|
||||||
|
|
||||||
|
ASSERT(db != NULL, return NULL);
|
||||||
|
|
||||||
|
dbpath = _alpm_db_path(db);
|
||||||
|
if(!dbpath) {
|
||||||
|
/* pm_errno set in _alpm_db_path() */
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(db->status & DB_STATUS_INVALID || db->status & DB_STATUS_MISSING) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fd = _alpm_open_archive(db->handle, dbpath, &buf,
|
||||||
|
&archive, ALPM_ERR_DB_OPEN);
|
||||||
|
if(fd < 0) {
|
||||||
|
db->status &= ~DB_STATUS_VALID;
|
||||||
|
db->status |= DB_STATUS_INVALID;
|
||||||
|
_alpm_archive_read_free(archive);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
MALLOC(files, sizeof(alpm_db_files_t), RET_ERR(db->handle, ALPM_ERR_MEMORY, NULL));
|
||||||
|
files->archive = archive;
|
||||||
|
files->fd = fd;
|
||||||
|
files->db = db;
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SYMEXPORT alpm_db_files_next(alpm_db_files_t *files, char** pkgname)
|
||||||
|
{
|
||||||
|
struct archive_entry *entry;
|
||||||
|
const char *entryname;
|
||||||
|
int archive_ret;
|
||||||
|
char *filename;
|
||||||
|
|
||||||
|
ASSERT(files != NULL, return -1);
|
||||||
|
ASSERT(pkgname != NULL, return -1);
|
||||||
|
|
||||||
|
while((archive_ret = archive_read_next_header(files->archive, &entry)) == ARCHIVE_OK) {
|
||||||
|
mode_t mode = archive_entry_mode(entry);
|
||||||
|
if(!S_ISDIR(mode)) {
|
||||||
|
entryname = archive_entry_pathname(entry);
|
||||||
|
if(entryname == NULL) {
|
||||||
|
_alpm_log(files->db->handle, ALPM_LOG_DEBUG,
|
||||||
|
"invalid archive entry provided to alpm_db_files_next, skipping\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_alpm_splitname(entryname, pkgname, NULL, NULL) != 0) {
|
||||||
|
_alpm_log(files->db->handle, ALPM_LOG_ERROR,
|
||||||
|
_("invalid name for database entry '%s'\n"), entryname);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
filename = strrchr(entryname, '/');
|
||||||
|
filename++;
|
||||||
|
|
||||||
|
/* we only want to read the file list */
|
||||||
|
if(filename && strcmp(filename, "files") == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(archive_ret != ARCHIVE_EOF) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int SYMEXPORT alpm_db_files_load(alpm_db_files_t *files, alpm_filelist_t *filelist)
|
||||||
|
{
|
||||||
|
ASSERT(files != NULL, return -1);
|
||||||
|
ASSERT(filelist != NULL, return -1);
|
||||||
|
|
||||||
|
_alpm_filelist_truncate(filelist);
|
||||||
|
if(load_files(files->archive, filelist) != 0) {
|
||||||
|
_alpm_log(files->db->handle, ALPM_LOG_ERROR,
|
||||||
|
_("could not parse package description file '%s' from db '%s'\n"),
|
||||||
|
"files", files->db->treename);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SYMEXPORT alpm_db_files_close(alpm_db_files_t *files)
|
||||||
|
{
|
||||||
|
ASSERT(files != NULL, return);
|
||||||
|
_alpm_archive_read_free(files->archive);
|
||||||
|
close(files->fd);
|
||||||
|
free(files);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.c
|
* conflict.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* conflict.h
|
* conflict.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.c
|
* db.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -212,6 +212,12 @@ int SYMEXPORT alpm_db_remove_server(alpm_db_t *db, const char *url)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_handle_t SYMEXPORT *alpm_db_get_handle(alpm_db_t *db)
|
||||||
|
{
|
||||||
|
ASSERT(db != NULL, return NULL);
|
||||||
|
return db->handle;
|
||||||
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db)
|
const char SYMEXPORT *alpm_db_get_name(const alpm_db_t *db)
|
||||||
{
|
{
|
||||||
ASSERT(db != NULL, return NULL);
|
ASSERT(db != NULL, return NULL);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* db.h
|
* db.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -61,6 +61,13 @@ struct db_operations {
|
|||||||
void (*unregister) (alpm_db_t *);
|
void (*unregister) (alpm_db_t *);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Database files iterator */
|
||||||
|
struct __alpm_db_files_t {
|
||||||
|
struct archive *archive;
|
||||||
|
int fd;
|
||||||
|
alpm_db_t *db;
|
||||||
|
};
|
||||||
|
|
||||||
/* Database */
|
/* Database */
|
||||||
struct _alpm_db_t {
|
struct _alpm_db_t {
|
||||||
alpm_handle_t *handle;
|
alpm_handle_t *handle;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.c
|
* deps.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* deps.h
|
* deps.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* diskspace.c
|
* diskspace.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* diskspace.h
|
* diskspace.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2010-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dload.c
|
* dload.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* dload.h
|
* dload.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* error.c
|
* error.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* filelist.c
|
* filelist.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
@@ -145,3 +145,17 @@ void _alpm_filelist_sort(alpm_filelist_t *filelist)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _alpm_filelist_truncate(alpm_filelist_t *files)
|
||||||
|
{
|
||||||
|
for(size_t i = 0; i < files->count; i++) {
|
||||||
|
FREE(files->files[i].name);
|
||||||
|
}
|
||||||
|
files->count = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SYMEXPORT alpm_filelist_free(alpm_filelist_t *files)
|
||||||
|
{
|
||||||
|
_alpm_filelist_truncate(files);
|
||||||
|
free(files->files);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* filelist.h
|
* filelist.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
@@ -28,5 +28,6 @@ alpm_list_t *_alpm_filelist_intersection(alpm_filelist_t *filesA,
|
|||||||
alpm_filelist_t *filesB);
|
alpm_filelist_t *filesB);
|
||||||
|
|
||||||
void _alpm_filelist_sort(alpm_filelist_t *filelist);
|
void _alpm_filelist_sort(alpm_filelist_t *filelist);
|
||||||
|
void _alpm_filelist_truncate(alpm_filelist_t *filelist);
|
||||||
|
|
||||||
#endif /* ALPM_FILELIST_H */
|
#endif /* ALPM_FILELIST_H */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* graph.c - helpful graph structure and setup/teardown methods
|
* graph.c - helpful graph structure and setup/teardown methods
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* graph.h - helpful graph structure and setup/teardown methods
|
* graph.h - helpful graph structure and setup/teardown methods
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.c
|
* group.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* group.h
|
* group.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.c
|
* handle.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* handle.h
|
* handle.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* hook.c
|
* hook.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* hook.h
|
* hook.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
/*
|
/*
|
||||||
* libarchive-compat.h
|
* libarchive-compat.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.c
|
* log.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* log.h
|
* log.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.c
|
* package.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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 Christian Hamar <krics@linuxforum.hu>
|
* Copyright (c) 2005, 2006 by Christian Hamar <krics@linuxforum.hu>
|
||||||
@@ -57,7 +57,7 @@ int SYMEXPORT alpm_pkg_checkmd5sum(alpm_pkg_t *pkg)
|
|||||||
ASSERT(pkg->origin == ALPM_PKG_FROM_SYNCDB,
|
ASSERT(pkg->origin == ALPM_PKG_FROM_SYNCDB,
|
||||||
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
|
RET_ERR(pkg->handle, ALPM_ERR_WRONG_ARGS, -1));
|
||||||
|
|
||||||
fpath = _alpm_filecache_find(pkg->handle, pkg->filename);
|
fpath = _alpm_cache_find_pkg(pkg, 0);
|
||||||
|
|
||||||
retval = _alpm_test_checksum(fpath, pkg->md5sum, ALPM_PKG_VALIDATION_MD5SUM);
|
retval = _alpm_test_checksum(fpath, pkg->md5sum, ALPM_PKG_VALIDATION_MD5SUM);
|
||||||
|
|
||||||
@@ -100,6 +100,7 @@ static alpm_list_t *_pkg_get_replaces(alpm_pkg_t *pkg) { return pkg->replaces;
|
|||||||
static alpm_filelist_t *_pkg_get_files(alpm_pkg_t *pkg) { return &(pkg->files); }
|
static alpm_filelist_t *_pkg_get_files(alpm_pkg_t *pkg) { return &(pkg->files); }
|
||||||
static alpm_list_t *_pkg_get_backup(alpm_pkg_t *pkg) { return pkg->backup; }
|
static alpm_list_t *_pkg_get_backup(alpm_pkg_t *pkg) { return pkg->backup; }
|
||||||
|
|
||||||
|
|
||||||
static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
|
static void *_pkg_changelog_open(alpm_pkg_t UNUSED *pkg)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -193,6 +194,13 @@ const char SYMEXPORT *alpm_pkg_get_base(alpm_pkg_t *pkg)
|
|||||||
return pkg->ops->get_base(pkg);
|
return pkg->ops->get_base(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
alpm_handle_t SYMEXPORT *alpm_pkg_get_handle(alpm_pkg_t *pkg)
|
||||||
|
{
|
||||||
|
ASSERT(pkg != NULL, return NULL);
|
||||||
|
pkg->handle->pm_errno = ALPM_ERR_OK;
|
||||||
|
return pkg->handle;
|
||||||
|
}
|
||||||
|
|
||||||
const char SYMEXPORT *alpm_pkg_get_name(alpm_pkg_t *pkg)
|
const char SYMEXPORT *alpm_pkg_get_name(alpm_pkg_t *pkg)
|
||||||
{
|
{
|
||||||
ASSERT(pkg != NULL, return NULL);
|
ASSERT(pkg != NULL, return NULL);
|
||||||
@@ -292,7 +300,7 @@ int SYMEXPORT alpm_pkg_get_sig(alpm_pkg_t *pkg, unsigned char **sig, size_t *sig
|
|||||||
alpm_errno_t err;
|
alpm_errno_t err;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
|
||||||
pkgpath = _alpm_filecache_find(pkg->handle, pkg->filename);
|
pkgpath = _alpm_cache_find_pkg(pkg, 0);
|
||||||
if(!pkgpath) {
|
if(!pkgpath) {
|
||||||
GOTO_ERR(pkg->handle, ALPM_ERR_PKG_NOT_FOUND, cleanup);
|
GOTO_ERR(pkg->handle, ALPM_ERR_PKG_NOT_FOUND, cleanup);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* package.h
|
* package.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* pkghash.c
|
* pkghash.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* pkghash.h
|
* pkghash.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* remove.c
|
* remove.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -332,7 +332,7 @@ static int can_remove_file(alpm_handle_t *handle, const alpm_file_t *file)
|
|||||||
/* If we fail write permissions due to a read-only filesystem, abort.
|
/* If we fail write permissions due to a read-only filesystem, abort.
|
||||||
* Assume all other possible failures are covered somewhere else */
|
* Assume all other possible failures are covered somewhere else */
|
||||||
if(_alpm_access(handle, NULL, filepath, W_OK) == -1) {
|
if(_alpm_access(handle, NULL, filepath, W_OK) == -1) {
|
||||||
if(errno != EACCES && errno != ETXTBSY && access(filepath, F_OK) == 0) {
|
if(errno != EACCES && errno != ETXTBSY && _alpm_access(handle, NULL, filepath, F_OK) == 0) {
|
||||||
/* only return failure if the file ACTUALLY exists and we can't write to
|
/* only return failure if the file ACTUALLY exists and we can't write to
|
||||||
* it - ignore "chmod -w" simple permission failures */
|
* it - ignore "chmod -w" simple permission failures */
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, _("cannot remove file '%s': %s\n"),
|
_alpm_log(handle, ALPM_LOG_ERROR, _("cannot remove file '%s': %s\n"),
|
||||||
@@ -575,7 +575,9 @@ static int should_skip_file(alpm_handle_t *handle,
|
|||||||
{
|
{
|
||||||
return _alpm_fnmatch_patterns(handle->noupgrade, path) == 0
|
return _alpm_fnmatch_patterns(handle->noupgrade, path) == 0
|
||||||
|| alpm_list_find_str(handle->trans->skip_remove, path)
|
|| alpm_list_find_str(handle->trans->skip_remove, path)
|
||||||
|| (newpkg && _alpm_needbackup(path, newpkg)
|
|| (!(handle->trans->flags & ALPM_TRANS_FLAG_NOKEEP)
|
||||||
|
&& newpkg
|
||||||
|
&& _alpm_needbackup(path, newpkg)
|
||||||
&& alpm_filelist_contains(alpm_pkg_get_files(newpkg), path));
|
&& alpm_filelist_contains(alpm_pkg_get_files(newpkg), path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* remove.h
|
* remove.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* signing.c
|
* signing.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* signing.h
|
* signing.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* sync.c
|
* sync.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -323,7 +323,7 @@ static int compute_download_size(alpm_pkg_t *newpkg)
|
|||||||
|
|
||||||
ASSERT(newpkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
ASSERT(newpkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
||||||
fname = newpkg->filename;
|
fname = newpkg->filename;
|
||||||
fpath = _alpm_filecache_find(handle, fname);
|
fpath = _alpm_cache_find_pkg(newpkg, 0);
|
||||||
|
|
||||||
/* downloaded file exists, so there's nothing to grab */
|
/* downloaded file exists, so there's nothing to grab */
|
||||||
if(fpath) {
|
if(fpath) {
|
||||||
@@ -333,7 +333,7 @@ static int compute_download_size(alpm_pkg_t *newpkg)
|
|||||||
|
|
||||||
CALLOC(fnamepart, strlen(fname) + 6, sizeof(char), return -1);
|
CALLOC(fnamepart, strlen(fname) + 6, sizeof(char), return -1);
|
||||||
sprintf(fnamepart, "%s.part", fname);
|
sprintf(fnamepart, "%s.part", fname);
|
||||||
fpath = _alpm_filecache_find(handle, fnamepart);
|
fpath = _alpm_cache_find_pkg(newpkg, 1);
|
||||||
if(fpath) {
|
if(fpath) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if(stat(fpath, &st) == 0) {
|
if(stat(fpath, &st) == 0) {
|
||||||
@@ -732,26 +732,18 @@ static int find_dl_candidates(alpm_handle_t *handle, alpm_list_t **files)
|
|||||||
handle->pm_errno = ALPM_ERR_SERVER_NONE;
|
handle->pm_errno = ALPM_ERR_SERVER_NONE;
|
||||||
_alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n",
|
_alpm_log(handle, ALPM_LOG_ERROR, "%s: %s\n",
|
||||||
alpm_strerror(handle->pm_errno), repo->treename);
|
alpm_strerror(handle->pm_errno), repo->treename);
|
||||||
return 1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
ASSERT(spkg->filename != NULL, RET_ERR(handle, ALPM_ERR_PKG_INVALID_NAME, -1));
|
||||||
|
|
||||||
need_download = spkg->download_size != 0 || !_alpm_filecache_exists(handle, spkg->filename);
|
need_download = spkg->download_size != 0 || !_alpm_cache_pkg_exists(spkg, 0);
|
||||||
/* even if the package file in the cache we need to check for
|
/* even if the package file in the cache we need to check for
|
||||||
* accompanion *.sig file as well.
|
* accompanion *.sig file as well.
|
||||||
* If *.sig is not cached then force download the package + its signature file.
|
* If *.sig is not cached then force download the package + its signature file.
|
||||||
*/
|
*/
|
||||||
if(!need_download && (siglevel & ALPM_SIG_PACKAGE)) {
|
if(!need_download && (siglevel & ALPM_SIG_PACKAGE)) {
|
||||||
char *sig_filename = NULL;
|
need_download = !_alpm_cache_pkg_exists(spkg, 1);
|
||||||
int len = strlen(spkg->filename) + 5;
|
|
||||||
|
|
||||||
MALLOC(sig_filename, len, RET_ERR(handle, ALPM_ERR_MEMORY, -1));
|
|
||||||
snprintf(sig_filename, len, "%s.sig", spkg->filename);
|
|
||||||
|
|
||||||
need_download = !_alpm_filecache_exists(handle, sig_filename);
|
|
||||||
|
|
||||||
FREE(sig_filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(need_download) {
|
if(need_download) {
|
||||||
@@ -990,7 +982,14 @@ static int check_validity(alpm_handle_t *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_bytes += v.pkg->size;
|
current_bytes += v.pkg->size;
|
||||||
v.path = _alpm_filecache_find(handle, v.pkg->filename);
|
v.path = _alpm_cache_find_pkg(v.pkg, 0);
|
||||||
|
|
||||||
|
if(!v.path) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
_("%s: could not find package in cache\n"), v.pkg->name);
|
||||||
|
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
|
||||||
|
}
|
||||||
|
|
||||||
v.siglevel = alpm_db_get_siglevel(alpm_pkg_get_db(v.pkg));
|
v.siglevel = alpm_db_get_siglevel(alpm_pkg_get_db(v.pkg));
|
||||||
|
|
||||||
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
|
if(_alpm_pkg_validate_internal(handle, v.path, v.pkg,
|
||||||
@@ -1080,7 +1079,14 @@ static int load_packages(alpm_handle_t *handle, alpm_list_t **data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
current_bytes += spkg->size;
|
current_bytes += spkg->size;
|
||||||
filepath = _alpm_filecache_find(handle, spkg->filename);
|
|
||||||
|
filepath = _alpm_cache_find_pkg(spkg, 0);
|
||||||
|
|
||||||
|
if(!filepath) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
_("%s: could not find package in cache\n"), spkg->name);
|
||||||
|
RET_ERR(handle, ALPM_ERR_PKG_NOT_FOUND, -1);
|
||||||
|
}
|
||||||
|
|
||||||
/* load the package file and replace pkgcache entry with it in the target list */
|
/* load the package file and replace pkgcache entry with it in the target list */
|
||||||
/* TODO: alpm_pkg_get_db() will not work on this target anymore */
|
/* TODO: alpm_pkg_get_db() will not work on this target anymore */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* sync.h
|
* sync.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* trans.c
|
* trans.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -177,7 +177,8 @@ int SYMEXPORT alpm_trans_commit(alpm_handle_t *handle, alpm_list_t **data)
|
|||||||
ASSERT(trans != NULL, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1));
|
ASSERT(trans != NULL, RET_ERR(handle, ALPM_ERR_TRANS_NULL, -1));
|
||||||
ASSERT(trans->state == STATE_PREPARED, RET_ERR(handle, ALPM_ERR_TRANS_NOT_PREPARED, -1));
|
ASSERT(trans->state == STATE_PREPARED, RET_ERR(handle, ALPM_ERR_TRANS_NOT_PREPARED, -1));
|
||||||
|
|
||||||
ASSERT(!(trans->flags & ALPM_TRANS_FLAG_NOLOCK), RET_ERR(handle, ALPM_ERR_TRANS_NOT_LOCKED, -1));
|
ASSERT(!(trans->flags & ALPM_TRANS_FLAG_NOLOCK && !(trans->flags & ALPM_TRANS_FLAG_DOWNLOADONLY)),
|
||||||
|
RET_ERR(handle, ALPM_ERR_TRANS_NOT_LOCKED, -1));
|
||||||
|
|
||||||
/* If there's nothing to do, return without complaining */
|
/* If there's nothing to do, return without complaining */
|
||||||
if(trans->add == NULL && trans->remove == NULL) {
|
if(trans->add == NULL && trans->remove == NULL) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* trans.h
|
* trans.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* util.c
|
* util.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -815,6 +815,37 @@ int _alpm_str_cmp(const void *s1, const void *s2)
|
|||||||
return strcmp(s1, s2);
|
return strcmp(s1, s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *_alpm_cache_find_pkg(alpm_pkg_t *pkg, int sig) {
|
||||||
|
alpm_handle_t *handle = pkg->handle;
|
||||||
|
struct stat buf;
|
||||||
|
alpm_list_t *servers = pkg->origin_data.db->servers;
|
||||||
|
char *retpath;
|
||||||
|
char filepath[PATH_MAX];
|
||||||
|
|
||||||
|
for(alpm_list_t *j = servers; j; j = j->next) {
|
||||||
|
char *server = j->data;
|
||||||
|
|
||||||
|
if(strncmp("file://", server, strlen("file://")) == 0) {
|
||||||
|
int len = strlen(server) - strlen("file://") + 1 + strlen(pkg->filename) + 1;
|
||||||
|
|
||||||
|
if(sig) {
|
||||||
|
len += strlen(".sig");
|
||||||
|
snprintf(filepath, len, "%s/%s", server + strlen("file://"), pkg->filename);
|
||||||
|
} else {
|
||||||
|
snprintf(filepath, len, "%s/%s.sig", server + strlen("file://"), pkg->filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stat(filepath, &buf) == 0 && S_ISREG(buf.st_mode)) {
|
||||||
|
STRDUP(retpath, filepath, RET_ERR(handle, ALPM_ERR_MEMORY, NULL));
|
||||||
|
_alpm_log(handle, ALPM_LOG_DEBUG, "found pkg in repo cache: %s\n", retpath);
|
||||||
|
return retpath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return _alpm_filecache_find(handle, pkg->filename);
|
||||||
|
}
|
||||||
|
|
||||||
/** Find a filename in a registered alpm cachedir.
|
/** Find a filename in a registered alpm cachedir.
|
||||||
* @param handle the context handle
|
* @param handle the context handle
|
||||||
* @param filename name of file to find
|
* @param filename name of file to find
|
||||||
@@ -831,10 +862,17 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
|
|||||||
for(i = handle->cachedirs; i; i = i->next) {
|
for(i = handle->cachedirs; i; i = i->next) {
|
||||||
snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
|
snprintf(path, PATH_MAX, "%s%s", (char *)i->data,
|
||||||
filename);
|
filename);
|
||||||
if(stat(path, &buf) == 0 && S_ISREG(buf.st_mode)) {
|
if(stat(path, &buf) == 0) {
|
||||||
retpath = strdup(path);
|
if(S_ISREG(buf.st_mode)) {
|
||||||
_alpm_log(handle, ALPM_LOG_DEBUG, "found cached pkg: %s\n", retpath);
|
retpath = strdup(path);
|
||||||
return retpath;
|
_alpm_log(handle, ALPM_LOG_DEBUG, "found cached pkg: %s\n", retpath);
|
||||||
|
return retpath;
|
||||||
|
} else {
|
||||||
|
_alpm_log(handle, ALPM_LOG_WARNING,
|
||||||
|
"cached pkg '%s' is not a regular file: mode=%i\n", path, buf.st_mode);
|
||||||
|
}
|
||||||
|
} else if(errno != ENOENT) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_WARNING, "could not open '%s'\n: %s", path, strerror(errno));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* package wasn't found in any cachedir */
|
/* package wasn't found in any cachedir */
|
||||||
@@ -846,10 +884,10 @@ char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename)
|
|||||||
* @param filename name of file to find
|
* @param filename name of file to find
|
||||||
* @return 0 if the filename was not found, 1 otherwise
|
* @return 0 if the filename was not found, 1 otherwise
|
||||||
*/
|
*/
|
||||||
int _alpm_filecache_exists(alpm_handle_t *handle, const char *filename)
|
int _alpm_cache_pkg_exists(alpm_pkg_t *pkg, int sig)
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
char *fpath = _alpm_filecache_find(handle, filename);
|
char *fpath = _alpm_cache_find_pkg(pkg, sig);
|
||||||
res = (fpath != NULL);
|
res = (fpath != NULL);
|
||||||
FREE(fpath);
|
FREE(fpath);
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* util.h
|
* util.h
|
||||||
*
|
*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.org>
|
||||||
* 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>
|
||||||
@@ -133,9 +133,10 @@ int _alpm_run_chroot(alpm_handle_t *handle, const char *cmd, char *const argv[],
|
|||||||
_alpm_cb_io in_cb, void *in_ctx);
|
_alpm_cb_io in_cb, void *in_ctx);
|
||||||
int _alpm_ldconfig(alpm_handle_t *handle);
|
int _alpm_ldconfig(alpm_handle_t *handle);
|
||||||
int _alpm_str_cmp(const void *s1, const void *s2);
|
int _alpm_str_cmp(const void *s1, const void *s2);
|
||||||
|
char *_alpm_cache_find_pkg(alpm_pkg_t *pkg, int sig);
|
||||||
char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
|
char *_alpm_filecache_find(alpm_handle_t *handle, const char *filename);
|
||||||
/* Checks whether a file exists in cache */
|
/* Checks whether a file exists in cache */
|
||||||
int _alpm_filecache_exists(alpm_handle_t *handle, const char *filename);
|
int _alpm_cache_pkg_exists(alpm_pkg_t *pkg, int sig);
|
||||||
const char *_alpm_filecache_setup(alpm_handle_t *handle);
|
const char *_alpm_filecache_setup(alpm_handle_t *handle);
|
||||||
/* Unlike many uses of alpm_pkgvalidation_t, _alpm_test_checksum expects
|
/* Unlike many uses of alpm_pkgvalidation_t, _alpm_test_checksum expects
|
||||||
* an enum value rather than a bitfield. */
|
* an enum value rather than a bitfield. */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
* Copyright (c) 2006-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# buildenv.sh - functions for altering the build environment before
|
# buildenv.sh - functions for altering the build environment before
|
||||||
# compilation
|
# compilation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# buildflags.sh - Clear user-specified buildflags if requested
|
# buildflags.sh - Clear user-specified buildflags if requested
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# ccache - Cache compilations and reuse them to save time on repetitions
|
# ccache - Cache compilations and reuse them to save time on repetitions
|
||||||
# distcc - Distribute compilation of C and C++ across machines
|
# distcc - Distribute compilation of C and C++ across machines
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# debugflags.sh - Specify flags for building a package with debugging
|
# debugflags.sh - Specify flags for building a package with debugging
|
||||||
# symbols
|
# symbols
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# lto.sh - Specify flags for building a package with link-time
|
# lto.sh - Specify flags for building a package with link-time
|
||||||
# optimisation
|
# optimisation
|
||||||
#
|
#
|
||||||
# Copyright (c) 2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# makeflags.sh - Clear user-specified makeflags if requested
|
# makeflags.sh - Clear user-specified makeflags if requested
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2007-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# executable.sh - confirm presence of dependent executables
|
# executable.sh - confirm presence of dependent executables
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# ccache.sh - Confirm presence of ccache binary
|
# ccache.sh - Confirm presence of ccache binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# checksum.sh - Confirm presence of binaries for checksum operations
|
# checksum.sh - Confirm presence of binaries for checksum operations
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# distcc.sh - Confirm presence of distcc binary
|
# distcc.sh - Confirm presence of distcc binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# fakeroot.sh - Confirm presence of fakeroot binary
|
# fakeroot.sh - Confirm presence of fakeroot binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# gpg.sh - Confirm presence of gpg binary
|
# gpg.sh - Confirm presence of gpg binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# gzip.sh - Confirm presence of gzip binary
|
# gzip.sh - Confirm presence of gzip binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# pacman.sh - Confirm presence of pacman binary
|
# pacman.sh - Confirm presence of pacman binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2012-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# strip.sh - Confirm presence of strip binary
|
# strip.sh - Confirm presence of strip binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# sudo.sh - Confirm presence of sudo binary
|
# sudo.sh - Confirm presence of sudo binary
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# vcs.sh - Confirm presence of binaries for VCS operations
|
# vcs.sh - Confirm presence of binaries for VCS operations
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# integrity.sh - functions relating to source integrity checking
|
# integrity.sh - functions relating to source integrity checking
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# generate_checksum.sh - functions for generating source checksums
|
# generate_checksum.sh - functions for generating source checksums
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# generate_signature.sh - functions for generating PGP signatures
|
# generate_signature.sh - functions for generating PGP signatures
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2008-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# verify_checksum.sh - functions for checking source checksums
|
# verify_checksum.sh - functions for checking source checksums
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# verify_signature.sh - functions for checking PGP signatures
|
# verify_signature.sh - functions for checking PGP signatures
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2011-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# lint_config.sh - functions for checking for makepkg.conf errors
|
# lint_config.sh - functions for checking for makepkg.conf errors
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# ext.sh - Check that source/package extensions have valid prefixes
|
# ext.sh - Check that source/package extensions have valid prefixes
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2019-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# paths.sh - Check that pathname components do not contain odd characters
|
# paths.sh - Check that pathname components do not contain odd characters
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# source_date_epoch.sh - Check that reproducible builds timestamp is valid
|
# source_date_epoch.sh - Check that reproducible builds timestamp is valid
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# variable.sh - Check that variables are or are not arrays as appropriate
|
# variable.sh - Check that variables are or are not arrays as appropriate
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# lint_package.sh - functions for checking for packaging errors
|
# lint_package.sh - functions for checking for packaging errors
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# build_references.sh - Warn about files containing references to build directories
|
# build_references.sh - Warn about files containing references to build directories
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# dotfiles.sh - check for dotfiles in the package root
|
# dotfiles.sh - check for dotfiles in the package root
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# file_names.sh - check package file names
|
# file_names.sh - check package file names
|
||||||
#
|
#
|
||||||
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2016-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# missing_backup.sh - Warn about missing files in the backup array
|
# missing_backup.sh - Warn about missing files in the backup array
|
||||||
#
|
#
|
||||||
# Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2013-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# lint_pkgbuild.sh - functions for detecting PKGBUILD errors
|
# lint_pkgbuild.sh - functions for detecting PKGBUILD errors
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2015-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# arch.sh - Check the 'arch' array conforms to requirements.
|
# arch.sh - Check the 'arch' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# arch_specific.sh - Check that arch specific variables can be arch specific.
|
# arch_specific.sh - Check that arch specific variables can be arch specific.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# backup.sh - Check the 'backup' array conforms to requirements.
|
# backup.sh - Check the 'backup' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# changelog.sh - Check the files in the 'changelog' array exist.
|
# changelog.sh - Check the files in the 'changelog' array exist.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# checkdepends.sh - Check the 'checkdepends' array conforms to requirements.
|
# checkdepends.sh - Check the 'checkdepends' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# conflicts.sh - Check the 'conflicts' array conforms to requirements.
|
# conflicts.sh - Check the 'conflicts' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# depends.sh - Check the 'depends' array conforms to requirements.
|
# depends.sh - Check the 'depends' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# epoch.sh - Check the 'epoch' variable conforms to requirements.
|
# epoch.sh - Check the 'epoch' variable conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# fullpkgver.sh - Check whether a full version conforms to requirements.
|
# fullpkgver.sh - Check whether a full version conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2018-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# install.sh - Check the files in the 'install' array exist.
|
# install.sh - Check the files in the 'install' array exist.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# makedepends.sh - Check the 'makedepends' array conforms to requirements.
|
# makedepends.sh - Check the 'makedepends' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# optdepends.sh - Check the 'optdepends' array conforms to requirements.
|
# optdepends.sh - Check the 'optdepends' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# options.sh - Check the 'options' array conforms to requirements.
|
# options.sh - Check the 'options' array conforms to requirements.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# package_function.sh - Check that required package functions exist.
|
# package_function.sh - Check that required package functions exist.
|
||||||
#
|
#
|
||||||
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@archlinux.org>
|
# Copyright (c) 2014-2021 Pacman Development Team <pacman-dev@lists.archlinux.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
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user