Peter Palmer | 23 Feb 2012 23:19

SBU report

Hi,

here a tiny fist patch (from myself) to fix the SBU report that wasn't
running (current jhalfs svn and CLFS-1.2). I'm new to lfs/jhalfs
development so I hope the format and everything is right and usable.

Schedule of changes:

1. Variables needed initailising as perl was tipping over trying to
substract without that, i.e.:
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`

2. The other change affects the selection of the very first entry of
the $LOGS directory. In CLFS this was a script that run in fractions
of a second... SBU is supposed to be based on the compilation time of
binutils though.

Any feedback appreciated.

Cheers,

Peter

#################################################
diff --git a/common/create-sbu_du-report.sh b/common/create-sbu_du-report.sh
index 115d95d..24ed5a6 100755
--- a/common/create-sbu_du-report.sh
+++ b/common/create-sbu_du-report.sh
 <at>  <at>  -5,7 +5,8  <at>  <at>  set -e

(Continue reading)

Thomas Pegg | 24 Feb 2012 03:26
Picon

Re: SBU report


On Feb 23, 2012, at 5:19 PM, Peter Palmer wrote:

> Hi,
> 
> here a tiny fist patch (from myself) to fix the SBU report that wasn't
> running (current jhalfs svn and CLFS-1.2). I'm new to lfs/jhalfs
> development so I hope the format and everything is right and usable.
> 
> Schedule of changes:
> 
> 1. Variables needed initailising as perl was tipping over trying to
> substract without that, i.e.:
> INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
> 
> 2. The other change affects the selection of the very first entry of
> the $LOGS directory. In CLFS this was a script that run in fractions
> of a second... SBU is supposed to be based on the compilation time of
> binutils though.
> 
> Any feedback appreciated.

The patch itself looks okay to me, but I am curious as to what errors you are seeing, especially in relation to
your #1.

Thomas

--

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
(Continue reading)

Pierre Labastie | 24 Feb 2012 14:09
Picon

Re: SBU report

Le 23/02/2012 23:19, Peter Palmer a écrit :
> Hi,
>
> here a tiny fist patch (from myself) to fix the SBU report that wasn't
> running (current jhalfs svn and CLFS-1.2). I'm new to lfs/jhalfs
> development so I hope the format and everything is right and usable.
>
> Schedule of changes:
>
> 1. Variables needed initailising as perl was tipping over trying to
> substract without that, i.e.:
> INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
>
> 2. The other change affects the selection of the very first entry of
> the $LOGS directory. In CLFS this was a script that run in fractions
> of a second... SBU is supposed to be based on the compilation time of
> binutils though.
>
I think both issues are related: if binutils is the first entry in the logs
directory, it gives BASELOG="xxx-binutils". Then the construct:
   if [ "$log" != "$BASELOG" ] ; then
     INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
   [...]
   fi
avoids to use non initialized DU1PREV.

Of course, in the case of CLFS, the first entry is not binutils
and all gets wrong.
Now, your patch implies that the installed file usage is not printed
for the script preceding binutils, and that grand total is
(Continue reading)

Pierre Labastie | 24 Feb 2012 14:13
Picon

Re: SBU report

Le 23/02/2012 23:19, Peter Palmer a écrit :
> Hi,
>
> here a tiny fist patch (from myself) to fix the SBU report that wasn't
> running (current jhalfs svn and CLFS-1.2). I'm new to lfs/jhalfs
BTW,

I have seen that CLFS is now on git. Have you tried
to replace svn instructions by "equivalent" git ones
in jhalfs? I do not know much about git, but I know
rather well jhalfs, so if I may be of some help...

Regards
Pierre

--

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Peter Palmer | 24 Feb 2012 15:46

Re: SBU report

On 24 February 2012 13:13, Pierre Labastie <pierre.labastie <at> neuf.fr> wrote:
> Le 23/02/2012 23:19, Peter Palmer a écrit :
>> Hi,
>>
>> here a tiny fist patch (from myself) to fix the SBU report that wasn't
>> running (current jhalfs svn and CLFS-1.2). I'm new to lfs/jhalfs
> BTW,
>
> I have seen that CLFS is now on git. Have you tried
> to replace svn instructions by "equivalent" git ones
> in jhalfs? I do not know much about git, but I know
> rather well jhalfs, so if I may be of some help...

First thanks to Thomas for giving me an early pointer to the problem I
introduced.

I was just working on another patch but Pierre beat me to it. I don't
bother posting as the only difference is the name for the new variable
:)

I never worked with svn as vcs so I use git locally to work with
jhalfs. I've got one branch that I keep in sync with the svn trunk.
Branching is very easy in git so I create a branch for whatever
project I work on. To get the diff I just run:

git diff master..tool common/create-sbu_du-report.sh

where 'master' is the name of the svn synced branch and 'tool' the
name of my project one. So if I see there is a new release out before
my patch is finished I just commit the changes to my current branch,
(Continue reading)

Pierre Labastie | 24 Feb 2012 17:45
Picon

Re: SBU report

Le 24/02/2012 15:46, Peter Palmer a écrit :
> On 24 February 2012 13:13, Pierre Labastie<pierre.labastie <at> neuf.fr>  wrote:
>>
>> I have seen that CLFS is now on git. Have you tried
>> to replace svn instructions by "equivalent" git ones
>> in jhalfs? I do not know much about git, but I know
>> rather well jhalfs, so if I may be of some help...
>
> First thanks to Thomas for giving me an early pointer to the problem I
> introduced.
>
> I was just working on another patch but Pierre beat me to it. I don't
> bother posting as the only difference is the name for the new variable
> :)
Sorry for that. I always think it is easier to explain with code...
> I never worked with svn as vcs so I use git locally to work with
> jhalfs. I've got one branch that I keep in sync with the svn trunk.
> Branching is very easy in git so I create a branch for whatever
> project I work on. To get the diff I just run:
>
Just to make sure we understood each other (I am not a native
English speaker), I meant that jhalfs had some instructions to
download on the fly the LFS book from SVN repo. I was not talking
about managing jhalfs mods with GIT. Seeing how the philosophy
of GIT is to have a local "working copy" (+ repo), those download
instructions are maybe not necessary for CLFS.

Since I am also busy with the blfs tools, I think I won't add GIT
download instructions now.

(Continue reading)

Peter Palmer | 24 Feb 2012 20:20

Re: SBU report

On 24 February 2012 16:45, Pierre Labastie <pierre.labastie <at> neuf.fr> wrote:
> Le 24/02/2012 15:46, Peter Palmer a écrit :
>> On 24 February 2012 13:13, Pierre Labastie<pierre.labastie <at> neuf.fr>  wrote:
>>>
>>> I have seen that CLFS is now on git. Have you tried
>>> to replace svn instructions by "equivalent" git ones
>>> in jhalfs? I do not know much about git, but I know
>>> rather well jhalfs, so if I may be of some help...
>>
>> First thanks to Thomas for giving me an early pointer to the problem I
>> introduced.
>>
>> I was just working on another patch but Pierre beat me to it. I don't
>> bother posting as the only difference is the name for the new variable
>> :)
> Sorry for that. I always think it is easier to explain with code...
>> I never worked with svn as vcs so I use git locally to work with
>> jhalfs. I've got one branch that I keep in sync with the svn trunk.
>> Branching is very easy in git so I create a branch for whatever
>> project I work on. To get the diff I just run:
>>
> Just to make sure we understood each other (I am not a native
> English speaker), I meant that jhalfs had some instructions to
> download on the fly the LFS book from SVN repo. I was not talking
> about managing jhalfs mods with GIT. Seeing how the philosophy
> of GIT is to have a local "working copy" (+ repo), those download
> instructions are maybe not necessary for CLFS.
>
> Since I am also busy with the blfs tools, I think I won't add GIT
> download instructions now.
(Continue reading)

Pierre Labastie | 25 Feb 2012 15:11
Picon

Re: SBU report

Le 24/02/2012 20:20, Peter Palmer a écrit :
> On 24 February 2012 16:45, Pierre Labastie<pierre.labastie <at> neuf.fr>  wrote:
>> Le 24/02/2012 15:46, Peter Palmer a écrit :
>>> On 24 February 2012 13:13, Pierre Labastie<pierre.labastie <at> neuf.fr>    wrote:
>>>> I have seen that CLFS is now on git. Have you tried
>>>> to replace svn instructions by "equivalent" git ones
>>>> in jhalfs? I do not know much about git, but I know
>>>> rather well jhalfs, so if I may be of some help...
>>> First thanks to Thomas for giving me an early pointer to the problem I
>>> introduced.
>>>
>>> I was just working on another patch but Pierre beat me to it. I don't
>>> bother posting as the only difference is the name for the new variable
>>> :)
>> Sorry for that. I always think it is easier to explain with code...
>>> I never worked with svn as vcs so I use git locally to work with
>>> jhalfs. I've got one branch that I keep in sync with the svn trunk.
>>> Branching is very easy in git so I create a branch for whatever
>>> project I work on. To get the diff I just run:
>>>
>> Just to make sure we understood each other (I am not a native
>> English speaker), I meant that jhalfs had some instructions to
>> download on the fly the LFS book from SVN repo. I was not talking
>> about managing jhalfs mods with GIT. Seeing how the philosophy
>> of GIT is to have a local "working copy" (+ repo), those download
>> instructions are maybe not necessary for CLFS.
>>
>> Since I am also busy with the blfs tools, I think I won't add GIT
>> download instructions now.
> Pierre, I was on a different planet there. I am here now:
(Continue reading)

Pierre Labastie | 25 Feb 2012 15:38
Picon

Re: SBU report

Le 25/02/2012 15:11, Pierre Labastie a écrit :
>> ./jhalfs:
>> case $PROGNAME in
>> # TODO: clfs is now on git
>> #  clfs* ) declare -r SVN="http://svn.cross-lfs.org/svn/repos" ;;
>>         * ) declare -r SVN="svn://svn.linuxfromscratch.org" ;;
>> esac
>>
>> ~~~~~and here:~~~~~
>>
>> common/libs/func_book_parser:48:
>> svn co $SVN/${svn_root}/${TREE} ${PROGNAME}-$LFSVRS>>$LOGDIR/$LOG 2>&1
>>
>> IMHO for a casual user there is little difference between svn, git or
>> a tarball and the git philosophy doesn't matter.  Personally, even
>> when working on a development branch I would always want to be able to
>> fix a particular version of a book as this makes error hunting a lot
>> easier. However I can see how the svn/git option is a useful feature
>> for some; both for LFS and CLFS (and BLFS of course).
>>
>> I would propose to add something like this though:
>> if [[ -d $SVN ]] ; then
>>     echo --n "You seem to have a working copy of the book already. Do
>> you want to update this to the newest version? (no)"
>>     read ANSWER
>> etc...
>>
>> What do you think?
>>
>> In the mean time I'll have a look at the CLFS/git download.
(Continue reading)

Pierre Labastie | 27 Feb 2012 10:34
Picon

Re: SBU report

Here is a new patch:
The previous one used the wrong binutils log.
Further, I realized that the last 'Installed files disk usage' was not
printed.
I'll commit tomorrow if no comment.

Regards
Pierre

Attachment (sbu-report.patch): text/x-patch, 2137 bytes
--

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page
Peter Palmer | 27 Feb 2012 16:00

Re: SBU report

Ok, tested on a CLFS-1.2 build and it looks good here.

BASELOG picks the first one from these logs what I believe is correct:

/jhalfs/logs$ ll ???-binutils
-rw-r--r-- 1 clfs clfs 257362 Feb 20 10:46 042-binutils
-rw-r--r-- 1 clfs clfs 316082 Feb 20 11:41 054-binutils
-rw-r--r-- 1 root root 328938 Feb 20 13:17 124-binutils

I compared some weird entries for disk usage but in all cases the
problem is coming from the log files rather than from this report.

My apologies, I should have tested your earlier patch too after
bringing the thing up :/

If anyone wants to see the log I'll send it out directly to you.
--

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Pierre Labastie | 28 Feb 2012 14:21
Picon

Re: SBU report

Le 27/02/2012 10:34, Pierre Labastie a écrit :
> Here is a new patch:
> The previous one used the wrong binutils log.
> Further, I realized that the last 'Installed files disk usage' was not
> printed.
> I'll commit tomorrow if no comment.
>
> Regards
> Pierre
>
Committed in rev 3580 (with slight modification of the `du'
command)

Pierre

--

-- 
http://linuxfromscratch.org/mailman/listinfo/alfs-discuss
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page


Gmane