portage.util.writeable_check module

Methods to check whether Portage is going to write to read-only filesystems. Since the methods are not portable across different OSes, each OS needs its own method. To expand RO checking for different OSes, add a method which accepts a list of directories and returns a list of mounts which need to be remounted RW, then add “elif ostype == (the ostype value for your OS)” to get_ro_checker().


Always returns [], this is the fallback function if the system does not have an ro_checker method defined.


Uses the system type to find an appropriate method for testing whether Portage is going to write to any read-only filesystems.


  1. A method for testing for RO filesystems appropriate to the current system.


Use /proc/self/mountinfo to check that no directories installed by the ebuild are set to be installed to a read-only filesystem.


dir_list (List) – A list of directories installed by the ebuild.


1. A list of filesystems which are both set to be written to and are mounted read-only, may be empty.