summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2021-11-20 14:56:16 +0000
committerdavidovski <david@davidovski.xyz>2021-11-20 14:56:16 +0000
commit2e6bf4724ee2bd9844a8e3d411d95c066148f51b (patch)
tree12b4e1c22840987dec377cf5c0d87f8a7b4fb351
parent0313176c9fe35fcca0f53b99ce1e636af0bc9e4e (diff)
added dependencies regex
-rw-r--r--src/verbs/install.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/verbs/install.py b/src/verbs/install.py
index 5883c51..1efd850 100644
--- a/src/verbs/install.py
+++ b/src/verbs/install.py
@@ -1,4 +1,5 @@
import os
+import re
import util
import colors
import time
@@ -18,6 +19,7 @@ def find_package(query, repos, packages_dir):
checksum = file.readline().strip().split("=")[-1]
sources = file.readline().strip().split("=")[-1].split()
return checksum, sources, requested_repo
+
return None, [], None
@@ -50,6 +52,12 @@ def parse_package_info(packageinfo):
return info
+def resolve_dependencies(package_info):
+ getpkgs = lambda deps: re.findall("[\(\s](\w)[\)\s]")
+ package_info[""]
+
+
+
def install(args, options, config):
sources = config["sources"]
repos = config["repos"]
@@ -60,18 +68,16 @@ def install(args, options, config):
packages_dir = config["dir"]["packages"]
for query in args:
- # FIRST CHECK IF ALREADY INSTALLED
+ # TODO FIRST CHECK IF ALREADY INSTALLED
checksum, listed_sources, repo = find_package(query, repos, packages_dir)
if checksum is not None:
- repo_sources = {
+ info = retrieve_package_info(
+ {
source: util.add_path(url, repo)
for source, url in sources.items()
if source in listed_sources
- }
-
- info = retrieve_package_info(
- repo_sources, checksum, query,
+ }, checksum, query,
verbose=v, skip_verification=unsafe
)