summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-01-12 18:17:35 +0000
committerdavidovski <david@davidovski.xyz>2022-01-12 18:17:35 +0000
commit7cc1490eab3c339bf976437c27ced4b9599e0523 (patch)
tree16f72f8efa0d957a9a7885efc5a9abf4f9abafb7
parent9466d1bdce363d8e9d3836f4c3eb982617c06aa1 (diff)
added makefile
-rw-r--r--Makefile3
-rw-r--r--src/verbs/info.py2
-rw-r--r--src/verbs/install.py4
-rw-r--r--src/verbs/sync.py2
4 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b485901..ed8c86b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@ install: clean xi xipkg.conf default.conf bin/xi
mkdir -p $(DESTDIR)/usr/bin
cp default.conf $(DESTDIR)/etc/xipkg.d/
cp xipkg.conf $(DESTDIR)/etc/xipkg.conf
- cp bin/xi $(DESTDIR)/usr/bin/xi
+ cp bin/xi $(DESTDIR)/usr/bin/xipkg
+ ln -s /usr/bin/xipkg $(DESTDIR)/usr/bin/xi
clean:
rm -rf bin
diff --git a/src/verbs/info.py b/src/verbs/info.py
index 90cf558..8ce531a 100644
--- a/src/verbs/info.py
+++ b/src/verbs/info.py
@@ -27,7 +27,7 @@ def info(args, options, config):
if len(args) > 0:
for package in args:
- checksum, sources, repo = find_package(package, config["repos"], config["dir"]["packages"], config["sources"])
+ checksum, sources, repo, size, files = find_package(package, config["repos"], config["dir"]["packages"], config["sources"])
if not checksum is None:
info = retrieve_package_info(
diff --git a/src/verbs/install.py b/src/verbs/install.py
index f204633..d5bb834 100644
--- a/src/verbs/install.py
+++ b/src/verbs/install.py
@@ -161,7 +161,7 @@ def retrieve_package(sources, package_info, package_name, config, completed=0, t
else:
return package_path, source, "none", size
print(colors.RESET + colors.RED + f"No valid packages found for {package_name}" + colors.RESET)
- return ""
+ return "", "", "", 0
def parse_package_info(packageinfo):
info = {}
@@ -371,6 +371,8 @@ def install_multiple(to_install, args, options, config, terminology=("install",
completed=downloaded, total_download=length,
verbose=v, skip_verification=unsafe)
+ if package_path == "":
+ print(colors.RED + f"Failed to download {package}")
downloaded += size
pkg_files.append(
diff --git a/src/verbs/sync.py b/src/verbs/sync.py
index 866a821..53fcfb4 100644
--- a/src/verbs/sync.py
+++ b/src/verbs/sync.py
@@ -180,7 +180,7 @@ def import_key(name, url, config, verbose=False, root="/"):
key_path = util.curl_to_file(url, key_path)
print(colors.GREEN + f"Imported {name}.pub")
except Exception as e:
- print(colors.RED + f"Failed to import key:", colors.DARK_RED + str(e))
+ print(colors.RED + f"Failed to import key:", colors.RED + str(e))
def keyimport(args, options, config):
if len(args) > 1: