For backwards compat, guard against legacy files

This commit is contained in:
Reid 'arrdem' McKenzie 2022-11-28 18:55:26 -07:00
parent 6fcd5b0adc
commit c669d0c262

View file

@ -120,6 +120,7 @@ class LightPackageV1(PackageV1):
class ProfileV1(PackageV1):
"""Unline packages, profiles don't support recursive stow of contents."""
_LEGACY_SPECIAL_FILES = ["BUILD", "PRE_INSTALL", "INSTALL", "POST_INSTALL", "REQUIRES"]
SPECIAL_FILES = []
_config = None
@ -127,10 +128,10 @@ class ProfileV1(PackageV1):
return {}
def test(self):
return self.root.is_dir()
return self.root.is_dir() and not any((self.root / f).exists() for f in self._LEGACY_SPECIAL_FILES)
def do_install(self, fs: Vfs, dest: Path):
self.do_sh_or_script(self.config().get("package", {}).get("install"), fs, dest)
return
def requires(self):
requires = super().requires()