From owner-svn-src-all@freebsd.org Thu Jan 17 21:46:40 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A8DD14A8718; Thu, 17 Jan 2019 21:46:40 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-it1-x129.google.com (mail-it1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD6F886424; Thu, 17 Jan 2019 21:46:39 +0000 (UTC) (envelope-from delphij@gmail.com) Received: by mail-it1-x129.google.com with SMTP id p197so3252910itp.0; Thu, 17 Jan 2019 13:46:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o0o9D8q16UHlXu7NXZdRIsVH1MB5D4+h7OQpd2pjvq0=; b=L4LtqQQwdWm4Kth8KDdseyhE/qiJhYZfZrKl+fB7AGU1O5v4U7jeziKVIAiy6ptPM8 n6C9Csw02y9tnMcwKP2rLZUYG1mfYoiBPZ37JxWKIO7/nc/AEZNK+GBpHdiq4qV7VYKR zw6p529rsEjWNlNy81+RRXv+ehgYpG/NS3H/8IIa/8snoeQd4KZCF5diwhNyE9lDdX5Z 8j2zZsjotrQzPungXPN/nRxsZyQ13VCoJ9m+QgKPUPS7pa4Hjm8oca8h8aVbawc6/LIN Wv9/HIcFpnzvEjKHlZQfgpgQpyf4rw/rX+db4cG2QNTNF7ROfv1KabvEerelWqneJHi8 J9ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o0o9D8q16UHlXu7NXZdRIsVH1MB5D4+h7OQpd2pjvq0=; b=s/W4im1X0AbRr9SpxKzVmXkRSVF7innlDzlC7wCDVkCkLEjHlxifROB0UDM/mrsOLG EUrMArxTF+e+NlQ2Et7qmfvxgwI5WW42j1iopeLxAfvD2j9rnHzJK/UWDOLq/WUwMY6Y jtj3A2G2Bx7HwWL7vUYe0lu2hxxPZeKJAoqdnqs/X2rNnVauyL5wD406guUjLshDJCqJ WiibuoR80lNNi941pJVFJy46KcZ40CVFMalSyA1lokdFfvd7yzlTt705s7n5gDktuZ0U iWpyPvScX75X144RXIXlU4Hl/7YZI92WN7+owwhaPzT9qCrS7jlEUVkPWURSaeDo1Q9J 7Ozw== X-Gm-Message-State: AJcUukeIMT+AYuOG5/S1qZaaIQx8zBOJI5nlVsl1W8GPK1zBRMXZC1Rr v0LF5kGszDTOy2rYoVcfMhRTM6dZbS43dO76REidfw== X-Google-Smtp-Source: ALg8bN41QHOg2yno1gsJSC32nDeGQycKby+VLzM/SZu7mnnnSXtmN6F15NVPdIBv4CBDpy9xR8b2mTbnQIHvu77uwGY= X-Received: by 2002:a05:660c:91:: with SMTP id t17mr974504itj.41.1547761598593; Thu, 17 Jan 2019 13:46:38 -0800 (PST) MIME-Version: 1.0 References: <201901172138.x0HLcwBp082954@repo.freebsd.org> In-Reply-To: <201901172138.x0HLcwBp082954@repo.freebsd.org> From: Xin LI Date: Thu, 17 Jan 2019 13:46:27 -0800 Message-ID: Subject: Re: svn commit: r343122 - head/usr.sbin/freebsd-update To: Ed Maste Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" X-Rspamd-Queue-Id: CD6F886424 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.971,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2019 21:46:40 -0000 On Thu, Jan 17, 2019 at 1:39 PM Ed Maste wrote: > Author: emaste > Date: Thu Jan 17 21:38:57 2019 > New Revision: 343122 > URL: https://svnweb.freebsd.org/changeset/base/343122 > > Log: > freebsd-update: Clarify unsupported release upgrade error message > > Notify users that upgrading from -CURRENT or -STABLE is unsupported by > freebsd-update. > > Also ensure --currently-running provides a correctly formatted release > (as done by -r). > > PR: 234771 > Submitted by: Gerald Aryeetey > Reported by: yuri > Reviewed by: bcran > MFC after: 1 month > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D18803 > > Modified: > head/usr.sbin/freebsd-update/freebsd-update.sh > > Modified: head/usr.sbin/freebsd-update/freebsd-update.sh > > ============================================================================== > --- head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 > 20:01:06 2019 (r343121) > +++ head/usr.sbin/freebsd-update/freebsd-update.sh Thu Jan 17 > 21:38:57 2019 (r343122) > @@ -304,6 +304,14 @@ config_TargetRelease () { > fi > } > > +# Pretend current release is FreeBSD $1 > +config_SourceRelease () { > + UNAME_r=$1 > + if echo ${UNAME_r} | grep -qE '^[0-9.]+$'; then > + UNAME_r="${UNAME_r}-RELEASE" > + fi > +} > + > # Define what happens to output of utilities > config_VerboseLevel () { > if [ -z ${VERBOSELEVEL} ]; then > @@ -442,7 +450,8 @@ parse_cmdline () { > NOTTYOK=1 > ;; > --currently-running) > - shift; export UNAME_r="$1" > + shift > + config_SourceRelease $1 || usage > ;; > > # Configuration file equivalents > @@ -657,6 +666,18 @@ fetchupgrade_check_params () { > ARCH=`uname -m` > FETCHDIR=${RELNUM}/${ARCH} > PATCHDIR=${RELNUM}/${ARCH}/bp > + > + # Disallow upgrade from a version that is not `-RELEASE` > + if ! echo "${RELNUM}" | grep -qE -- "-RELEASE$"; then > + echo -n "`basename $0`: " > + cat <<- EOF > + Cannot upgrade from a version that is not a > '-RELEASE' using `basename $0`. > + Instead, FreeBSD can be directly upgraded by > source or upgraded to a > + RELEASE/RELENG version prior to running `basename > $0`. > + EOF > + echo "System version: ${RELNUM}" > + exit 1 > + fi > I think this would break upgrading from e.g. -BETA or -RC, which is supported? Cheers,