mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 14:46:14 +01:00
- fix creation of packages, which did no longer work since the latest changes
in error handling (since editmeta needs to see the 404 to know that a package is to be created) - insert a newline after 'missing argument' messages
This commit is contained in:
parent
5be1e292fc
commit
12b0c4bb99
2
NEWS
2
NEWS
@ -1,6 +1,8 @@
|
||||
since 0.7:
|
||||
...
|
||||
|
||||
- fixed issue with uploading files when an intercepting web proxy was in between osc and the api server
|
||||
- fixed creation of new packages/projects
|
||||
|
||||
0.7:
|
||||
- initial support for local builds (subcommand 'build')
|
||||
|
@ -64,6 +64,7 @@ usage: osc meta Apache # show meta of project 'Apache'
|
||||
|
||||
if not args:
|
||||
print 'missing argument'
|
||||
print
|
||||
print meta.func_doc
|
||||
sys.exit(1)
|
||||
|
||||
@ -88,6 +89,7 @@ usage: osc editmeta FooPrj # edit meta of project 'FooPrj'
|
||||
|
||||
if not args:
|
||||
print 'missing argument'
|
||||
print
|
||||
print meta.func_doc
|
||||
sys.exit(1)
|
||||
|
||||
@ -556,6 +558,7 @@ usage: osc buildinfo <platform> <arch>
|
||||
|
||||
if args is None or len(args) < 2:
|
||||
print 'missing argument'
|
||||
print
|
||||
print buildinfo.func_doc
|
||||
print 'Valid arguments for this package are:'
|
||||
print
|
||||
@ -580,6 +583,7 @@ usage: osc buildconfig <platform> <arch>
|
||||
|
||||
if args is None or len(args) < 2:
|
||||
print 'missing argument'
|
||||
print
|
||||
print buildconfig.func_doc
|
||||
print 'Valid arguments for this package are:'
|
||||
print
|
||||
@ -632,6 +636,7 @@ and set su-wrapper to 'sudo' in .oscrc.
|
||||
|
||||
elif args is None or len(args) < 3:
|
||||
print 'missing argument'
|
||||
print
|
||||
print build.func_doc
|
||||
print 'Valid arguments are:'
|
||||
print 'you have to choose a repo to build on'
|
||||
|
@ -434,7 +434,8 @@ rev: %s
|
||||
(fd, filename) = tempfile.mkstemp(prefix = 'osc_editmeta.', suffix = '.xml', dir = '/tmp')
|
||||
|
||||
try:
|
||||
m = show_package_meta(self.prjname, self.name)
|
||||
u = makeurl(['source', self.prjname, self.name, '_meta'])
|
||||
m = urllib2.urlopen(u).readlines()
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code == 404:
|
||||
print 'package does not exist yet... creating it'
|
||||
@ -809,7 +810,7 @@ def edit_meta(prj, pac):
|
||||
# package meta
|
||||
u = makeurl(['source', prj, pac, '_meta'])
|
||||
try:
|
||||
m = show_package_meta(prj, pac)
|
||||
m = urllib2.urlopen(u).readlines()
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code == 404:
|
||||
m = new_package_templ % (pac, username)
|
||||
@ -822,7 +823,7 @@ def edit_meta(prj, pac):
|
||||
# project meta
|
||||
u = makeurl(['source', prj, '_meta'])
|
||||
try:
|
||||
m = show_project_meta(prj)
|
||||
m = urllib2.urlopen(u).readlines()
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code == 404:
|
||||
m = new_project_templ % (prj, username)
|
||||
|
Loading…
Reference in New Issue
Block a user