1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-27 23:16:14 +01:00

add subcommands createpac/editpac and createprj/editprj, which wrap around editmeta but are more logical to find; fix help message of editmeta subcommand

This commit is contained in:
Dr. Peter Poeml 2006-09-15 10:53:44 +00:00
parent 7f592638be
commit 7a8c7664da
2 changed files with 43 additions and 3 deletions

11
TODO
View File

@ -2,8 +2,6 @@
- implement 'info' command - implement 'info' command
- implement 'mv' command - implement 'mv' command
- creation of new project (workaround: editmeta <newprj>)
- creation of new package (workaround: editmeta prj <newpac>)
- editing of user data - editing of user data
<watchlist> <watchlist>
<project name="ASCIIParadize"/> <project name="ASCIIParadize"/>
@ -14,6 +12,7 @@
In which form would this be integrated best? In which form would this be integrated best?
- clean up the way how a .oscrc template is being added: at the moment, there - clean up the way how a .oscrc template is being added: at the moment, there
are two places doing this are two places doing this
- implement a 'copypac' command, which copies a package into another project
checkin: checkin:
@ -110,6 +109,14 @@ osc repos server:search:ui :
16:59 < kesselborn> for var in ['OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', 'OSC_PACKAGECACHEDIR', 'BUILD_ROOT'] 16:59 < kesselborn> for var in ['OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', 'OSC_PACKAGECACHEDIR', 'BUILD_ROOT']
16:59 < kesselborn> Du hast OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', vergessen 16:59 < kesselborn> Du hast OSC_SU_WRAPPER', 'OSC_BUILD_ROOT', vergessen
# osc build SUSE_Factory i586 xorg-x11-libX11.spec
> ['/usr/bin/osc', 'build', 'i38', 'i386', 'SUSE_Factory', 'i586', 'xorg-x11-libX11.spec']
> Error: specfile 'SUSE_Factory' does not exist.
BUILD_DIST must *not* be set! Could you add this information to the
'osc help build' text?
curl -d " " -n "http://api.opensuse.org/source/server:php/php5_hardened?cmd=rebuild&arch=i586&repo=SUSE_Linux_10.0" curl -d " " -n "http://api.opensuse.org/source/server:php/php5_hardened?cmd=rebuild&arch=i586&repo=SUSE_Linux_10.0"

View File

@ -79,6 +79,37 @@ usage: osc meta Apache # show meta of project 'Apache'
print ''.join(show_project_meta(project)) print ''.join(show_project_meta(project))
def editpac(args):
"""editpac (createpac): Edit package meta information
If the named package does not exist, it will be created.
usage: osc createpac <prj> <pac>
osc editpac <prj> <pac>
"""
if not args or len(args) != 2:
sys.exit('missing argument\n\n%s\n' % editpac.func_doc)
project = args[0]
package = args[1]
edit_meta(project, package)
def editprj(args):
"""editprj (createprj): Edit project meta information
If the named project does not exist, it will be created.
usage: osc createprj <prj>
osc editprj <prj>
"""
if not args or len(args) != 1:
sys.exit('missing argument\n\n%s\n' % editprj.func_doc)
project = args[0]
edit_meta(project, None)
def editmeta(args): def editmeta(args):
"""Edit project/package meta information """Edit project/package meta information
If the named project or package does not exist, it will be created. If the named project or package does not exist, it will be created.
@ -90,7 +121,7 @@ usage: osc editmeta FooPrj # edit meta of project 'FooPrj'
if not args: if not args:
print 'missing argument' print 'missing argument'
print print
print meta.func_doc print editmeta.func_doc
sys.exit(1) sys.exit(1)
if len(args) == 2: if len(args) == 2:
@ -793,6 +824,8 @@ cmd_dict = {
deletepac: ['deletepac'], deletepac: ['deletepac'],
diff: ['diff'], diff: ['diff'],
editmeta: ['editmeta'], editmeta: ['editmeta'],
editpac: ['editpac', 'createpac'],
editprj: ['editprj', 'createprj'],
help: ['help'], help: ['help'],
buildhistory: ['buildhistory', 'buildhist'], buildhistory: ['buildhistory', 'buildhist'],
linkpac: ['linkpac'], linkpac: ['linkpac'],