Ejemplo n.º 1
0
	def check_buildroot(self):
		"""
			Checks if the buildroot is fine.
		"""
		mp = system.get_mountpoint(BUILD_ROOT)

		# Check if the mountpoint is read-only.
		if mp.is_readonly():
			log.warning("Build directory is read-only: %s" % BUILD_ROOT)

			# Trying to remount.
			try:
				mp.remount("rw")
			except:
				log.warning("Remounting (rw) %s has failed" % BUILD_ROOT)
				return False
			else:
				log.warning("Successfully remounted as rw: %s" % BUILD_ROOT)

		# Everything looks fine.
		return True
Ejemplo n.º 2
0
	def free_space(self):
		mp = system.get_mountpoint(BUILD_ROOT)

		return mp.space_left