Re: svn commit: r343152 - head/usr.sbin/freebsd-update

2019-01-18 Thread Rodney W. Grimes
> On Fri, 18 Jan 2019 at 12:51, Rodney W. Grimes
>  wrote:
> >
> > Since your in here fixing... there is a false positive on the
> > detection of what is installed when we zero the size of a set,
> > ie, now that doc.txz is a 0 size set it always thinks you have
> > doc installed due to rounding errors in the calculation that
> > says you have x% of this installed.
> 
> Hi Rod, I'm not sure exactly what you mean here - could you clarify,
> or create a PR with the details?

During the 12.0 release cycle the doc.txz part of the system
went away, we put up an empty tar ball, when freebsd-update
evaluates if you have installed this component it says
you have, even though you have not.

This is caused by function:
upgrade_guess_components () {

when it does this:
join -t ' ' -1 2 -2 2 compfreq.present compfreq.total |
while read S P T; do
if [ ${P} -gt `expr ${T} / 2` ]; then
echo ${S}
fi
done > comp.present

When expr ${T} the count of items in the set is 0 all things
are -gt 0 and so it says the component is present.  This is
an incorrect false positive.

> 
> 

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@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"


Re: svn commit: r343152 - head/usr.sbin/freebsd-update

2019-01-18 Thread Ed Maste
On Fri, 18 Jan 2019 at 12:51, Rodney W. Grimes
 wrote:
>
> Since your in here fixing... there is a false positive on the
> detection of what is installed when we zero the size of a set,
> ie, now that doc.txz is a 0 size set it always thinks you have
> doc installed due to rounding errors in the calculation that
> says you have x% of this installed.

Hi Rod, I'm not sure exactly what you mean here - could you clarify,
or create a PR with the details?
___
svn-src-head@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"


Re: svn commit: r343152 - head/usr.sbin/freebsd-update

2019-01-18 Thread Rodney W. Grimes
> Author: emaste
> Date: Fri Jan 18 17:41:45 2019
> New Revision: 343152
> URL: https://svnweb.freebsd.org/changeset/base/343152
> 
> Log:
>   freebsd-update: Use BASEDIR when checking for src component
>   
>   src could potentially be installed under the based dir
>   and not under the root or vice versa.
>   
>   PR: 224048
>   Submitted by:   Gerald Aryeetey 
>   Reviewed by:delphij
>   MFC after:  1 month
>   Sponsored by:   The FreeBSD Foundation
>   Differential Revision:  https://reviews.freebsd.org/D18849
> 
> 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.shFri Jan 18 16:04:36 
> 2019(r343151)
> +++ head/usr.sbin/freebsd-update/freebsd-update.shFri Jan 18 17:41:45 
> 2019(r343152)
> @@ -221,7 +221,7 @@ config_KeepModifiedMetadata () {
>  config_Components () {
>   for C in $@; do
>   if [ "$C" = "src" ]; then
> - if [ -e /usr/src/COPYRIGHT ]; then
> + if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then
>   COMPONENTS="${COMPONENTS} ${C}"
>   else
>   echo "src component not installed, skipped"
> 

Since your in here fixing... there is a false positive on the
detection of what is installed when we zero the size of a set,
ie, now that doc.txz is a 0 size set it always thinks you have
doc installed due to rounding errors in the calculation that
says you have x% of this installed.

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@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 commit: r343152 - head/usr.sbin/freebsd-update

2019-01-18 Thread Ed Maste
Author: emaste
Date: Fri Jan 18 17:41:45 2019
New Revision: 343152
URL: https://svnweb.freebsd.org/changeset/base/343152

Log:
  freebsd-update: Use BASEDIR when checking for src component
  
  src could potentially be installed under the based dir
  and not under the root or vice versa.
  
  PR:   224048
  Submitted by: Gerald Aryeetey 
  Reviewed by:  delphij
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D18849

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  Fri Jan 18 16:04:36 
2019(r343151)
+++ head/usr.sbin/freebsd-update/freebsd-update.sh  Fri Jan 18 17:41:45 
2019(r343152)
@@ -221,7 +221,7 @@ config_KeepModifiedMetadata () {
 config_Components () {
for C in $@; do
if [ "$C" = "src" ]; then
-   if [ -e /usr/src/COPYRIGHT ]; then
+   if [ -e "${BASEDIR}/usr/src/COPYRIGHT" ]; then
COMPONENTS="${COMPONENTS} ${C}"
else
echo "src component not installed, skipped"
___
svn-src-head@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"