* another rename
This commit is contained in:
@@ -893,7 +893,7 @@ everything in a single index file.
|
|||||||
|
|
||||||
group = OptionGroup(self.parser, _("index options"))
|
group = OptionGroup(self.parser, _("index options"))
|
||||||
|
|
||||||
group.add_option("-a", "--absolute-uris", action="store_true",
|
group.add_option("-a", "--absolute-urls", action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help=_("store absolute links for indexed files."))
|
help=_("store absolute links for indexed files."))
|
||||||
group.add_option("-o", "--output", action="store",
|
group.add_option("-o", "--output", action="store",
|
||||||
|
|||||||
+2
-3
@@ -119,8 +119,7 @@ class Index(XmlFile):
|
|||||||
md = metadata.MetaData()
|
md = metadata.MetaData()
|
||||||
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
|
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
|
||||||
md.package.packageSize = os.path.getsize(path)
|
md.package.packageSize = os.path.getsize(path)
|
||||||
if ctx.config.options and ctx.config.options.absolute_uris:
|
if ctx.config.options and ctx.config.options.absolute_urls:
|
||||||
# FIXME: the name "absolute_uris" does not seem to fit below :/
|
|
||||||
md.package.packageURI = os.path.realpath(path)
|
md.package.packageURI = os.path.realpath(path)
|
||||||
else: # create relative path by default
|
else: # create relative path by default
|
||||||
# TODO: in the future well do all of this with purl/pfile/&helpers
|
# TODO: in the future well do all of this with purl/pfile/&helpers
|
||||||
@@ -161,7 +160,7 @@ class Index(XmlFile):
|
|||||||
#ctx.ui.error(str(Error(*errs)))
|
#ctx.ui.error(str(Error(*errs)))
|
||||||
builder.fetch_component()
|
builder.fetch_component()
|
||||||
sf = builder.spec
|
sf = builder.spec
|
||||||
if ctx.config.options and ctx.config.options.absolute_uris:
|
if ctx.config.options and ctx.config.options.absolute_urls:
|
||||||
sf.source.sourceURI = os.path.realpath(path)
|
sf.source.sourceURI = os.path.realpath(path)
|
||||||
else: # create relative path by default
|
else: # create relative path by default
|
||||||
sf.source.sourceURI = util.removepathprefix(repo_uri, path)
|
sf.source.sourceURI = util.removepathprefix(repo_uri, path)
|
||||||
|
|||||||
Reference in New Issue
Block a user