1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00

- minor fix in createPackageDir

- osc mkpac only works when 'do_package_tracking' is enabled
This commit is contained in:
Marcus Hüwe 2008-03-17 23:43:32 +00:00
parent 3fdf758dbb
commit 3c3e961f4e
2 changed files with 7 additions and 1 deletions

View File

@ -946,6 +946,10 @@ class Osc(cmdln.Cmdln):
osc mkpac new_package
${cmd_option_list}
"""
if not conf.config['do_package_tracking']:
print >>sys.stderr, "enable \'do_package_tracking\' to use this feature"
sys.exit(1)
if len(args) != 1:
print >>sys.stderr, 'wrong number of arguments!'
sys.exit(1)

View File

@ -3089,8 +3089,10 @@ def createPackageDir(pathname, prj_obj=None):
print statfrmt('A', os.path.normpath(pathname))
return True
else:
print '\'%s\' already exists' % pathname
return False
else:
print '\'%s\' already exists' % pathname
return False
else:
print '\'%s\' is not a working copy' % prj_dir
return False