filesystem-layout: remove old /tmp exemptions
These packages have been removed or don't use /tmp anymore, so remove
the exemption.
BUG=b:187699610
TEST=CQ passes
Change-Id: I48a79ebabd3663960cf00bdaeefae3f63ca8e5b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3602905
Reviewed-by: Gilberto Contreras <gcontreras@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/hooks/filesystem-layout.py b/hooks/filesystem-layout.py
index 1cd1659..9c34ac3 100755
--- a/hooks/filesystem-layout.py
+++ b/hooks/filesystem-layout.py
@@ -25,7 +25,7 @@
# Those are: /dev
VALID_ROOT = {
'bin', 'etc', 'home', 'lib', 'lib32', 'lib64', 'media',
- 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'sys', 'tmp', 'usr', 'var',
+ 'mnt', 'opt', 'proc', 'root', 'run', 'sbin', 'sys', 'usr', 'var',
}
# Paths that are allowed in the / dir for boards.
@@ -40,7 +40,7 @@
# Paths under / that should not have any subdirs.
NOSUBDIRS_ROOT = {
- 'bin', 'dev', 'proc', 'sbin', 'sys', 'tmp',
+ 'bin', 'dev', 'proc', 'sbin', 'sys',
}
# Paths that are allowed in the /usr dir.
@@ -137,20 +137,6 @@
'net-fs/samba',
}
-# Ignore some packages installing into /tmp for now.
-# NB: Do *not* add more packages here.
-BAD_TMP_PACKAGES = {
- # https://crbug.com/1057059
- 'chromeos-base/chromeos-bsp-caroline-private',
- 'chromeos-base/chromeos-bsp-elm-private',
- 'chromeos-base/chromeos-config-bsp',
- 'chromeos-base/chromeos-config-bsp-coral',
- 'chromeos-base/chromeos-config-bsp-coral-private',
- 'chromeos-base/chromeos-config-bsp-nami',
- 'chromeos-base/chromeos-config-bsp-scarlet-private',
- 'chromeos-base/cros-config-test',
-}
-
def has_subdirs(path):
"""See if |path| has any subdirs."""
@@ -232,10 +218,7 @@
# Some of these may have subdirs at runtime, but not from package installs.
for path in NOSUBDIRS_ROOT:
if has_subdirs(os.path.join(root, path)):
- if path == 'tmp' and atom in BAD_TMP_PACKAGES:
- logging.warning('Ignoring known bad /tmp install for now')
- else:
- ret = False
+ ret = False
# Special case /var due to so many misuses currently.
if has_subdirs(os.path.join(root, 'var')):
@@ -312,8 +295,9 @@
if not check_root(opts.root, opts.host):
logging.critical(
- "This package does not conform to CrOS's filesystem conventions. "
- 'Please review the paths flagged above and adjust its layout.')
+ "Package '%s' does not conform to CrOS's filesystem conventions. "
+ 'Please review the paths flagged above and adjust its layout.',
+ get_current_package())
return 1
else:
return 0