Make sources directory if it does not exist.

Remove the need to add the --force option. Also revert the force option
back to the --force from --no-force and leave it so the user can
bypass the host check of various packages.
This commit is contained in:
Chris Johns
2013-02-21 10:07:04 +11:00
parent 251a42d399
commit e5aa27f028
2 changed files with 5 additions and 6 deletions

View File

@@ -141,9 +141,8 @@ class build:
if local is None:
raise error.general('source/patch path invalid')
if not path.isdir(path.dirname(local)):
if not self.opts.force():
raise error.general('source path not found: %s; (--force to create)' \
% (path.host(path.dirname(local))))
_notice(self.opts,
'Creating source directory: %s' % (os.path.relpath(path.host(path.dirname(local)))))
self.mkdir(path.host(path.dirname(local)))
if not path.exists(local):
#