Refactor - rename method BuildRoot.relpath for clarity

The semantics of "relative" here are atypical of common expectations.
While the method does return a "related" path, it's still absolute.
Hopefully this new name is less confusing.
This commit is contained in:
John Florian 2017-03-31 13:01:38 -04:00 committed by Mike McLean
parent 0aa10b925b
commit 7cd5d6c4ed

View file

@ -705,7 +705,7 @@ class BuildRoot(object):
rpm_info['external_repo'] = erepo
rpm_info['location'] = erepo['external_repo_id']
def relpath(self, path):
def path_without_to_within(self, path):
"""
:param path:
A reference within the BuildRoot but as an absolute path from
@ -3101,7 +3101,7 @@ class LiveMediaTask(ImageTask):
logfile = os.path.join(self.workdir, 'lorax-templates-checkout.log')
checkout_dir = scm.checkout(os.path.join(build_root.rootdir(), 'tmp'),
self.session, self.getUploadDir(), logfile)
return os.path.join(build_root.relpath(checkout_dir),
return os.path.join(build_root.path_without_to_within(checkout_dir),
self.opts['lorax_dir'])
def genISOManifest(self, image, manifile):