From owner-freebsd-stable@FreeBSD.ORG Fri Jan 6 18:59:16 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1D0D106564A for ; Fri, 6 Jan 2012 18:59:16 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id AAC4F8FC08 for ; Fri, 6 Jan 2012 18:59:16 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3146390obb.13 for ; Fri, 06 Jan 2012 10:59:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=HeRTtGJ29H5QsKuZYcf+ZI9P2Gq6eejian7ro6bMydo=; b=sV4782BN52S2pJoIPMb8g0W9coJ6JiW/RFQDqGQtS9ksD21cIHcTS9GsDIv4JZB7mr ES4lQ1VheSHSm3oO0Pos3oudA+YtTf2Nsr0WOD62Qi190Z6YEnRw+dX6mQf8+WXO/37p MfbStlzX95MYwME1WG+wnzdTu2xozVeA5BWu8= MIME-Version: 1.0 Received: by 10.182.76.134 with SMTP id k6mr5763605obw.10.1325874931389; Fri, 06 Jan 2012 10:35:31 -0800 (PST) Received: by 10.182.171.67 with HTTP; Fri, 6 Jan 2012 10:35:31 -0800 (PST) In-Reply-To: <201201061850.33863.pinter@tresorium.hu> References: <201201061850.33863.pinter@tresorium.hu> Date: Fri, 6 Jan 2012 21:35:31 +0300 Message-ID: From: Sergey Kandaurov To: Oliver Pinter Content-Type: text/plain; charset=ISO-8859-1 Cc: stable@freebsd.org, current@freebsd.org Subject: Re: [RFC] fix git detection code in newvers.sh when svn installed X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Jan 2012 18:59:17 -0000 On 6 January 2012 21:50, Oliver Pinter wrote: > Hi All! > > When svn installed and the source stored in git, then now the version > detection failed. The attached patch fixed this situation. > FWIW, a different version proposed by Maciej Milewski on -current some time ago. I don't have/use git, so I cannot test these changes. It is good in the sense that it doesn't duplicate a search path. The patch is below for reference: --- sys/conf/newvers.sh 2011-11-19 00:56:50.795815738 +0100 +++ sys/conf/newvers-patched.sh 2011-11-19 00:58:21.187818982 +0100 @@ -88,14 +88,14 @@ i=`${MAKE:-make} -V KERN_IDENT` for dir in /bin /usr/bin /usr/local/bin; do - if [ -x "${dir}/svnversion" ] ; then - svnversion=${dir}/svnversion - break - fi if [ -d "${SYSDIR}/../.git" -a -x "${dir}/git" ] ; then git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git" break fi + if [ -x "${dir}/svnversion" ] ; then + svnversion=${dir}/svnversion + break + fi done if [ -n "$svnversion" ] ; then -- wbr, pluknet