From: Saul Wold <sgw@linux.intel.com>
To: Martin Jansa <martin.jansa@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 5/9] sstate-cache-management.sh: add option to enable debug output
Date: Tue, 04 Sep 2012 07:53:56 -0700 [thread overview]
Message-ID: <50461604.6090500@linux.intel.com> (raw)
In-Reply-To: <78656451c17d66cb405fd5d12248ce311d0bce8e.1346684630.git.Martin.Jansa@gmail.com>
On 09/03/2012 08:05 AM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> ---
> scripts/sstate-cache-management.sh | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/scripts/sstate-cache-management.sh b/scripts/sstate-cache-management.sh
> index 491df5f..0cfff77 100755
> --- a/scripts/sstate-cache-management.sh
> +++ b/scripts/sstate-cache-management.sh
> @@ -22,6 +22,7 @@ confirm=
> fsym=
> total_deleted=0
> verbose=
> +debug=0
>
> usage () {
> cat << EOF
> @@ -69,6 +70,9 @@ Options:
> -v, --verbose
> explain what is being done
>
> + -d, --debug
> + show debug info, repeat for more debug info
> +
> EOF
> }
>
> @@ -215,13 +219,16 @@ remove_duplicated () {
> for arch in $ava_archs; do
> grep -h "/$fn-$arch-" $list_suffix >>$fn_tmp
> done
> + [ $debug -gt 1 ] && echo "Available files for $fn with suffix $suffix:" && cat $fn_tmp
> # Use the modification time
> to_del=$(ls -t $(cat $fn_tmp) | sed -n '1!p')
> + [ $debug -gt 2 ] && echo "Considering to delete: $to_del"
> # The sstate file which is downloaded from the SSTATE_MIRROR is
> # put in SSTATE_DIR, and there is a symlink in SSTATE_DIR/??/ to
> # it, so filter it out from the remove list if it should not be
> # removed.
> to_keep=$(ls -t $(cat $fn_tmp) | sed -n '1p')
> + [ $debug -gt 2 ] && echo "Considering to keep: $to_keep"
> for k in $to_keep; do
> if [ -L "$k" ]; then
> # The symlink's destination
> @@ -235,9 +242,11 @@ remove_duplicated () {
> fi
> done
> rm -f $fn_tmp
> + [ $debug -gt 2 ] && echo "Decided to delete: $to_del"
> gen_rmlist $rm_list "$to_del"
> done
> [ ! -s "$rm_list" ] || deleted=`cat $rm_list | wc -l`
> + [ -s "$rm_list" -a $debug -gt 0 ] && cat $rm_list
> echo "($deleted files will be removed)"
> let total_deleted=$total_deleted+$deleted
> done
> @@ -306,6 +315,7 @@ rm_by_stamps (){
> gen_rmlist $rm_list "$to_del"
> let total_deleted=(`cat $rm_list | wc -w`)
> if [ $total_deleted -gt 0 ]; then
> + [ $debug -gt 0 ] && cat $rm_list
> read_confirm
> if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then
> echo "Removing sstate cache files ... ($total_deleted files)"
> @@ -374,6 +384,11 @@ while [ -n "$1" ]; do
> verbose="-v"
> shift
> ;;
> + --debug)
> + debug=`expr $debug + 1`
> + echo "Debug level $debug"
> + shift
> + ;;
> --help|-h)
> usage
> exit 0
>
Merged into OE-Core
Thanks
Sau!
next prev parent reply other threads:[~2012-09-04 15:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-02 11:13 [PATCH 0/4] sstate-cache-management.sh fixes [YOCTO #2897] Martin Jansa
2012-09-02 11:13 ` [PATCH 1/4] sstate-cache-management.sh: fix regexp in checksum grep Martin Jansa
2012-09-02 11:13 ` [PATCH 2/4] sstate-cache-management.sh: fix regexp in AVAILTUNES grep Martin Jansa
2012-09-02 11:13 ` [PATCH 3/4] sstate-cache-management.sh: look in meta* above oe-core dir when looking for available tunes Martin Jansa
2012-09-02 12:07 ` Paul Eggleton
2012-09-03 7:23 ` Martin Jansa
2012-09-03 7:49 ` Paul Eggleton
2012-09-02 11:13 ` [PATCH 4/4] sstate-cache-management.sh: don't hardcode available machines only to qemu* Martin Jansa
[not found] ` <cover.1346684630.git.Martin.Jansa@gmail.com>
2012-09-03 15:05 ` [PATCH 5/9] sstate-cache-management.sh: add option to enable debug output Martin Jansa
2012-09-04 14:53 ` Saul Wold [this message]
2012-09-03 15:05 ` [PATCH 6/9] sstate-cache-management.sh: fix remove_duplicated when multiple archs were built Martin Jansa
2012-09-04 12:42 ` [PATCH 0/4] sstate-cache-management.sh fixes [YOCTO #2897] Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50461604.6090500@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox