Changeset: be828aafcd33 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=be828aafcd33
Modified Files:
configure.ag
gdk/gdk_posix.c
testing/Mtest.py.in
Branch: Feb2013
Log Message:
Merge with Oct2012 branch.
diffs (133 lines):
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -415,8 +415,12 @@ LINUX_DIST=''
case "$host_os" in
linux*)
dnl Please keep this aligned / in sync with testing/Mtest.py.in !
- AC_MSG_CHECKING(which Linux distribution we're using)
- if test -s /etc/fedora-release ; then
+ AC_MSG_CHECKING(which Linux distribution we're using)
+ if test -s /etc/os-release; then
+ # this is the new way of getting release information
+ # works for Fedora >= 17, Ubuntu >= 12.04 (Precise Pangolin)
+ LINUX_DIST=`source /etc/os-release; echo ${NAME}:${VERSION_ID}`
+ elif test -s /etc/fedora-release ; then
LINUX_DIST="`cat /etc/fedora-release | head -n1 \
| sed 's|^.*\(Fedora\).* release \([[0-9]][[^ \n]]*\)\(
.*\)*$|\1:\2|'`"
elif test -s /etc/centos-release ; then
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -307,7 +307,7 @@ MT_getrss(void)
if (task_info(task, TASK_BASIC_INFO_64, (task_info_t)&t_info,
&t_info_count) != KERN_INVALID_POLICY)
return t_info.resident_size; /* bytes */
#elif defined(HAVE_KVM_H) && defined(HAVE_SYS_SYSCTL_H)
- /* get RSS on FreeBSD */
+ /* get RSS on FreeBSD and NetBSD */
struct kinfo_proc *ki;
int ski = 1;
kvm_t *kd;
@@ -323,7 +323,12 @@ MT_getrss(void)
return 0;
}
+#ifdef __NetBSD__ /* should we use configure for this? */
+ /* see bug 3217 */
+ rss = ki->kp_eproc.e_vm.vm_rssize;
+#else
rss = ki->ki_rssize;
+#endif
kvm_close(kd);
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3142,27 +3142,36 @@ else:
if SYST == "Linux":
# Please keep this aligned / in sync with configure.ag !
LINUX_DIST=''
- if os.path.isfile('/etc/fedora-release'):
+ if os.path.isfile('/etc/os-release'):
+ l = open('/etc/os-release').read()
+ x0 = re.search('^NAME=[\'"]?([^\'"\n]*)[\'"]?$', l, re.MULTILINE)
+ if x0:
+ x0 = x0.group(1)
+ x1 = re.search('^VERSION_ID=[\'"]?([^\'"\n]*)[\'"]?$', l, re.MULTILINE)
+ if x1:
+ x1 = x1.group(1)
+ LINUX_DIST = '%s:%s' % (x0 or 'Linux', x1 or '')
+ elif os.path.isfile('/etc/fedora-release'):
l = open('/etc/fedora-release').readline()
- x = re.compile('^.*(Fedora).* release ([0-9][^ \n]*)( .*)*$').match(l)
+ x = re.match('^.*(Fedora).* release ([0-9][^ \n]*)( .*)*$', l)
if x:
LINUX_DIST = '%s:%s' % (x.group(1),x.group(2))
elif os.path.isfile('/etc/centos-release'):
l = open('/etc/centos-release').readline()
- x = re.compile('^(CentOS).* release ([0-9][^ \n]*)( .*)*$').match(l)
+ x = re.match('^(CentOS).* release ([0-9][^ \n]*)( .*)*$', l)
if x:
LINUX_DIST = '%s:%s' % (x.group(1),x.group(2))
elif os.path.isfile('/etc/yellowdog-release'):
l = open('/etc/yellowdog-release').readline()
- x = re.compile('^(Yellow) Dog Linux release ([0-9][^ \n]*)(
.*)*$').match(l)
+ x = re.match('^(Yellow) Dog Linux release ([0-9][^ \n]*)( .*)*$', l)
if x:
LINUX_DIST = '%s:%s' % (x.group(1),x.group(2))
elif os.path.isfile('/etc/redhat-release'):
l = open('/etc/redhat-release').readline()
- x0 = re.compile('^.*(Red) (Hat).* Linux *([A-Z]*) release ([0-9][^
\n]*)( .*)*$').match(l)
- x1 = re.compile('^Red Hat Enterprise Linux ([AW]S) release ([0-9][^
\n]*)( .*)*$').match(l)
- x2 = re.compile('^(CentOS).* release ([0-9][^ \n]*)( .*)*$').match(l)
- x3 = re.compile('^(Scientific) Linux SL release ([0-9][^ \n]*)(
.*)*$').match(l)
+ x0 = re.match('^.*(Red) (Hat).* Linux *([A-Z]*) release ([0-9][^
\n]*)( .*)*$', l)
+ x1 = re.match('^Red Hat Enterprise Linux ([AW]S) release ([0-9][^
\n]*)( .*)*$', l)
+ x2 = re.match('^(CentOS).* release ([0-9][^ \n]*)( .*)*$', l)
+ x3 = re.match('^(Scientific) Linux SL release ([0-9][^ \n]*)( .*)*$',
l)
if x0:
LINUX_DIST = '%s%s:%s%s' %
(x0.group(1),x0.group(2),x0.group(4),x0.group(3))
elif x1:
@@ -3173,10 +3182,10 @@ if SYST == "Linux":
LINUX_DIST = '%s:%s' % (x3.group(1),x3.group(2))
elif os.path.isfile('/etc/SuSE-release'):
l = open('/etc/SuSE-release').readline()
- x0 = re.compile('^.*(S[Uu]SE) LINUX Enterprise ([SD])[ervsktop]*
([0-9][^ \n]*)( .*)*$').match(l)
- x1 = re.compile('^S[Uu]SE LINUX Enterprise ([SD])[ervsktop]* ([0-9][^
\n]*)( .*)*$').match(l)
- x2 = re.compile('^.*(S[Uu]SE) [Ll][Ii][Nn][Uu][Xx].* ([0-9][^ \n]*)(
.*)*$').match(l)
- x3 = re.compile('^open(S[Uu]SE) ([0-9][^ \n]*)( .*)*$').match(l)
+ x0 = re.match('^.*(S[Uu]SE) LINUX Enterprise ([SD])[ervsktop]*
([0-9][^ \n]*)( .*)*$', l)
+ x1 = re.match('^S[Uu]SE LINUX Enterprise ([SD])[ervsktop]* ([0-9][^
\n]*)( .*)*$', l)
+ x2 = re.match('^.*(S[Uu]SE) [Ll][Ii][Nn][Uu][Xx].* ([0-9][^ \n]*)(
.*)*$', l)
+ x3 = re.match('^open(S[Uu]SE) ([0-9][^ \n]*)( .*)*$', l)
if x0:
LINUX_DIST = '%s:%sE%s' % (x0.group(1),x0.group(3),x0.group(2))
elif x1:
@@ -3187,22 +3196,22 @@ if SYST == "Linux":
LINUX_DIST = '%s:%s' % (x3.group(1),x3.group(2))
elif os.path.isfile('/etc/gentoo-release'):
l = open('/etc/gentoo-release').readline()
- x = re.compile('^.*(Gentoo) Base System.* [versionrelease]* ([0-9][^
\n]*)( .*)*$').match(l)
+ x = re.match('^.*(Gentoo) Base System.* [versionrelease]* ([0-9][^
\n]*)( .*)*$', l)
if x:
LINUX_DIST = '%s:%s' % (x.group(1),x.group(2))
elif os.path.isfile('/etc/lsb-release'):
x0 = x1 = None
for l in open('/etc/lsb-release'):
if not x0:
- x0 = re.compile('^DISTRIB_ID=([^ \n]*)( .*)*$').match(l)
+ x0 = re.match('^DISTRIB_ID=([^ \n]*)( .*)*$', l)
if not x1:
- x1 = re.compile('^DISTRIB_RELEASE=([^ \n]*)( .*)*$').match(l)
+ x1 = re.match('^DISTRIB_RELEASE=([^ \n]*)( .*)*$', l)
if x0 and x1:
LINUX_DIST = '%s:%s' % (x0.group(1),x1.group(1))
elif os.path.isfile('/etc/debian_version'):
LINUX_DIST = "Debian:"+open('/etc/debian_version').readline().strip()
if not LINUX_DIST:
- LINUX_DIST =
SYST+':'+re.compile('^([0-9\.]*)([^0-9\.].*)$').match(RELEASE).group(1)
+ LINUX_DIST = SYST+':'+re.match('^([0-9\.]*)([^0-9\.].*)$',
RELEASE).group(1)
DIST,VERSION = LINUX_DIST.split(':', 1)
else:
DIST = SYST
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list