Kaydet (Commit) 3e3646b8 authored tarafından Faik Uygur's avatar Faik Uygur

* another rename

üst c0f91f86
......@@ -893,7 +893,7 @@ everything in a single index file.
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,
help=_("store absolute links for indexed files."))
group.add_option("-o", "--output", action="store",
......
......@@ -119,8 +119,7 @@ class Index(XmlFile):
md = metadata.MetaData()
md.read(os.path.join(ctx.config.install_dir(), ctx.const.metadata_xml))
md.package.packageSize = os.path.getsize(path)
if ctx.config.options and ctx.config.options.absolute_uris:
# FIXME: the name "absolute_uris" does not seem to fit below :/
if ctx.config.options and ctx.config.options.absolute_urls:
md.package.packageURI = os.path.realpath(path)
else: # create relative path by default
# 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)))
builder.fetch_component()
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)
else: # create relative path by default
sf.source.sourceURI = util.removepathprefix(repo_uri, path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment