Re: svn commit: r346018 - head/sys/conf

2020-03-05 Thread Alan Somers
Wow, what a speedy response, and so late at night!  Thanks!

On Wed, Mar 4, 2020 at 11:22 PM Warner Losh  wrote:

>
>
> On Wed, Mar 4, 2020 at 10:27 PM Alan Somers  wrote:
>
>> On Sun, Apr 7, 2019 at 12:40 PM Warner Losh  wrote:
>>
>>> Author: imp
>>> Date: Sun Apr  7 18:39:55 2019
>>> New Revision: 346018
>>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>>
>>> Log:
>>>   Use default shell assignment rather more complicated if then
>>>   construct.
>>>
>>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>>> feedback)
>>>   Differential Revision: https://reviews.freebsd.org/D19797
>>>
>>
>> Can we MFC this to stable/12?  Before this change, setting
>> BRANCH_OVERRIDE during "make release" would have no effect.
>>
>
> Sure thing. There was a merge conflict, which makes sense, but I think I
> resolved it correctly.
>
> Warner
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2020-03-04 Thread Warner Losh
On Wed, Mar 4, 2020 at 10:27 PM Alan Somers  wrote:

> On Sun, Apr 7, 2019 at 12:40 PM Warner Losh  wrote:
>
>> Author: imp
>> Date: Sun Apr  7 18:39:55 2019
>> New Revision: 346018
>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>
>> Log:
>>   Use default shell assignment rather more complicated if then
>>   construct.
>>
>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>> feedback)
>>   Differential Revision: https://reviews.freebsd.org/D19797
>>
>
> Can we MFC this to stable/12?  Before this change, setting BRANCH_OVERRIDE
> during "make release" would have no effect.
>

Sure thing. There was a merge conflict, which makes sense, but I think I
resolved it correctly.

Warner
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2020-03-04 Thread Alan Somers
On Sun, Apr 7, 2019 at 12:40 PM Warner Losh  wrote:

> Author: imp
> Date: Sun Apr  7 18:39:55 2019
> New Revision: 346018
> URL: https://svnweb.freebsd.org/changeset/base/346018
>
> Log:
>   Use default shell assignment rather more complicated if then
>   construct.
>
>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
> feedback)
>   Differential Revision: https://reviews.freebsd.org/D19797
>

Can we MFC this to stable/12?  Before this change, setting BRANCH_OVERRIDE
during "make release" would have no effect.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Warner Losh
On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 
wrote:

> Please revert this patch. If I'm not wrong, this will break the
> freebsd-version command's generation or output.
>

You are going to need to be a lot more specific about this. It makes no
sense to me at all how any of this could break that. The code is identical
logically and produces the same result.

Warner


On Sunday, April 7, 2019, Warner Losh  wrote:
>
>> Author: imp
>> Date: Sun Apr  7 18:39:55 2019
>> New Revision: 346018
>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>
>> Log:
>>   Use default shell assignment rather more complicated if then
>>   construct.
>>
>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>> feedback)
>>   Differential Revision: https://reviews.freebsd.org/D19797
>>
>> Modified:
>>   head/sys/conf/newvers.sh
>>
>> Modified: head/sys/conf/newvers.sh
>>
>> ==
>> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
>> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
>> @@ -46,10 +46,7 @@
>>
>>  TYPE="FreeBSD"
>>  REVISION="13.0"
>> -BRANCH="CURRENT"
>> -if [ -n "${BRANCH_OVERRIDE}" ]; then
>> -   BRANCH=${BRANCH_OVERRIDE}
>> -fi
>> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>>  RELEASE="${REVISION}-${BRANCH}"
>>  VERSION="${TYPE} ${RELEASE}"
>>
>> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>>  SYSDIR=$(dirname $0)/..
>>  fi
>>
>> -if [ -n "${PARAMFILE}" ]; then
>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
>> $3}' \
>> -   ${PARAMFILE})
>> -else
>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
>> $3}' \
>> -   ${SYSDIR}/sys/param.h)
>> -fi
>> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
>> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>>
>> -b=share/examples/etc/bsd-style-copyright
>>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
>> year=$(sed -Ee '/^Copyright .* The FreeBSD
>> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>>  else
>> year=$(date +%Y)
>>  fi
>>  # look for copyright template
>> +b=share/examples/etc/bsd-style-copyright
>>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>>  do
>> if [ -r "$bsd_copyright" ]; then
>> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>>
>>  # VARS_ONLY means no files should be generated, this is just being
>>  # included.
>> -if [ -n "$VARS_ONLY" ]; then
>> -   return 0
>> -fi
>> +[ -n "$VARS_ONLY" ] && return 0
>>
>>  LC_ALL=C; export LC_ALL
>>  if [ ! -r version ]
>> ___
>> svn-src-h...@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Chris Rees

On 2019-04-08 08:57, Oliver Pinter wrote:

On Monday, April 8, 2019, Warner Losh  wrote:




On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 


wrote:


Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.



You are going to need to be a lot more specific about this. It makes 
no
sense to me at all how any of this could break that. The code is 
identical

logically and produces the same result.



Now I double checked, it may work, but I remembered to this "black 
magic" :

https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile



Given it will evaluate to

BRANCH=${BRANCH_OVERRIDE:-CURRENT}

which unless you set BRANCH_OVERRIDE, then it will still work no 
problem.


Chris

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Oliver Pinter
Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.

On Sunday, April 7, 2019, Warner Losh  wrote:

> Author: imp
> Date: Sun Apr  7 18:39:55 2019
> New Revision: 346018
> URL: https://svnweb.freebsd.org/changeset/base/346018
>
> Log:
>   Use default shell assignment rather more complicated if then
>   construct.
>
>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
> feedback)
>   Differential Revision: https://reviews.freebsd.org/D19797
>
> Modified:
>   head/sys/conf/newvers.sh
>
> Modified: head/sys/conf/newvers.sh
> 
> ==
> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
> @@ -46,10 +46,7 @@
>
>  TYPE="FreeBSD"
>  REVISION="13.0"
> -BRANCH="CURRENT"
> -if [ -n "${BRANCH_OVERRIDE}" ]; then
> -   BRANCH=${BRANCH_OVERRIDE}
> -fi
> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>  RELEASE="${REVISION}-${BRANCH}"
>  VERSION="${TYPE} ${RELEASE}"
>
> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>  SYSDIR=$(dirname $0)/..
>  fi
>
> -if [ -n "${PARAMFILE}" ]; then
> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
> $3}' \
> -   ${PARAMFILE})
> -else
> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
> $3}' \
> -   ${SYSDIR}/sys/param.h)
> -fi
> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>
> -b=share/examples/etc/bsd-style-copyright
>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
> year=$(sed -Ee '/^Copyright .* The FreeBSD
> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>  else
> year=$(date +%Y)
>  fi
>  # look for copyright template
> +b=share/examples/etc/bsd-style-copyright
>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>  do
> if [ -r "$bsd_copyright" ]; then
> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>
>  # VARS_ONLY means no files should be generated, this is just being
>  # included.
> -if [ -n "$VARS_ONLY" ]; then
> -   return 0
> -fi
> +[ -n "$VARS_ONLY" ] && return 0
>
>  LC_ALL=C; export LC_ALL
>  if [ ! -r version ]
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346018 - head/sys/conf

2019-09-03 Thread Warner Losh
Author: imp
Date: Sun Apr  7 18:39:55 2019
New Revision: 346018
URL: https://svnweb.freebsd.org/changeset/base/346018

Log:
  Use default shell assignment rather more complicated if then
  construct.
  
  Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback)
  Differential Revision: https://reviews.freebsd.org/D19797

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==
--- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
+++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
@@ -46,10 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="13.0"
-BRANCH="CURRENT"
-if [ -n "${BRANCH_OVERRIDE}" ]; then
-   BRANCH=${BRANCH_OVERRIDE}
-fi
+BRANCH=${BRANCH_OVERRIDE:-CURRENT}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 
@@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
 SYSDIR=$(dirname $0)/..
 fi
 
-if [ -n "${PARAMFILE}" ]; then
-   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-   ${PARAMFILE})
-else
-   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-   ${SYSDIR}/sys/param.h)
-fi
+RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
+ ${PARAMFILE:-${SYSDIR}/sys/param.h})
 
-b=share/examples/etc/bsd-style-copyright
 if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
year=$(sed -Ee '/^Copyright .* The FreeBSD 
Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
 else
year=$(date +%Y)
 fi
 # look for copyright template
+b=share/examples/etc/bsd-style-copyright
 for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
 do
if [ -r "$bsd_copyright" ]; then
@@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
 
 # VARS_ONLY means no files should be generated, this is just being
 # included.
-if [ -n "$VARS_ONLY" ]; then
-   return 0
-fi
+[ -n "$VARS_ONLY" ] && return 0
 
 LC_ALL=C; export LC_ALL
 if [ ! -r version ]


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Warner Losh
On Mon, Apr 8, 2019, 2:35 AM Chris Rees  wrote:

> On 2019-04-08 08:57, Oliver Pinter wrote:
> > On Monday, April 8, 2019, Warner Losh  wrote:
> >
> >>
> >>
> >> On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter
> >> 
> >> wrote:
> >>
> >>> Please revert this patch. If I'm not wrong, this will break the
> >>> freebsd-version command's generation or output.
> >>>
> >>
> >> You are going to need to be a lot more specific about this. It makes
> >> no
> >> sense to me at all how any of this could break that. The code is
> >> identical
> >> logically and produces the same result.
> >>
> >
> > Now I double checked, it may work, but I remembered to this "black
> > magic" :
> >
> https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile
> >
>
> Given it will evaluate to
>
> BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>
> which unless you set BRANCH_OVERRIDE, then it will still work no
> problem.
>

And if you set that, it will still work. :)

However, this should be converted to VARS_ONLY. I'll do that. I've already
done and, so will now grep the whole tree for similar constructs.

Warner

Chris
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-09-03 Thread Oliver Pinter
On Monday, April 8, 2019, Warner Losh  wrote:

>
>
> On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 
> wrote:
>
>> Please revert this patch. If I'm not wrong, this will break the
>> freebsd-version command's generation or output.
>>
>
> You are going to need to be a lot more specific about this. It makes no
> sense to me at all how any of this could break that. The code is identical
> logically and produces the same result.
>

Now I double checked, it may work, but I remembered to this "black magic" :
https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile


>
> Warner
>
>
> On Sunday, April 7, 2019, Warner Losh  wrote:
>>
>>> Author: imp
>>> Date: Sun Apr  7 18:39:55 2019
>>> New Revision: 346018
>>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>>
>>> Log:
>>>   Use default shell assignment rather more complicated if then
>>>   construct.
>>>
>>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>>> feedback)
>>>   Differential Revision: https://reviews.freebsd.org/D19797
>>>
>>> Modified:
>>>   head/sys/conf/newvers.sh
>>>
>>> Modified: head/sys/conf/newvers.sh
>>> 
>>> ==
>>> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
>>> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
>>> @@ -46,10 +46,7 @@
>>>
>>>  TYPE="FreeBSD"
>>>  REVISION="13.0"
>>> -BRANCH="CURRENT"
>>> -if [ -n "${BRANCH_OVERRIDE}" ]; then
>>> -   BRANCH=${BRANCH_OVERRIDE}
>>> -fi
>>> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>>>  RELEASE="${REVISION}-${BRANCH}"
>>>  VERSION="${TYPE} ${RELEASE}"
>>>
>>> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>>>  SYSDIR=$(dirname $0)/..
>>>  fi
>>>
>>> -if [ -n "${PARAMFILE}" ]; then
>>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -   ${PARAMFILE})
>>> -else
>>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -   ${SYSDIR}/sys/param.h)
>>> -fi
>>> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
>>> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>>>
>>> -b=share/examples/etc/bsd-style-copyright
>>>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
>>> year=$(sed -Ee '/^Copyright .* The FreeBSD
>>> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>>>  else
>>> year=$(date +%Y)
>>>  fi
>>>  # look for copyright template
>>> +b=share/examples/etc/bsd-style-copyright
>>>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>>>  do
>>> if [ -r "$bsd_copyright" ]; then
>>> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>>>
>>>  # VARS_ONLY means no files should be generated, this is just being
>>>  # included.
>>> -if [ -n "$VARS_ONLY" ]; then
>>> -   return 0
>>> -fi
>>> +[ -n "$VARS_ONLY" ] && return 0
>>>
>>>  LC_ALL=C; export LC_ALL
>>>  if [ ! -r version ]
>>> ___
>>> svn-src-h...@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>>
>>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-08 Thread Warner Losh
On Mon, Apr 8, 2019, 2:35 AM Chris Rees  wrote:

> On 2019-04-08 08:57, Oliver Pinter wrote:
> > On Monday, April 8, 2019, Warner Losh  wrote:
> >
> >>
> >>
> >> On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter
> >> 
> >> wrote:
> >>
> >>> Please revert this patch. If I'm not wrong, this will break the
> >>> freebsd-version command's generation or output.
> >>>
> >>
> >> You are going to need to be a lot more specific about this. It makes
> >> no
> >> sense to me at all how any of this could break that. The code is
> >> identical
> >> logically and produces the same result.
> >>
> >
> > Now I double checked, it may work, but I remembered to this "black
> > magic" :
> >
> https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile
> >
>
> Given it will evaluate to
>
> BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>
> which unless you set BRANCH_OVERRIDE, then it will still work no
> problem.
>

And if you set that, it will still work. :)

However, this should be converted to VARS_ONLY. I'll do that. I've already
done and, so will now grep the whole tree for similar constructs.

Warner

Chris
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-08 Thread Chris Rees

On 2019-04-08 08:57, Oliver Pinter wrote:

On Monday, April 8, 2019, Warner Losh  wrote:




On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 


wrote:


Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.



You are going to need to be a lot more specific about this. It makes 
no
sense to me at all how any of this could break that. The code is 
identical

logically and produces the same result.



Now I double checked, it may work, but I remembered to this "black 
magic" :

https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile



Given it will evaluate to

BRANCH=${BRANCH_OVERRIDE:-CURRENT}

which unless you set BRANCH_OVERRIDE, then it will still work no 
problem.


Chris

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-08 Thread Oliver Pinter
On Monday, April 8, 2019, Warner Losh  wrote:

>
>
> On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 
> wrote:
>
>> Please revert this patch. If I'm not wrong, this will break the
>> freebsd-version command's generation or output.
>>
>
> You are going to need to be a lot more specific about this. It makes no
> sense to me at all how any of this could break that. The code is identical
> logically and produces the same result.
>

Now I double checked, it may work, but I remembered to this "black magic" :
https://github.com/freebsd/freebsd/blob/master/bin/freebsd-version/Makefile


>
> Warner
>
>
> On Sunday, April 7, 2019, Warner Losh  wrote:
>>
>>> Author: imp
>>> Date: Sun Apr  7 18:39:55 2019
>>> New Revision: 346018
>>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>>
>>> Log:
>>>   Use default shell assignment rather more complicated if then
>>>   construct.
>>>
>>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>>> feedback)
>>>   Differential Revision: https://reviews.freebsd.org/D19797
>>>
>>> Modified:
>>>   head/sys/conf/newvers.sh
>>>
>>> Modified: head/sys/conf/newvers.sh
>>> 
>>> ==
>>> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
>>> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
>>> @@ -46,10 +46,7 @@
>>>
>>>  TYPE="FreeBSD"
>>>  REVISION="13.0"
>>> -BRANCH="CURRENT"
>>> -if [ -n "${BRANCH_OVERRIDE}" ]; then
>>> -   BRANCH=${BRANCH_OVERRIDE}
>>> -fi
>>> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>>>  RELEASE="${REVISION}-${BRANCH}"
>>>  VERSION="${TYPE} ${RELEASE}"
>>>
>>> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>>>  SYSDIR=$(dirname $0)/..
>>>  fi
>>>
>>> -if [ -n "${PARAMFILE}" ]; then
>>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -   ${PARAMFILE})
>>> -else
>>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/
>>> {print $3}' \
>>> -   ${SYSDIR}/sys/param.h)
>>> -fi
>>> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
>>> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>>>
>>> -b=share/examples/etc/bsd-style-copyright
>>>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
>>> year=$(sed -Ee '/^Copyright .* The FreeBSD
>>> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>>>  else
>>> year=$(date +%Y)
>>>  fi
>>>  # look for copyright template
>>> +b=share/examples/etc/bsd-style-copyright
>>>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>>>  do
>>> if [ -r "$bsd_copyright" ]; then
>>> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>>>
>>>  # VARS_ONLY means no files should be generated, this is just being
>>>  # included.
>>> -if [ -n "$VARS_ONLY" ]; then
>>> -   return 0
>>> -fi
>>> +[ -n "$VARS_ONLY" ] && return 0
>>>
>>>  LC_ALL=C; export LC_ALL
>>>  if [ ! -r version ]
>>> ___
>>> svn-src-h...@freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>>
>>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-07 Thread Warner Losh
On Sun, Apr 7, 2019, 3:16 PM Oliver Pinter 
wrote:

> Please revert this patch. If I'm not wrong, this will break the
> freebsd-version command's generation or output.
>

You are going to need to be a lot more specific about this. It makes no
sense to me at all how any of this could break that. The code is identical
logically and produces the same result.

Warner


On Sunday, April 7, 2019, Warner Losh  wrote:
>
>> Author: imp
>> Date: Sun Apr  7 18:39:55 2019
>> New Revision: 346018
>> URL: https://svnweb.freebsd.org/changeset/base/346018
>>
>> Log:
>>   Use default shell assignment rather more complicated if then
>>   construct.
>>
>>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
>> feedback)
>>   Differential Revision: https://reviews.freebsd.org/D19797
>>
>> Modified:
>>   head/sys/conf/newvers.sh
>>
>> Modified: head/sys/conf/newvers.sh
>>
>> ==
>> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
>> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
>> @@ -46,10 +46,7 @@
>>
>>  TYPE="FreeBSD"
>>  REVISION="13.0"
>> -BRANCH="CURRENT"
>> -if [ -n "${BRANCH_OVERRIDE}" ]; then
>> -   BRANCH=${BRANCH_OVERRIDE}
>> -fi
>> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>>  RELEASE="${REVISION}-${BRANCH}"
>>  VERSION="${TYPE} ${RELEASE}"
>>
>> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>>  SYSDIR=$(dirname $0)/..
>>  fi
>>
>> -if [ -n "${PARAMFILE}" ]; then
>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
>> $3}' \
>> -   ${PARAMFILE})
>> -else
>> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
>> $3}' \
>> -   ${SYSDIR}/sys/param.h)
>> -fi
>> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
>> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>>
>> -b=share/examples/etc/bsd-style-copyright
>>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
>> year=$(sed -Ee '/^Copyright .* The FreeBSD
>> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>>  else
>> year=$(date +%Y)
>>  fi
>>  # look for copyright template
>> +b=share/examples/etc/bsd-style-copyright
>>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>>  do
>> if [ -r "$bsd_copyright" ]; then
>> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>>
>>  # VARS_ONLY means no files should be generated, this is just being
>>  # included.
>> -if [ -n "$VARS_ONLY" ]; then
>> -   return 0
>> -fi
>> +[ -n "$VARS_ONLY" ] && return 0
>>
>>  LC_ALL=C; export LC_ALL
>>  if [ ! -r version ]
>> ___
>> svn-src-h...@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r346018 - head/sys/conf

2019-04-07 Thread Oliver Pinter
Please revert this patch. If I'm not wrong, this will break the
freebsd-version command's generation or output.

On Sunday, April 7, 2019, Warner Losh  wrote:

> Author: imp
> Date: Sun Apr  7 18:39:55 2019
> New Revision: 346018
> URL: https://svnweb.freebsd.org/changeset/base/346018
>
> Log:
>   Use default shell assignment rather more complicated if then
>   construct.
>
>   Discussed with: emaste@, allanjude@ (changes (or not) based on their
> feedback)
>   Differential Revision: https://reviews.freebsd.org/D19797
>
> Modified:
>   head/sys/conf/newvers.sh
>
> Modified: head/sys/conf/newvers.sh
> 
> ==
> --- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
> +++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
> @@ -46,10 +46,7 @@
>
>  TYPE="FreeBSD"
>  REVISION="13.0"
> -BRANCH="CURRENT"
> -if [ -n "${BRANCH_OVERRIDE}" ]; then
> -   BRANCH=${BRANCH_OVERRIDE}
> -fi
> +BRANCH=${BRANCH_OVERRIDE:-CURRENT}
>  RELEASE="${REVISION}-${BRANCH}"
>  VERSION="${TYPE} ${RELEASE}"
>
> @@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
>  SYSDIR=$(dirname $0)/..
>  fi
>
> -if [ -n "${PARAMFILE}" ]; then
> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
> $3}' \
> -   ${PARAMFILE})
> -else
> -   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print
> $3}' \
> -   ${SYSDIR}/sys/param.h)
> -fi
> +RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
> + ${PARAMFILE:-${SYSDIR}/sys/param.h})
>
> -b=share/examples/etc/bsd-style-copyright
>  if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
> year=$(sed -Ee '/^Copyright .* The FreeBSD
> Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
>  else
> year=$(date +%Y)
>  fi
>  # look for copyright template
> +b=share/examples/etc/bsd-style-copyright
>  for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
>  do
> if [ -r "$bsd_copyright" ]; then
> @@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
>
>  # VARS_ONLY means no files should be generated, this is just being
>  # included.
> -if [ -n "$VARS_ONLY" ]; then
> -   return 0
> -fi
> +[ -n "$VARS_ONLY" ] && return 0
>
>  LC_ALL=C; export LC_ALL
>  if [ ! -r version ]
> ___
> svn-src-h...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r346018 - head/sys/conf

2019-04-07 Thread Warner Losh
Author: imp
Date: Sun Apr  7 18:39:55 2019
New Revision: 346018
URL: https://svnweb.freebsd.org/changeset/base/346018

Log:
  Use default shell assignment rather more complicated if then
  construct.
  
  Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback)
  Differential Revision: https://reviews.freebsd.org/D19797

Modified:
  head/sys/conf/newvers.sh

Modified: head/sys/conf/newvers.sh
==
--- head/sys/conf/newvers.shSun Apr  7 18:31:45 2019(r346017)
+++ head/sys/conf/newvers.shSun Apr  7 18:39:55 2019(r346018)
@@ -46,10 +46,7 @@
 
 TYPE="FreeBSD"
 REVISION="13.0"
-BRANCH="CURRENT"
-if [ -n "${BRANCH_OVERRIDE}" ]; then
-   BRANCH=${BRANCH_OVERRIDE}
-fi
+BRANCH=${BRANCH_OVERRIDE:-CURRENT}
 RELEASE="${REVISION}-${BRANCH}"
 VERSION="${TYPE} ${RELEASE}"
 
@@ -108,21 +105,16 @@ if [ -z "${SYSDIR}" ]; then
 SYSDIR=$(dirname $0)/..
 fi
 
-if [ -n "${PARAMFILE}" ]; then
-   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-   ${PARAMFILE})
-else
-   RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
-   ${SYSDIR}/sys/param.h)
-fi
+RELDATE=$(awk '/__FreeBSD_version.*propagated to newvers/ {print $3}' \
+ ${PARAMFILE:-${SYSDIR}/sys/param.h})
 
-b=share/examples/etc/bsd-style-copyright
 if [ -r "${SYSDIR}/../COPYRIGHT" ]; then
year=$(sed -Ee '/^Copyright .* The FreeBSD 
Project/!d;s/^.*1992-([0-9]*) .*$/\1/g' ${SYSDIR}/../COPYRIGHT)
 else
year=$(date +%Y)
 fi
 # look for copyright template
+b=share/examples/etc/bsd-style-copyright
 for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
 do
if [ -r "$bsd_copyright" ]; then
@@ -150,9 +142,7 @@ COPYRIGHT="$COPYRIGHT
 
 # VARS_ONLY means no files should be generated, this is just being
 # included.
-if [ -n "$VARS_ONLY" ]; then
-   return 0
-fi
+[ -n "$VARS_ONLY" ] && return 0
 
 LC_ALL=C; export LC_ALL
 if [ ! -r version ]
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"