code: def _repo_packages(self, args, search=False):
          '''
          List packages for one or more configured repos
          '''
          packages = []
          repo_metadata = self._get_repo_metadata()
          for repo in repo_metadata:
              for pkg in repo_metadata[repo]['packages']:
                  if args[1] in pkg:
                      version = repo_metadata[repo]['packages'][pkg]['info']['version']
                      release = repo_metadata[repo]['packages'][pkg]['info']['release']
                      packages.append((pkg, version, release, repo))
          for pkg in sorted(packages):
              self.ui.status(
                  '{0}\t{1}-{2}\t{3}'.format(pkg[0], pkg[1], pkg[2], pkg[3])
              )
          return packagef _repo_packages(self, args, search=False):
          '''
          List packages for one or more configured repos
          '''
          packages = []
          repo_metadata = self._get_repo_metadata()
          for repo in repo_metadata:
              for pkg in repo_metadata[repo]['packages']:
                  if args[1] in pkg:
                      version = repo_metadata[repo]['packages'][pkg]['info']['version']
                      release = repo_metadata[repo]['packages'][pkg]['info']['release']
                      packages.append((pkg, version, release, repo))
          for pkg in sorted(packages):
              self.ui.status(
                  '{0}\t{1}-{2}\t{3}'.format(pkg[0], pkg[1], pkg[2], pkg[3])
              )
          return packages
docs: List packages for one or more configured repos