if os.path.exists("/proc/sys/vm/mmap_min_addr"):
f = file("/proc/sys/vm/mmap_min_addr", "r")
if (f.read().strip() != "0"):
- messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n"
+ messages = messages + "/proc/sys/vm/mmap_min_addr is not 0. This will cause problems with qemu so please fix the value (as root).\n\nTo fix this in later reboots, set vm.mmap_min_addr = 0 in /etc/sysctl.conf.\n"
f.close()
for util in required_utilities.split():
missing = missing.rstrip(',')
messages = messages + "Please install following missing utilities: %s\n" % missing
+ try:
+ if os.path.basename(os.readlink('/bin/sh')) == 'dash':
+ messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead.\n"
+ except:
+ pass
+
omask = os.umask(022)
if omask & 0755:
messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
if (f.read().strip() != tmpdir):
messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir
else:
+ import bb
+ bb.mkdirhier(tmpdir)
f = file(checkfile, "w")
f.write(tmpdir)
f.close()
#
# Check the 'ABI' of TMPDIR
#
- current_abi = data.getVar('SANITY_ABI', e.data, True)
+ current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
abifile = data.getVar('SANITY_ABIFILE', e.data, True)
if os.path.exists(abifile):
f = file(abifile, "r")
f.write(current_abi)
f.close()
+ #
+ # Check the Distro PR value didn't change
+ #
+ distro_pr = data.getVar('DISTRO_PR', e.data, True)
+ prfile = data.getVar('SANITY_PRFILE', e.data, True)
+ if os.path.exists(prfile):
+ f = file(prfile, "r")
+ pr = f.read().strip()
+ if (pr != distro_pr):
+ # Code to convert from one ABI to another could go here if possible.
+ messages = messages + "Error, DISTRO_PR has changed (%s to %s) which means all packages need to rebuild. Please remove your TMPDIR so this can happen. For autobuilder setups you can avoid this by using a TMPDIR that include DISTRO_PR in the path.\n" % (pr, distro_pr)
+ else:
+ f = file(prfile, "w")
+ f.write(distro_pr)
+ f.close()
+
+
+ #
+ # Check there aren't duplicates in PACKAGE_ARCHS
+ #
+ archs = data.getVar('PACKAGE_ARCHS', e.data, True).split()
+ for arch in archs:
+ if archs.count(arch) != 1:
+ messages = messages + "Error, Your PACKAGE_ARCHS field contains duplicates. Perhaps you set EXTRA_PACKAGE_ARCHS twice accidently through some tune file?\n"
+ break
+
if messages != "":
raise_sanity_error(messages)