From owner-svn-ports-all@FreeBSD.ORG Thu May 30 17:53:08 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 743B9AAE; Thu, 30 May 2013 17:53:08 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 576E09D5; Thu, 30 May 2013 17:53:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4UHr8ih088354; Thu, 30 May 2013 17:53:08 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4UHr89O088352; Thu, 30 May 2013 17:53:08 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201305301753.r4UHr89O088352@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 30 May 2013 17:53:08 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r319440 - in head/ports-mgmt/pkg-devel: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 May 2013 17:53:08 -0000 Author: bapt Date: Thu May 30 17:53:07 2013 New Revision: 319440 URL: http://svnweb.freebsd.org/changeset/ports/319440 Log: Fix pkg audit -F Reported by: Nikolai Lifanov Added: head/ports-mgmt/pkg-devel/files/ head/ports-mgmt/pkg-devel/files/patch-audit (contents, props changed) Modified: head/ports-mgmt/pkg-devel/Makefile Modified: head/ports-mgmt/pkg-devel/Makefile ============================================================================== --- head/ports-mgmt/pkg-devel/Makefile Thu May 30 17:53:04 2013 (r319439) +++ head/ports-mgmt/pkg-devel/Makefile Thu May 30 17:53:07 2013 (r319440) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.1.0.b1 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= http://files.etoilebsd.net/pkg/ \ http://mirror.shatow.net/freebsd/${PORTNAME}/ \ Added: head/ports-mgmt/pkg-devel/files/patch-audit ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ports-mgmt/pkg-devel/files/patch-audit Thu May 30 17:53:07 2013 (r319440) @@ -0,0 +1,48 @@ +diff --git libpkg/fetch.c libpkg/fetch.c +index 88979da..5dd3a94 100644 +--- libpkg/fetch.c ++++ libpkg/fetch.c +@@ -250,7 +250,7 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t + doc = u->doc; + while (remote == NULL) { + if (retry == max_retry) { +- if (repo->mirror_type == SRV && ++ if (repo != NULL && repo->mirror_type == SRV && + (strncmp(u->scheme, "http", 4) == 0 + || strcmp(u->scheme, "ftp") == 0)) { + snprintf(zone, sizeof(zone), +@@ -258,7 +258,7 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t + if (repo->srv == NULL) + repo->srv = dns_getsrvinfo(zone); + srv_current = repo->srv; +- } else if (repo->mirror_type == HTTP && ++ } else if (repo != NULL && repo->mirror_type == HTTP && + strncmp(u->scheme, "http", 4) == 0) { + snprintf(zone, sizeof(zone), + "%s://%s", u->scheme, u->host); +@@ -268,9 +268,9 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t + } + } + +- if (repo->mirror_type == SRV && repo->srv != NULL) ++ if (repo != NULL && repo->mirror_type == SRV && repo->srv != NULL) + strlcpy(u->host, srv_current->host, sizeof(u->host)); +- else if (repo->mirror_type == HTTP && repo->http != NULL) { ++ else if (repo != NULL && repo->mirror_type == HTTP && repo->http != NULL) { + strlcpy(u->scheme, http_current->url->scheme, sizeof(u->scheme)); + strlcpy(u->host, http_current->url->host, sizeof(u->host)); + snprintf(docpath, MAXPATHLEN, "%s%s", http_current->url->doc, doc); +@@ -291,11 +291,11 @@ pkg_fetch_file_to_fd(struct pkg_repo *repo, const char *url, int dest, time_t *t + retcode = EPKG_FATAL; + goto cleanup; + } +- if (repo->mirror_type == SRV && repo->srv != NULL) { ++ if (repo != NULL && repo->mirror_type == SRV && repo->srv != NULL) { + srv_current = srv_current->next; + if (srv_current == NULL) + srv_current = repo->srv; +- } else if (repo->mirror_type == HTTP && repo->http != NULL) { ++ } else if (repo != NULL && repo->mirror_type == HTTP && repo->http != NULL) { + http_current = repo->http->next; + if (http_current == NULL) + http_current = repo->http;