gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-deployment] branch master updated: minimize checks on distro-inst


From: gnunet
Subject: [taler-deployment] branch master updated: minimize checks on distro-installed components
Date: Wed, 17 Feb 2021 08:57:12 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository deployment.

The following commit(s) were added to refs/heads/master by this push:
     new fc2a769  minimize checks on distro-installed components
fc2a769 is described below

commit fc2a769260beaebc517dd3b61337501b6573a030
Author: MS <ms@taler.net>
AuthorDate: Wed Feb 17 08:56:30 2021 +0100

    minimize checks on distro-installed components
---
 bin/taler-deployment | 27 +++++++++++----------------
 1 file 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:

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]