diff options
-rwxr-xr-x | install-system.sh | 12 | ||||
-rw-r--r-- | src/verbs/sync.py | 14 |
2 files changed, 17 insertions, 9 deletions
diff --git a/install-system.sh b/install-system.sh index 62036b4..33766e1 100755 --- a/install-system.sh +++ b/install-system.sh @@ -18,13 +18,13 @@ mkdir -p $R/usr/lib mkdir -p $R/root cd $R -ln -s /bin usr/bin -ln -s /bin sbin -ln -s /bin usr/sbin +ln -s usr/bin bin +ln -s usr/bin sbin +ln -s usr/bin usr/sbin -ln -s /lib lib -ln -s /lib lib64 -ln -s /lib usr/lib64 +ln -s usr/lib lib +ln -s usr/lib lib64 +ln -s usr/lib usr/lib64 ln -s usr/local usr diff --git a/src/verbs/sync.py b/src/verbs/sync.py index 0474bf6..f47e0db 100644 --- a/src/verbs/sync.py +++ b/src/verbs/sync.py @@ -1,6 +1,7 @@ import os import util import colors +import shutil import time CACHE_DIR = "/var/cache/xipkg" @@ -131,12 +132,16 @@ def sync(args, options, config): for source,ping in speeds.items(): file.write(f"{source} {ping}\n") + repo_dir = os.path.join(config["dir"]["packages"], repo) + if os.path.exists(repo_dir): + shutil.rmtree(repo_dir) + # find the most popular hash to use done = 0 total = len(packages.items()) for package,versions in packages.items(): info = validate_package(package, versions, repo, verbose=v) - if not save_package(package, info, os.path.join(config["dir"]["packages"], repo)): + if not save_package(package, info, repo_dir): new += 1 done += 1 util.loading_bar(done, total, f"Syncing {repo}") @@ -144,8 +149,11 @@ def sync(args, options, config): util.loading_bar(total, total, f"Synced {repo}") print(colors.RESET) - if new > 0: - util.fill_line(f"There are {new} new updates", colors.LIGHT_GREEN) + # this isnt new updates for install, this is new packages + #if new > 0: + # util.fill_line(f"There are {new} new updates", colors.LIGHT_GREEN) + + def import_key(name, url, config, verbose=False, root="/"): keychain_dir = util.add_path(root, config["dir"]["keychain"]) |