diff --git a/src/python/cram/__main__.py b/src/python/cram/__main__.py index b2f1d88..87d39ae 100644 --- a/src/python/cram/__main__.py +++ b/src/python/cram/__main__.py @@ -350,6 +350,7 @@ Features - 0.2.1 TOML root config - 0.2.3 Single-file packages (ex. packages.d/foo.toml) - 0.2.4 Support tweaking the shell + - 0.2.5 Bugfix release; profiles not depending on subpackages correctly About {__copyright__}, {__author__}. diff --git a/src/python/cram/v1.py b/src/python/cram/v1.py index d814d38..0709155 100644 --- a/src/python/cram/v1.py +++ b/src/python/cram/v1.py @@ -120,6 +120,15 @@ class LightPackageV1(PackageV1): class ProfileV1(PackageV1): """Unline packages, profiles don't support recursive stow of contents.""" + SPECIAL_FILES = [] + _config = None + + def config(self): + return {} + + def test(self): + return self.root.is_dir() + def do_install(self, fs: Vfs, dest: Path): self.do_sh_or_script(self.config().get("package", {}).get("install"), fs, dest) @@ -127,8 +136,12 @@ class ProfileV1(PackageV1): requires = super().requires() # Implicitly depended subpackages + # FIXME: How to make this generic? Really this is a query over the loaded packages post-load, not a static thing. for p in self.root.glob("*"): if p.is_dir(): requires.append(self.name + "/" + p.name) + elif p.is_file() and p.name.endswith(".toml"): + # Use negative indexing to slice off the suffix which we've already established exists + requires.append(self.name + "/" + (p.name[0:-5])) return requires