Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Merge branch 'master' into coctic-master
Matthew Seaman committed 12 years ago
commit 5722690f853758d2a6e83035e824160baf79359c
parent fb643d9
8 files changed +69 -23
modified external/libyaml/src/scanner.c
@@ -615,11 +615,14 @@ yaml_parser_decrease_flow_level(yaml_parser_t *parser);
 */

static int
-
yaml_parser_roll_indent(yaml_parser_t *parser, int column,
+
yaml_parser_roll_indent(yaml_parser_t *parser, size_t column,
        int number, yaml_token_type_t type, yaml_mark_t mark);

static int
-
yaml_parser_unroll_indent(yaml_parser_t *parser, int column);
+
yaml_parser_unroll_indent(yaml_parser_t *parser, size_t column);
+

+
static int
+
yaml_parser_reset_indent(yaml_parser_t *parser);

/*
 * Token fetchers.
@@ -1206,7 +1209,7 @@ yaml_parser_decrease_flow_level(yaml_parser_t *parser)
 */

static int
-
yaml_parser_roll_indent(yaml_parser_t *parser, int column,
+
yaml_parser_roll_indent(yaml_parser_t *parser, size_t column,
        int number, yaml_token_type_t type, yaml_mark_t mark)
{
    yaml_token_t token;
@@ -1216,7 +1219,7 @@ yaml_parser_roll_indent(yaml_parser_t *parser, int column,
    if (parser->flow_level)
        return 1;

-
    if (parser->indent < column)
+
    if (parser->indent == -1 || parser->indent < column)
    {
        /*
         * Push the current indentation level to the stack and set the new
@@ -1254,7 +1257,7 @@ yaml_parser_roll_indent(yaml_parser_t *parser, int column,


static int
-
yaml_parser_unroll_indent(yaml_parser_t *parser, int column)
+
yaml_parser_unroll_indent(yaml_parser_t *parser, size_t column)
{
    yaml_token_t token;

@@ -1263,6 +1266,15 @@ yaml_parser_unroll_indent(yaml_parser_t *parser, int column)
    if (parser->flow_level)
        return 1;

+
    /*
+
     * column is unsigned and parser->indent is signed, so if
+
     * parser->indent is less than zero the conditional in the while
+
     * loop below is incorrect.  Guard against that.
+
     */
+
    
+
    if (parser->indent < 0)
+
        return 1;
+

    /* Loop through the intendation levels in the stack. */

    while (parser->indent > column)
@@ -1283,6 +1295,41 @@ yaml_parser_unroll_indent(yaml_parser_t *parser, int column)
}

/*
+
 * Pop indentation levels from the indents stack until the current
+
 * level resets to -1.  For each intendation level, append the
+
 * BLOCK-END token.
+
 */
+

+
static int
+
yaml_parser_reset_indent(yaml_parser_t *parser)
+
{
+
    yaml_token_t token;
+

+
    /* In the flow context, do nothing. */
+

+
    if (parser->flow_level)
+
        return 1;
+

+
    /* Loop through the intendation levels in the stack. */
+

+
    while (parser->indent > -1)
+
    {
+
        /* Create a token and append it to the queue. */
+

+
        TOKEN_INIT(token, YAML_BLOCK_END_TOKEN, parser->mark, parser->mark);
+

+
        if (!ENQUEUE(parser, parser->tokens, token))
+
            return 0;
+

+
        /* Pop the indentation level. */
+

+
        parser->indent = POP(parser, parser->indents);
+
    }
+

+
    return 1;
+
}
+

+
/*
 * Initialize the scanner and produce the STREAM-START token.
 */

@@ -1338,7 +1385,7 @@ yaml_parser_fetch_stream_end(yaml_parser_t *parser)

    /* Reset the indentation level. */

-
    if (!yaml_parser_unroll_indent(parser, -1))
+
    if (!yaml_parser_reset_indent(parser))
        return 0;

    /* Reset simple keys. */
@@ -1369,7 +1416,7 @@ yaml_parser_fetch_directive(yaml_parser_t *parser)

    /* Reset the indentation level. */

-
    if (!yaml_parser_unroll_indent(parser, -1))
+
    if (!yaml_parser_reset_indent(parser))
        return 0;

    /* Reset simple keys. */
@@ -1407,7 +1454,7 @@ yaml_parser_fetch_document_indicator(yaml_parser_t *parser,

    /* Reset the indentation level. */

-
    if (!yaml_parser_unroll_indent(parser, -1))
+
    if (!yaml_parser_reset_indent(parser))
        return 0;

    /* Reset simple keys. */
modified libpkg/pkg_elf.c
@@ -172,6 +172,7 @@ test_depends(void *actdata, struct pkg *pkg, const char *fpath,
			   PKG_VERSION, &depversion,
			   PKG_LOCKED,  &deplocked);

+
		dep = pkg_dep_lookup(pkg, deporigin);
		pkg_get(pkg, PKG_ORIGIN, &origin);

		if (dep == NULL && strcmp(origin, deporigin) != 0) {
modified pkg/info.c
@@ -83,6 +83,7 @@ exec_info(int argc, char **argv)
	int open_flags = 0;
	bool pkg_exists = false;
	bool origin_search = false;
+
	bool e_flag = false;
	struct pkg_manifest_key *keys = NULL;

	/* TODO: exclusive opts ? */
@@ -138,7 +139,7 @@ exec_info(int argc, char **argv)
			opt |= INFO_FLATSIZE;
			break;
		case 'E': /* ports compatibility */
-
			/* Ignored */
+
			e_flag = true;
			break;
		case 'q':
			quiet = true;
@@ -342,7 +343,7 @@ exec_info(int argc, char **argv)
		 * only show full version in case of match glob with a single argument specified
		 * which does not contains any glob pattern
		 */
-
		if (argc == 1 && !origin_search && !quiet &&
+
		if (argc == 1 && !origin_search && !quiet && !e_flag &&
		    match == MATCH_GLOB &&
		    strcspn(pkgname, "*[]{}()") == strlen(pkgname) &&
		    opt == INFO_TAG_NAMEVER)
modified pkg/pkg-info.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd January 28, 2014
+
.Dd February 1, 2014
.Dt PKG-INFO 8
.Os
.Sh NAME
@@ -46,6 +46,7 @@ Display any annotations added to the package.
.It Fl f
Display full information about the packages matching
.Ar pkg-name .
+
This is the default.
.It Fl R
Display the full manifest (raw) about the packages matching
.Ar pkg-name .
@@ -114,7 +115,7 @@ origin.
Added only for Ports compatibility.
.Pp
.It Fl E
-
does nothing.
+
Hides the full package output and only shows the package name.
This option is deprecated and exists only for Ports compatibility.
.It Fl o
Display
modified pkg/pkg-query.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd December 5, 2013
+
.Dd January 14, 2014
.Dt PKG-QUERY 8
.Os
.Sh NAME
modified pkg/pkg-rquery.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd December 5, 2013
+
.Dd February 1, 2014
.Dt PKG-RQUERY 8
.Os
.Sh NAME
@@ -117,7 +117,7 @@ is in bytes, and
.Cm h
is in human readable format.
.It Cm \&%M
-
message contain in the matched package
+
message contained in the matched package
.It Cm \&%? Ns Op drCOLBbA
Returns 0 if the list is empty and 1 if the list has information to display
.Bl -tag -width indent
modified pkg/pkg.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd September 14, 2013
+
.Dd February 1, 2014
.Dt PKG 8
.Os
.\" ---------------------------------------------------------------------------
@@ -109,10 +109,7 @@ flag was first released in the
bootstrapper
in FreeBSD 8.4,
but was missing from FreeBSD 9.1.
-
It was not released in
-
.Nm
-
until 1.0.13.
-
Because of this, it may not be enough to just call
+
It may not be enough to just call
.Nm Fl N ,
as the bootstrapper may be invoked, or an error returned
from
@@ -344,8 +341,7 @@ Check for missing dependencies:
.Xr pkg-updating 8 ,
.Xr pkg-upgrade 8 ,
.Xr pkg-version 8 ,
-
.Xr pkg-which 8 ,
-
.Xr pthread 3
+
.Xr pkg-which 8
.Pp
To build your own package set for one or multiple servers see
.Em ports-mgmt/poudriere
modified pkg/update.c
@@ -56,7 +56,7 @@ pkgcli_update(bool force) {
	if (!quiet)
		printf("Updating repository catalogue\n");

-
	if(pkg_repos_total_count() == 0) {
+
	if (pkg_repos_total_count() == 0) {
		fprintf(stderr, "No valid repository found.\n");
		return (EPKG_FATAL);
	}