Loading bin/is +3 −2 Original line number Diff line number Diff line Loading @@ -246,8 +246,7 @@ def c_list(parser, args): repos = fnmatch.filter(repoman.onlines, o) if len(repos) > 0: for reponame in repos: arrow(reponame) repoman[reponame].show(verbose=args.verbose) repoman[reponame].show(verbose=args.verbose, aspath=args.as_path) else: img, repo = select_image(o, repoman, args.best) img.show(verbose=args.verbose, changelog=args.changelog) Loading Loading @@ -452,6 +451,8 @@ p_list.add_argument("-b", "--best", action="store_true", default=False, help="in best mode, image is the most recent in all repositories") p_list.add_argument("-c", "--changelog", action="store_true", default=False, help="display image changelog") p_list.add_argument("-p", "--as-path", action="store_true", default=False, help="display repoistory content as path") p_list.add_argument("object", nargs="*", help="object syntax is <path|repository|[repository/]image[:version]>") p_list.set_defaults(func=c_list, subparser=p_list) Loading installsystems/repository.py +26 −18 Original line number Diff line number Diff line Loading @@ -307,13 +307,22 @@ class Repository(object): # update last file self.update_last() def show(self, verbose=False): def show(self, verbose=False, aspath=False): ''' List images in repository ''' if aspath: images = self.db.ask("SELECT md5, name, version FROM image ORDER BY name, version").fetchall() for (image_md5, image_name, image_version) in images: s = "#light##blue#%s#reset#/#light##yellow#%s#reset#:#light##red#%s#reset#" % ( self.config.name, image_name, image_version) if verbose: s += " [%s]" % image_md5 out(s) else: arrow(self.config.name) images = self.db.ask("SELECT md5, name, version, date,\ author, description, size FROM image ORDER BY name, version").fetchall() for (image_md5, image_name, image_version, image_date, image_author, image_description, image_size) in images: out("#light##yellow#%s #reset#v%s" % (image_name, image_version)) Loading Loading @@ -621,7 +630,6 @@ class RepositoryManager(object): Show repository inside manager ''' for repo in self.repos: repo.config.name s = "#light##blue#%s#reset#"% repo.config.name if verbose: s += " (%s)" % repo.config.path Loading Loading
bin/is +3 −2 Original line number Diff line number Diff line Loading @@ -246,8 +246,7 @@ def c_list(parser, args): repos = fnmatch.filter(repoman.onlines, o) if len(repos) > 0: for reponame in repos: arrow(reponame) repoman[reponame].show(verbose=args.verbose) repoman[reponame].show(verbose=args.verbose, aspath=args.as_path) else: img, repo = select_image(o, repoman, args.best) img.show(verbose=args.verbose, changelog=args.changelog) Loading Loading @@ -452,6 +451,8 @@ p_list.add_argument("-b", "--best", action="store_true", default=False, help="in best mode, image is the most recent in all repositories") p_list.add_argument("-c", "--changelog", action="store_true", default=False, help="display image changelog") p_list.add_argument("-p", "--as-path", action="store_true", default=False, help="display repoistory content as path") p_list.add_argument("object", nargs="*", help="object syntax is <path|repository|[repository/]image[:version]>") p_list.set_defaults(func=c_list, subparser=p_list) Loading
installsystems/repository.py +26 −18 Original line number Diff line number Diff line Loading @@ -307,13 +307,22 @@ class Repository(object): # update last file self.update_last() def show(self, verbose=False): def show(self, verbose=False, aspath=False): ''' List images in repository ''' if aspath: images = self.db.ask("SELECT md5, name, version FROM image ORDER BY name, version").fetchall() for (image_md5, image_name, image_version) in images: s = "#light##blue#%s#reset#/#light##yellow#%s#reset#:#light##red#%s#reset#" % ( self.config.name, image_name, image_version) if verbose: s += " [%s]" % image_md5 out(s) else: arrow(self.config.name) images = self.db.ask("SELECT md5, name, version, date,\ author, description, size FROM image ORDER BY name, version").fetchall() for (image_md5, image_name, image_version, image_date, image_author, image_description, image_size) in images: out("#light##yellow#%s #reset#v%s" % (image_name, image_version)) Loading Loading @@ -621,7 +630,6 @@ class RepositoryManager(object): Show repository inside manager ''' for repo in self.repos: repo.config.name s = "#light##blue#%s#reset#"% repo.config.name if verbose: s += " (%s)" % repo.config.path Loading