diff options
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/sanity.bbclass | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index ff3c413017..05545f45f7 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass | |||
@@ -96,16 +96,10 @@ def check_conf_exists(fn, data): | |||
96 | def check_sanity_sstate_dir_change(sstate_dir, data): | 96 | def check_sanity_sstate_dir_change(sstate_dir, data): |
97 | # Sanity checks to be done when the value of SSTATE_DIR changes | 97 | # Sanity checks to be done when the value of SSTATE_DIR changes |
98 | 98 | ||
99 | # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS) | ||
99 | testmsg = "" | 100 | testmsg = "" |
100 | if sstate_dir != "": | 101 | if sstate_dir != "": |
101 | # Check that the user can read and write to SSTATE_DIR | 102 | testmsg = check_create_long_filename(sstate_dir, "SSTATE_DIR") |
102 | sstatemsg = check_can_read_write_directory(sstate_dir) or None | ||
103 | if sstatemsg: | ||
104 | sstatemsg = sstatemsg + ". You could try using it as an SSTATE_MIRRORS instead of SSTATE_CACHE.\n" | ||
105 | testmsg = testmsg + sstatemsg | ||
106 | # Check that SSTATE_DIR isn't on a filesystem with limited filename length (eg. eCryptFS) | ||
107 | testmsg = testmsg + check_create_long_filename(sstate_dir, "SSTATE_DIR") | ||
108 | |||
109 | return testmsg | 103 | return testmsg |
110 | 104 | ||
111 | def check_sanity_tmpdir_change(tmpdir, data): | 105 | def check_sanity_tmpdir_change(tmpdir, data): |
@@ -156,12 +150,7 @@ def check_create_long_filename(filepath, pathname): | |||
156 | if errno == 36: # ENAMETOOLONG | 150 | if errno == 36: # ENAMETOOLONG |
157 | return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname | 151 | return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname |
158 | else: | 152 | else: |
159 | return "Failed to create a file in %s: %s\n" % (pathname, strerror) | 153 | return "Failed to create a file in %s: %s" % (pathname, strerror) |
160 | return "" | ||
161 | |||
162 | def check_can_read_write_directory(directory): | ||
163 | if not os.access(directory, os.R_OK|os.W_OK): | ||
164 | return "Insufficient permissions for %s" % directory | ||
165 | return "" | 154 | return "" |
166 | 155 | ||
167 | def check_connectivity(d): | 156 | def check_connectivity(d): |