Date: Tue, 18 Jun 2013 19:57:52 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r321218 - in head/ports-mgmt/pkg: . files Message-ID: <201306181957.r5IJvqwD090681@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Tue Jun 18 19:57:51 2013 New Revision: 321218 URL: http://svnweb.freebsd.org/changeset/ports/321218 Log: Fix a segfault on i386 and powerpc64 while registering a port as automatic [1] Prevent 'pkg update' will always think that the repo is up to date if no mtime header is sent by the http server [2] Bump port revision Reported by: adrian[1], hrs [1] Tested by: hrs [1] Submitted by: cperciva [2] Added: head/ports-mgmt/pkg/files/ head/ports-mgmt/pkg/files/patch-fix-register-update (contents, props changed) Modified: head/ports-mgmt/pkg/Makefile Modified: head/ports-mgmt/pkg/Makefile ============================================================================== --- head/ports-mgmt/pkg/Makefile Tue Jun 18 19:41:48 2013 (r321217) +++ head/ports-mgmt/pkg/Makefile Tue Jun 18 19:57:51 2013 (r321218) @@ -2,6 +2,7 @@ PORTNAME= pkg DISTVERSION= 1.0.13 +PORTREVISION= 1 CATEGORIES= ports-mgmt MASTER_SITES= LOCAL/portmgr \ http://files.etoilebsd.net/pkg/ \ Added: head/ports-mgmt/pkg/files/patch-fix-register-update ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/ports-mgmt/pkg/files/patch-fix-register-update Tue Jun 18 19:57:51 2013 (r321218) @@ -0,0 +1,39 @@ +diff --git libpkg/fetch.c libpkg/fetch.c +index c2e5919..8e902ae 100644 +--- libpkg/fetch.c ++++ libpkg/fetch.c +@@ -145,7 +145,7 @@ pkg_fetch_file_to_fd(const char *url, int dest, time_t t) + retry = max_retry; + + u = fetchParseURL(url); +- if (t != 0) ++ if (t != 0 && st.mtime != 0) + u->ims_time = t; + + doc = u->doc; +diff --git newvers.sh newvers.sh +index 207aab0..651231f 100755 +--- newvers.sh ++++ newvers.sh +@@ -41,7 +41,7 @@ + : ${PKG_MINOR_VERSION="0"} + : ${PKG_PATCH_LEVEL="13"} + +-: ${PORTREVISION:=""} ++: ${PORTREVISION:="1"} + : ${PORTEPOCH:=} + + # ------------------------------------------------------------------ +diff --git pkg/register.c pkg/register.c +index 385f8a2..ce29612 100644 +--- pkg/register.c ++++ pkg/register.c +@@ -119,7 +119,7 @@ exec_register(int argc, char **argv) + err(1, "cannot allocate memory"); + break; + case 'd': +- pkg_set(pkg, PKG_AUTOMATIC, true); ++ pkg_set(pkg, PKG_AUTOMATIC, (int64_t)true); + break; + case 'i': + if ((input_path = strdup(optarg)) == NULL)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306181957.r5IJvqwD090681>