summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-02-17 08:56:30 +0100
committerMS <ms@taler.net>2021-02-17 08:56:30 +0100
commitfc2a769260beaebc517dd3b61337501b6573a030 (patch)
tree862b4520919dcf8f110f474bbab5cd5b30268da7 /bin
parentea96552b17ffcac7240f046ac8dc9df4c0b80ea1 (diff)
downloaddeployment-fc2a769260beaebc517dd3b61337501b6573a030.tar.gz
deployment-fc2a769260beaebc517dd3b61337501b6573a030.tar.bz2
deployment-fc2a769260beaebc517dd3b61337501b6573a030.zip
minimize checks on distro-installed components
Diffstat (limited to 'bin')
-rwxr-xr-xbin/taler-deployment27
1 files changed, 11 insertions, 16 deletions
diff --git a/bin/taler-deployment b/bin/taler-deployment
index 99df531..7dd8aa1 100755
--- a/bin/taler-deployment
+++ b/bin/taler-deployment
@@ -62,11 +62,18 @@ class Repo:
builder: Callable[["Repo", Path], None]
-@dataclass
class EnvInfo:
- name: str
- repos: List[Repo]
-
+ def __init__(envname, repos):
+ self.name = name
+ self.repos = []
+ for r in repos:
+ tag = getattr(cfg, "tag_" + r.name.replace("-", "_"))
+ # This check skips all the components that are
+ # expected to be already installed; typically via
+ # a distribution package manager.
+ if not tag:
+ continue
+ self.repos.append(r)
@click.group()
def cli():
@@ -478,11 +485,6 @@ def build() -> None:
p = Path.home() / "sources" / r.name
os.chdir(str(p))
tag = getattr(cfg, "tag_" + r.name.replace("-", "_"))
- # Usually a None tag indicates that the artifact was already installed
- # via some packaging mechanism, like Debian packages. There is no
- # need to build it then.
- if not tag:
- continue
r.builder(r, p)
@@ -506,10 +508,6 @@ def checkout_repos(cfg, repos):
home = Path.home()
sources = home / "sources"
for r in repos:
- tag = getattr(cfg, "tag_" + r.name.replace("-", "_"))
- if not tag:
- print(f"Not installing {r.name} from sources")
- continue
r_dir = home / "sources" / r.name
if not r_dir.exists():
r_dir.mkdir(parents=True, exist_ok=True)
@@ -538,9 +536,7 @@ def sync_repos() -> None:
@cli.command()
def bootstrap() -> None:
"""Bootstrap a GNU Taler deployment."""
-
home = Path.home()
-
cfg = load_envcfg()
if not cfg:
print("Please create ~/envcfg.py (template in deployment.git can help)")
@@ -548,7 +544,6 @@ def bootstrap() -> None:
env_info = get_env_info(cfg)
repos = env_info.repos
envname = env_info.name
-
checkout_repos(cfg,repos)
with (home / "activate").open("w") as f: