1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 01:16:14 +01:00

- fixed #663270 ("osc importsrcpkg --commit fails")

This commit is contained in:
Marcus Huewe 2011-01-20 20:38:36 +01:00
parent 507567be71
commit dd377b07a6

View File

@ -5420,7 +5420,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
'The automatic detection failed' 'The automatic detection failed'
sys.exit(1) sys.exit(1)
olddir = os.getcwd()
if conf.config['do_package_tracking']: if conf.config['do_package_tracking']:
createPackageDir(os.path.join(project.dir, pac), project) createPackageDir(os.path.join(project.dir, pac), project)
else: else:
@ -5453,9 +5452,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
p = Package(os.path.join(project_dir, pac)) p = Package(os.path.join(project_dir, pac))
if len(p.filenamelist) == 0 and opts.commit: if len(p.filenamelist) == 0 and opts.commit:
print 'Adding files to working copy...' print 'Adding files to working copy...'
addFiles(glob.glob('*')) addFiles(glob.glob('%s/*' % os.path.join(project_dir, pac)))
if conf.config['do_package_tracking']: if conf.config['do_package_tracking']:
os.chdir(olddir)
project.commit((pac, )) project.commit((pac, ))
else: else:
p.update_datastructs() p.update_datastructs()