* [PATCH 0/1] diskspace monitor: assign a default value when only of the interval is set
@ 2012-04-05 12:58 Robert Yang
2012-04-05 12:58 ` [PATCH 1/1] " Robert Yang
2012-04-10 23:02 ` [PATCH 0/1] " Richard Purdie
0 siblings, 2 replies; 3+ messages in thread
From: Robert Yang @ 2012-04-05 12:58 UTC (permalink / raw)
To: bitbake-devel
The following changes since commit 5607729d9901c394b7cd4db6e38fe7fb19116f39:
self-hosted-image: Increase space for build and allow builder user sudo access (2012-04-04 17:17:55 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib robert/monitor
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/monitor
Robert Yang (1):
diskspace monitor: assign a default value when only of the interval
is set
bitbake/lib/bb/monitordisk.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/1] diskspace monitor: assign a default value when only of the interval is set
2012-04-05 12:58 [PATCH 0/1] diskspace monitor: assign a default value when only of the interval is set Robert Yang
@ 2012-04-05 12:58 ` Robert Yang
2012-04-10 23:02 ` [PATCH 0/1] " Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Robert Yang @ 2012-04-05 12:58 UTC (permalink / raw)
To: bitbake-devel
Assign a default value to the other one when either disk space interval
or amount of inodes interval value is set for example:
BB_DISKMON_WARNINTERVAL = "50M,"
or
BB_DISKMON_WARNINTERVAL = ",5K"
The diskspace monitor would not enable in the past, that seemed
unreasonable, assign a default value to the other one currently, so the
monitor will be enabled, and will warn both of diskspace and free
amount of inode if they have been set in BB_DISKMON_DIRS.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
bitbake/lib/bb/monitordisk.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/bitbake/lib/bb/monitordisk.py b/bitbake/lib/bb/monitordisk.py
index 9baba5e..9469193 100644
--- a/bitbake/lib/bb/monitordisk.py
+++ b/bitbake/lib/bb/monitordisk.py
@@ -136,10 +136,13 @@ def getInterval(configuration):
""" Get the disk space interval """
+ # The default value is 50M and 5K.
+ spaceDefault = 50 * 1024 * 1024
+ inodeDefault = 5 * 1024
+
interval = configuration.getVar("BB_DISKMON_WARNINTERVAL", True)
if not interval:
- # The default value is 50M and 5K.
- return 50 * 1024 * 1024, 5 * 1024
+ return spaceDefault, inodeDefault
else:
# The disk space or inode interval is optional, but it should
# have a correct value once it is specified
@@ -151,12 +154,16 @@ def getInterval(configuration):
if not intervalSpace:
printErr("Invalid disk space interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(1))
return None, None
+ else:
+ intervalSpace = spaceDefault
intervalInode = intervalRe.group(2)
if intervalInode:
intervalInode = convertGMK(intervalInode)
if not intervalInode:
printErr("Invalid disk inode interval value in BB_DISKMON_WARNINTERVAL: %s" % intervalRe.group(2))
return None, None
+ else:
+ intervalInode = inodeDefault
return intervalSpace, intervalInode
else:
printErr("Invalid interval value in BB_DISKMON_WARNINTERVAL: %s" % interval)
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 0/1] diskspace monitor: assign a default value when only of the interval is set
2012-04-05 12:58 [PATCH 0/1] diskspace monitor: assign a default value when only of the interval is set Robert Yang
2012-04-05 12:58 ` [PATCH 1/1] " Robert Yang
@ 2012-04-10 23:02 ` Richard Purdie
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2012-04-10 23:02 UTC (permalink / raw)
To: Robert Yang; +Cc: bitbake-devel
On Thu, 2012-04-05 at 20:58 +0800, Robert Yang wrote:
> The following changes since commit 5607729d9901c394b7cd4db6e38fe7fb19116f39:
>
> self-hosted-image: Increase space for build and allow builder user sudo access (2012-04-04 17:17:55 +0100)
>
> are available in the git repository at:
> git://git.pokylinux.org/poky-contrib robert/monitor
> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/monitor
>
> Robert Yang (1):
> diskspace monitor: assign a default value when only of the interval
> is set
Merged to master, thanks.
Richard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-10 23:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-05 12:58 [PATCH 0/1] diskspace monitor: assign a default value when only of the interval is set Robert Yang
2012-04-05 12:58 ` [PATCH 1/1] " Robert Yang
2012-04-10 23:02 ` [PATCH 0/1] " Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.