mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 18:06:13 +01:00
allow mkpac on existing directory
This commit is contained in:
parent
b1be0f84ea
commit
93acbc3720
@ -5618,10 +5618,11 @@ def createPackageDir(pathname, prj_obj=None):
|
|||||||
"""
|
"""
|
||||||
prj_dir, pac_dir = getPrjPacPaths(pathname)
|
prj_dir, pac_dir = getPrjPacPaths(pathname)
|
||||||
if is_project_dir(prj_dir):
|
if is_project_dir(prj_dir):
|
||||||
if not os.path.exists(pac_dir):
|
global store
|
||||||
|
if not os.path.exists(pac_dir+store):
|
||||||
prj = prj_obj or Project(prj_dir, False)
|
prj = prj_obj or Project(prj_dir, False)
|
||||||
prj.addPackage(pac_dir)
|
|
||||||
Package.init_package(prj.apiurl, prj.name, pac_dir, pac_dir)
|
Package.init_package(prj.apiurl, prj.name, pac_dir, pac_dir)
|
||||||
|
prj.addPackage(pac_dir)
|
||||||
print statfrmt('A', os.path.normpath(pathname))
|
print statfrmt('A', os.path.normpath(pathname))
|
||||||
else:
|
else:
|
||||||
raise oscerr.OscIOError(None, 'file or directory \'%s\' already exists' % pathname)
|
raise oscerr.OscIOError(None, 'file or directory \'%s\' already exists' % pathname)
|
||||||
|
Loading…
Reference in New Issue
Block a user