From owner-freebsd-ports@FreeBSD.ORG Tue Mar 25 06:15:57 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F144B8C; Tue, 25 Mar 2014 06:15:57 +0000 (UTC) Received: from mail-la0-x22a.google.com (mail-la0-x22a.google.com [IPv6:2a00:1450:4010:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 63922CF4; Tue, 25 Mar 2014 06:15:56 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id ec20so4724lab.29 for ; Mon, 24 Mar 2014 23:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=rxVnUfwssn9xyrUYofQBcVWNgQnkrchtVwGaHIFKg1s=; b=Oe30QZ/mPqwlT3e7OZKKediaXGa1dBqbVO/E+Q4RTbuiWnyjFXs/sJyu0US2hrRC8E EvGkwGD2h3MPD4R9r900W20Jh4jgFECO7MzSzNbvMfLmm3txxa3RV/dosVqE0dA3y0E+ 1IuP0Uu4zKg6Rhdazo4vOr0PkZ5hgKeDmDItNIzWW7JXfot1INOORUeyNXexXzv+zKX+ b1SdoP5qXa8h0eOEdVQvI19D5030hmjFy5ja7wSrmaeCROWWu4IDldEWHI5HdgEMTSET BYGNZKaMSnSgpOVl+ySY8mE+VsRfMG4lnNjgMZBSs7mb07xvJ/Of9bdNuOdlAeaNL6qM 0T2g== X-Received: by 10.112.52.225 with SMTP id w1mr42274724lbo.22.1395728154470; Mon, 24 Mar 2014 23:15:54 -0700 (PDT) MIME-Version: 1.0 Sender: royce.williams@gmail.com Received: by 10.112.1.33 with HTTP; Mon, 24 Mar 2014 23:15:34 -0700 (PDT) In-Reply-To: References: <53287821.4040209@freebsd.org> <5328A03A.3000305@freebsd.org> <532DD2EB.1080204@freebsd.org> <532DD64B.9000905@freebsd.org> <532DD978.3010502@freebsd.org> From: Royce Williams Date: Mon, 24 Mar 2014 22:15:34 -0800 X-Google-Sender-Auth: BEMKFDYv2gqZkNqJokSyfm4LA8A Message-ID: Subject: Re: reason 23 why we've moved to linux To: Colin Percival Content-Type: text/plain; charset=ISO-8859-1 Cc: Randy Bush , Alfred Perlstein , FreeBSD Mailing List X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Mar 2014 06:15:57 -0000 Colin, adding you to this thread with proposed patch (two options) for freebsd-update, below. On Sat, Mar 22, 2014 at 10:49 AM, Randy Bush wrote: >> Honest question, have you been building things from source under >> debian's ports or are you using their version of "pkg"? > > the latter > > and i have two 9 systems where i try to use freebsd-update. also a > time-consuming rabbit hole leading nowhere pleasant. e.g. > > # freebsd-update upgrade -r 9.2-RELEASE-p3 > Looking up update.FreeBSD.org mirrors... 5 mirrors found. > Fetching metadata signature for 9.2-RELEASE from update5.freebsd.org... done. > Fetching metadata index... done. > Inspecting system... done. > > The following components of FreeBSD seem to be installed: > kernel/generic world/base world/doc world/games world/lib32 > > The following components of FreeBSD do not seem to be installed: > > Does this look reasonable (y/n)? y > > Fetching metadata signature for 9.2-RELEASE-p3 from update5.freebsd.org... failed. > Fetching metadata signature for 9.2-RELEASE-p3 from update2.freebsd.org... failed. > Fetching metadata signature for 9.2-RELEASE-p3 from update3.freebsd.org... failed. > Fetching metadata signature for 9.2-RELEASE-p3 from update4.freebsd.org... failed. > Fetching metadata signature for 9.2-RELEASE-p3 from update6.freebsd.org... failed. > No mirrors remaining, giving up. Randy, you're not the first to specify a patch level in the target release version for freebsd-update. This failure mode could be more friendly. One of the patches below (or something like them) could help. We could either warn the user, and stop: --- freebsd-update.bak 2013-11-29 07:18:36.000000000 -0900 +++ freebsd-update 2014-03-24 21:59:20.000000000 -0800 @@ -674,6 +674,15 @@ exit 1 fi + # The target release should not specify a patch level. + if echo "${TARGETRELEASE}" | grep -qE "\-p[0-9]+$"; then + TARGETRELEASE=`echo ${TARGETRELEASE} | + sed -E 's,-p[0-9]+,,'` + echo -n "`basename $0`: " + echo "Cannot upgrade to a specific patch level - try '-r ${TARGETRELEASE}' instead" + exit 1 + fi + # Turning off AllowAdd or AllowDelete is a bad idea for upgrades. if [ "${ALLOWADD}" = "no" ]; then echo -n "`basename $0`: " ... or else freebsd-update could DWIM by precisely stripping any patch level, and continuing: --- freebsd-update.bak 2013-11-29 07:18:36.000000000 -0900 +++ freebsd-update.new 2014-03-24 22:09:37.000000000 -0800 @@ -674,6 +674,16 @@ exit 1 fi + # The target release should not specify a patch level. + if echo "${TARGETRELEASE}" | grep -qE "\-p[0-9]+$"; then + TARGETRELEASE=`echo ${TARGETRELEASE} | + sed -E 's,-p[0-9]+,,'` + echo -n "`basename $0`: " + echo -n "WARNING: Cannot upgrade to a specific patch level. " + echo "Using ${TARGETRELEASE} instead." + echo + fi + # Turning off AllowAdd or AllowDelete is a bad idea for upgrades. if [ "${ALLOWADD}" = "no" ]; then echo -n "`basename $0`: " Colin, tweak (or take a different tack) as you see fit, of course. Royce