* another rename

This commit is contained in:
Faik Uygur
2006-09-25 08:41:07 +00:00
parent c0f91f867f
commit 3e3646b816
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -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
View File
@@ -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)