Bugfix: v1 profiles have no config
This commit is contained in:
parent
b9cdb0364f
commit
6fcd5b0adc
2 changed files with 14 additions and 0 deletions
|
@ -350,6 +350,7 @@ Features
|
||||||
- 0.2.1 TOML root config
|
- 0.2.1 TOML root config
|
||||||
- 0.2.3 Single-file packages (ex. packages.d/foo.toml)
|
- 0.2.3 Single-file packages (ex. packages.d/foo.toml)
|
||||||
- 0.2.4 Support tweaking the shell
|
- 0.2.4 Support tweaking the shell
|
||||||
|
- 0.2.5 Bugfix release; profiles not depending on subpackages correctly
|
||||||
|
|
||||||
About
|
About
|
||||||
{__copyright__}, {__author__}.
|
{__copyright__}, {__author__}.
|
||||||
|
|
|
@ -120,6 +120,15 @@ class LightPackageV1(PackageV1):
|
||||||
class ProfileV1(PackageV1):
|
class ProfileV1(PackageV1):
|
||||||
"""Unline packages, profiles don't support recursive stow of contents."""
|
"""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):
|
def do_install(self, fs: Vfs, dest: Path):
|
||||||
self.do_sh_or_script(self.config().get("package", {}).get("install"), fs, dest)
|
self.do_sh_or_script(self.config().get("package", {}).get("install"), fs, dest)
|
||||||
|
|
||||||
|
@ -127,8 +136,12 @@ class ProfileV1(PackageV1):
|
||||||
requires = super().requires()
|
requires = super().requires()
|
||||||
|
|
||||||
# Implicitly depended subpackages
|
# 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("*"):
|
for p in self.root.glob("*"):
|
||||||
if p.is_dir():
|
if p.is_dir():
|
||||||
requires.append(self.name + "/" + p.name)
|
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
|
return requires
|
||||||
|
|
Loading…
Reference in a new issue