Loading bin/is +2 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ def load_repositories(args): # load repo configs if args.repo_path is not None: # from command line repoman.register(RepositoryConfig(None, path=args.repo_path)) repoman.register(RepositoryConfig(istools.smd5sum(args.repo_path)[:8], path=args.repo_path)) else: # from config for repoconf in RepoConfigFile(args.repo_config).repos: Loading installsystems/repository.py +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ class RepositoryManager(object): self.cache_path = None debug("No repository cache") else: if istools.pathtype(cache_path) != "file": if not istools.isfile(cache_path): raise NotImplementedError("Repository cache must be local") self.cache_path = os.path.abspath(cache_path) # must_path is a list of directory which must exists Loading installsystems/tools.py +8 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,14 @@ def md5sum(path=None, fileobj=None): m.update(buf) return m.hexdigest() def smd5sum(buf): ''' Compute md5 of a string ''' m = hashlib.md5() m.update(buf) return m.hexdigest() def copyfileobj(sfile, dfile): ''' Copy data from sfile to dfile computing length and md5 on the fly Loading Loading
bin/is +2 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,8 @@ def load_repositories(args): # load repo configs if args.repo_path is not None: # from command line repoman.register(RepositoryConfig(None, path=args.repo_path)) repoman.register(RepositoryConfig(istools.smd5sum(args.repo_path)[:8], path=args.repo_path)) else: # from config for repoconf in RepoConfigFile(args.repo_config).repos: Loading
installsystems/repository.py +1 −1 Original line number Diff line number Diff line Loading @@ -476,7 +476,7 @@ class RepositoryManager(object): self.cache_path = None debug("No repository cache") else: if istools.pathtype(cache_path) != "file": if not istools.isfile(cache_path): raise NotImplementedError("Repository cache must be local") self.cache_path = os.path.abspath(cache_path) # must_path is a list of directory which must exists Loading
installsystems/tools.py +8 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,14 @@ def md5sum(path=None, fileobj=None): m.update(buf) return m.hexdigest() def smd5sum(buf): ''' Compute md5 of a string ''' m = hashlib.md5() m.update(buf) return m.hexdigest() def copyfileobj(sfile, dfile): ''' Copy data from sfile to dfile computing length and md5 on the fly Loading