diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/thandy/ClientCLI.py | 9 | ||||
-rw-r--r-- | lib/thandy/repository.py | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/thandy/ClientCLI.py b/lib/thandy/ClientCLI.py index 05f3647..3a8b760 100644 --- a/lib/thandy/ClientCLI.py +++ b/lib/thandy/ClientCLI.py @@ -20,13 +20,14 @@ def update(args): "loop", "no-packagesys", "install", "socks-port=", "debug", "info", - "warn"]) + "warn", "force-check"]) download = True keep_looping = False use_packagesys = True install = False socksPort = None logLevel = logging.INFO + forceCheck = False for o, v in options: if o == '--repo': @@ -47,6 +48,8 @@ def update(args): logLevel = logging.INFO elif o == '--warn': logLevel = logging.WARN + elif o == '--force-check': + forceCheck = True logging.basicConfig(level=logLevel) @@ -69,6 +72,10 @@ def update(args): pkgSystems=packagesys, installableDict=installable) + if forceCheck: + files.add("/meta/timestamp.txt") + forceCheck = False + if installable and not files: logging.info("Ready to install files: %s", ", ".join(sorted(installable.keys()))) diff --git a/lib/thandy/repository.py b/lib/thandy/repository.py index 6378586..ad0fe4d 100644 --- a/lib/thandy/repository.py +++ b/lib/thandy/repository.py @@ -13,7 +13,7 @@ import os import threading import time -MAX_TIMESTAMP_AGE = 24*60*60 +MAX_TIMESTAMP_AGE = 3*60*60 class RepositoryFile: """Represents information about a file stored in our local repository |