* go go go
This commit is contained in:
+2
-3
@@ -325,8 +325,7 @@ def check(package):
|
||||
ctx.ui.info(_("OK"), verbose=True)
|
||||
return corrupt
|
||||
|
||||
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False,
|
||||
non_recursive=False):
|
||||
def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=False):
|
||||
"""accumulate PiSi XML files in a directory"""
|
||||
index = Index()
|
||||
index.distribution = None
|
||||
@@ -335,7 +334,7 @@ def index(dirs=None, output='pisi-index.xml', skip_sources=False, skip_signing=F
|
||||
for repo_dir in dirs:
|
||||
repo_dir = str(repo_dir)
|
||||
ctx.ui.info(_('* Building index of PiSi files under %s') % repo_dir)
|
||||
index.index(repo_dir, skip_sources, non_recursive)
|
||||
index.index(repo_dir, skip_sources)
|
||||
|
||||
if skip_signing:
|
||||
index.write(output, sha1sum=True, compress=File.bz2, sign=None)
|
||||
|
||||
@@ -896,15 +896,12 @@ everything in a single index file.
|
||||
group.add_option("-o", "--output", action="store",
|
||||
default='pisi-index.xml',
|
||||
help=_("index output file"))
|
||||
group.add_option("-S", "--skip-sources", action="store_true",
|
||||
group.add_option("--skip-sources", action="store_true",
|
||||
default=False,
|
||||
help=_("do not index pisi spec files."))
|
||||
group.add_option("-G", "--skip-signing", action="store_true",
|
||||
group.add_option("--skip-signing", action="store_true",
|
||||
default=False,
|
||||
help=_("do not sign index."))
|
||||
group.add_option("-R", "--non-recursive", action="store_true",
|
||||
default=False,
|
||||
help=_("do not recurse into directories."))
|
||||
|
||||
self.parser.add_option_group(group)
|
||||
|
||||
@@ -915,14 +912,12 @@ everything in a single index file.
|
||||
if len(self.args)>0:
|
||||
index(self.args, ctx.get_option('output'),
|
||||
skip_sources = ctx.get_option('skip_sources'),
|
||||
skip_signing = ctx.get_option('skip_signing'),
|
||||
non_recursive = ctx.get_option('non_recursive'))
|
||||
skip_signing = ctx.get_option('skip_signing'))
|
||||
elif len(self.args)==0:
|
||||
ctx.ui.info(_('Indexing current directory.'))
|
||||
index(['.'], ctx.get_option('output'),
|
||||
skip_sources = ctx.get_option('skip_sources'),
|
||||
skip_signing = ctx.get_option('skip_signing'),
|
||||
non_recursive = ctx.get_option('non_recursive'))
|
||||
skip_signing = ctx.get_option('skip_signing'))
|
||||
self.finalize()
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -84,7 +84,7 @@ class Index(XmlFile):
|
||||
tmpdir = os.path.join(ctx.config.index_dir(), repo)
|
||||
File.check_signature(filename, tmpdir)
|
||||
|
||||
def index(self, repo_uri, skip_sources=False, non_recursive=False):
|
||||
def index(self, repo_uri, skip_sources=False):
|
||||
self.repo_dir = repo_uri
|
||||
for root, dirs, files in os.walk(repo_uri):
|
||||
for fn in files:
|
||||
@@ -98,8 +98,6 @@ class Index(XmlFile):
|
||||
self.add_spec(os.path.join(root, fn), repo_uri)
|
||||
if fn == 'distribution.xml':
|
||||
self.add_distro(os.path.join(root, fn))
|
||||
if non_recursive:
|
||||
del dirs[0:]
|
||||
|
||||
def update_db(self, repo, txn = None):
|
||||
ctx.componentdb.remove_repo(repo, txn=txn)
|
||||
|
||||
Reference in New Issue
Block a user