Compare commits
13 Commits
master
...
pkgconf-1.
Author | SHA1 | Date |
---|---|---|
William Pitcock | 0f90104691 | |
William Pitcock | c0accce690 | |
William Pitcock | 0c4fec6a83 | |
William Pitcock | b9a80e6780 | |
William Pitcock | 725df9ce23 | |
William Pitcock | f9eb858ce4 | |
William Pitcock | 7e02604500 | |
William Pitcock | 15ae233d23 | |
William Pitcock | 4ea31dc692 | |
William Pitcock | 6f8e414016 | |
William Pitcock | 142a74858f | |
Igor Gnatenko | e4f47af194 | |
Baptiste Daroussin | 7556285d49 |
10
NEWS
10
NEWS
|
@ -1,6 +1,16 @@
|
|||
Changes from previous version of pkgconf
|
||||
========================================
|
||||
|
||||
Changes from 1.2.0 to 1.2.1:
|
||||
----------------------------
|
||||
|
||||
* Bug fixes:
|
||||
- pkg: properly separate static and virtual packages so they are not inappropriately
|
||||
optimized out of the dependency graph (#108)
|
||||
|
||||
* Enhancements:
|
||||
- many code fixes spotted by coverity
|
||||
|
||||
Changes from 1.1.0 to 1.2.0:
|
||||
----------------------------
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ dnl implied. In no event shall the authors be liable for any damages arising
|
|||
dnl from the use of this software.
|
||||
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([pkgconf], [1.2.0], [http://github.com/pkgconf/pkgconf/issues])
|
||||
AC_INIT([pkgconf], [1.2.1], [http://github.com/pkgconf/pkgconf/issues])
|
||||
AC_CONFIG_SRCDIR([main.c])
|
||||
AC_CONFIG_HEADERS([libpkgconf/config.h])
|
||||
AC_CHECK_FUNCS([strlcpy strlcat strndup realpath cygwin_conv_path])
|
||||
|
|
|
@ -83,7 +83,8 @@ char *pkg_optarg; /* argument associated with option */
|
|||
#define BADARG ((*options == ':') ? (int)':' : (int)'?')
|
||||
#define INORDER (int)1
|
||||
|
||||
#define EMSG ""
|
||||
/* add some padding to EMSG to avoid overrun */
|
||||
#define EMSG "\0\0\0\0"
|
||||
|
||||
#ifdef GNU_COMPATIBLE
|
||||
#define NO_PREFIX (-1)
|
||||
|
|
|
@ -124,9 +124,14 @@ pkgconf_argv_split(const char *src, int *argc, char ***argv)
|
|||
free(argv);
|
||||
free(buf);
|
||||
return -1;
|
||||
} else {
|
||||
*dst_iter++ = '\\';
|
||||
}
|
||||
else
|
||||
{
|
||||
*dst_iter++ = '\\';
|
||||
*dst_iter++ = *src_iter;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
*dst_iter++ = *src_iter;
|
||||
break;
|
||||
|
|
|
@ -208,7 +208,6 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends)
|
|||
|
||||
compare = PKGCONF_CMP_ANY;
|
||||
package_sz = 0;
|
||||
version_sz = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -254,7 +253,6 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends)
|
|||
cnameptr = cmpname;
|
||||
memset(cmpname, 0, sizeof cmpname);
|
||||
package_sz = 0;
|
||||
version_sz = 0;
|
||||
}
|
||||
|
||||
if (state == OUTSIDE_MODULE)
|
||||
|
|
|
@ -61,7 +61,7 @@ pkgconf_node_insert_tail(pkgconf_node_t *node, void *data, pkgconf_list_t *list)
|
|||
|
||||
node->data = data;
|
||||
|
||||
if (list->head == NULL)
|
||||
if (list->tail == NULL)
|
||||
{
|
||||
list->head = node;
|
||||
list->tail = node;
|
||||
|
|
|
@ -96,11 +96,12 @@ struct pkgconf_path_ {
|
|||
void *handle_device;
|
||||
};
|
||||
|
||||
#define PKGCONF_PKG_PROPF_NONE 0x0
|
||||
#define PKGCONF_PKG_PROPF_VIRTUAL 0x1
|
||||
#define PKGCONF_PKG_PROPF_CACHED 0x2
|
||||
#define PKGCONF_PKG_PROPF_SEEN 0x4
|
||||
#define PKGCONF_PKG_PROPF_UNINSTALLED 0x8
|
||||
#define PKGCONF_PKG_PROPF_NONE 0x00
|
||||
#define PKGCONF_PKG_PROPF_STATIC 0x01
|
||||
#define PKGCONF_PKG_PROPF_CACHED 0x02
|
||||
#define PKGCONF_PKG_PROPF_SEEN 0x04
|
||||
#define PKGCONF_PKG_PROPF_UNINSTALLED 0x08
|
||||
#define PKGCONF_PKG_PROPF_VIRTUAL 0x10
|
||||
|
||||
struct pkgconf_pkg_ {
|
||||
pkgconf_node_t cache_iter;
|
||||
|
|
|
@ -327,7 +327,7 @@ pkgconf_pkg_new_from_file(const pkgconf_client_t *client, const char *filename,
|
|||
void
|
||||
pkgconf_pkg_free(pkgconf_client_t *client, pkgconf_pkg_t *pkg)
|
||||
{
|
||||
if (pkg == NULL || pkg->flags & PKGCONF_PKG_PROPF_VIRTUAL)
|
||||
if (pkg == NULL || pkg->flags & PKGCONF_PKG_PROPF_STATIC)
|
||||
return;
|
||||
|
||||
pkgconf_cache_remove(client, pkg);
|
||||
|
@ -446,14 +446,12 @@ pkgconf_pkg_scan_dir(pkgconf_client_t *client, const char *path, void *data, pkg
|
|||
static char filebuf[PKGCONF_BUFSIZE];
|
||||
pkgconf_pkg_t *pkg;
|
||||
FILE *f;
|
||||
struct stat st;
|
||||
|
||||
pkgconf_strlcpy(filebuf, path, sizeof filebuf);
|
||||
pkgconf_strlcat(filebuf, "/", sizeof filebuf);
|
||||
pkgconf_strlcat(filebuf, dirent->d_name, sizeof filebuf);
|
||||
|
||||
stat(filebuf, &st);
|
||||
if (!(S_ISREG(st.st_mode)))
|
||||
if (!str_has_suffix(filebuf, PKG_CONFIG_EXT))
|
||||
continue;
|
||||
|
||||
f = fopen(filebuf, "r");
|
||||
|
@ -758,7 +756,7 @@ static pkgconf_pkg_t pkg_config_virtual = {
|
|||
.description = "virtual package defining pkg-config API version supported",
|
||||
.url = PACKAGE_BUGREPORT,
|
||||
.version = PACKAGE_VERSION,
|
||||
.flags = PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
.flags = PKGCONF_PKG_PROPF_STATIC,
|
||||
.vars = {
|
||||
.head = &(pkgconf_node_t){
|
||||
.prev = NULL,
|
||||
|
@ -778,7 +776,7 @@ static pkgconf_pkg_t pkgconf_virtual = {
|
|||
.description = "virtual package defining pkgconf API version supported",
|
||||
.url = PACKAGE_BUGREPORT,
|
||||
.version = PACKAGE_VERSION,
|
||||
.flags = PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
.flags = PKGCONF_PKG_PROPF_STATIC,
|
||||
.vars = {
|
||||
.head = &(pkgconf_node_t){
|
||||
.prev = NULL,
|
||||
|
@ -923,7 +921,7 @@ static const pkgconf_vercmp_res_func_t pkgconf_pkg_comparator_impls[] = {
|
|||
const char *
|
||||
pkgconf_pkg_get_comparator(const pkgconf_dependency_t *pkgdep)
|
||||
{
|
||||
if (pkgdep->compare > PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
|
||||
if (pkgdep->compare >= PKGCONF_ARRAY_SIZE(pkgconf_pkg_comparator_names))
|
||||
return "???";
|
||||
|
||||
return pkgconf_pkg_comparator_names[pkgdep->compare].name;
|
||||
|
@ -1063,9 +1061,6 @@ pkgconf_pkg_scan_provides_vercmp(const pkgconf_dependency_t *pkgdep, const pkgco
|
|||
{
|
||||
const pkgconf_pkg_provides_vermatch_rule_t *rule = &pkgconf_pkg_provides_vermatch_rules[pkgdep->compare];
|
||||
|
||||
if (rule == NULL)
|
||||
return false;
|
||||
|
||||
if (rule->depcmp[provider->compare] != NULL &&
|
||||
!rule->depcmp[provider->compare](provider->version, pkgdep->version))
|
||||
return false;
|
||||
|
|
|
@ -137,7 +137,7 @@ pkgconf_queue_apply(pkgconf_client_t *client, pkgconf_list_t *list, pkgconf_queu
|
|||
pkgconf_pkg_t world = {
|
||||
.id = "virtual:world",
|
||||
.realname = "virtual world package",
|
||||
.flags = PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
.flags = PKGCONF_PKG_PROPF_STATIC | PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
};
|
||||
|
||||
/* if maxdepth is one, then we will not traverse deeper than our virtual package. */
|
||||
|
@ -178,7 +178,7 @@ pkgconf_queue_validate(pkgconf_client_t *client, pkgconf_list_t *list, int maxde
|
|||
pkgconf_pkg_t world = {
|
||||
.id = "virtual:world",
|
||||
.realname = "virtual world package",
|
||||
.flags = PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
.flags = PKGCONF_PKG_PROPF_STATIC | PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
};
|
||||
|
||||
/* if maxdepth is one, then we will not traverse deeper than our virtual package. */
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include <string.h>
|
||||
#include <dirent.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
|
@ -23,7 +23,8 @@ tests_init \
|
|||
idirafter_munge_sysroot \
|
||||
idirafter_ordering \
|
||||
pcpath \
|
||||
sysroot_munge
|
||||
sysroot_munge \
|
||||
virtual_variable
|
||||
|
||||
case_sensitivity_body()
|
||||
{
|
||||
|
@ -203,3 +204,16 @@ sysroot_munge_body()
|
|||
-o inline:"-L/sysroot2/sysroot/lib -lfoo \n" \
|
||||
pkgconf --libs sysroot-dir
|
||||
}
|
||||
|
||||
virtual_variable_body()
|
||||
{
|
||||
atf_check -s exit:0 \
|
||||
pkgconf --exists pkg-config
|
||||
atf_check -s exit:0 \
|
||||
pkgconf --exists pkgconf
|
||||
|
||||
atf_check -o inline:"${pcpath}\n" \
|
||||
pkgconf --variable=pc_path pkg-config
|
||||
atf_check -o inline:"${pcpath}\n" \
|
||||
pkgconf --variable=pc_path pkgconf
|
||||
}
|
||||
|
|
|
@ -6,6 +6,11 @@ if [ "$(uname -s)" = "Msys" ]; then
|
|||
PATH_SEP=";"
|
||||
fi
|
||||
|
||||
prefix="@prefix@"
|
||||
exec_prefix="@exec_prefix@"
|
||||
datarootdir="@datarootdir@"
|
||||
pcpath="@PKGCONFIGDIR@"
|
||||
|
||||
tests_init()
|
||||
{
|
||||
TESTS="$@"
|
||||
|
|
Loading…
Reference in New Issue