mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-28 15:36:13 +01:00
- rename subcommand 'history' (which was not implemented yet) to
'buildhistory', and make it work. It still gives out raw xml, which might be changed - add some help text to the linkpac documentation - add '.git' to exclude_stuff
This commit is contained in:
parent
0a0d5c7976
commit
36cc55b6fd
@ -111,7 +111,12 @@ usage: osc linkpac SOURCEPRJ SOURCEPAC DESTPRJ [DESTPAC]
|
|||||||
The DESTPAC name is optional; the source packages' name will be used if
|
The DESTPAC name is optional; the source packages' name will be used if
|
||||||
DESTPAC is omitted.
|
DESTPAC is omitted.
|
||||||
|
|
||||||
Afterwards, you will want to 'co DESTPRJ DESTPAC' and edit _link and/or add patches.
|
Afterwards, you will want to 'checkout DESTPRJ DESTPAC'.
|
||||||
|
|
||||||
|
To add a patch, add the patch as file and add it to the _link file.
|
||||||
|
You can also specify text which will be inserted at the top of the spec file.
|
||||||
|
|
||||||
|
See the examples in the _link file.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -689,18 +694,29 @@ and set su-wrapper to 'sudo' in .oscrc.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def buildhistory(args):
|
||||||
|
"""buildhistory (buildhist): Shows the build history of a package
|
||||||
|
|
||||||
def history(args):
|
usage: osc buildhistory <platform> <arch>
|
||||||
"""history: Shows the build history of a package (NOT IMPLEMENTED YET)
|
|
||||||
|
|
||||||
usage: osc history <pacdir>
|
|
||||||
"""
|
"""
|
||||||
args = parseargs(args)
|
|
||||||
pacs = findpacs(args)
|
|
||||||
|
|
||||||
for p in pacs:
|
wd = os.curdir
|
||||||
print ''.join(get_history(p.prjname, p.name))
|
package = store_read_package(wd)
|
||||||
|
project = store_read_project(wd)
|
||||||
|
|
||||||
|
if args is None or len(args) < 2:
|
||||||
|
print 'missing argument'
|
||||||
|
print
|
||||||
|
print buildhistory.func_doc
|
||||||
|
print 'Valid arguments for this package are:'
|
||||||
|
print
|
||||||
|
repos(None)
|
||||||
|
print
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
platform = args[0]
|
||||||
|
arch = args[1]
|
||||||
|
print ''.join(get_buildhistory(project, package, platform, arch))
|
||||||
|
|
||||||
def rebuildpac(args):
|
def rebuildpac(args):
|
||||||
"""rebuildpac: Triggers a package rebuild for all repositories/architectures of the package
|
"""rebuildpac: Triggers a package rebuild for all repositories/architectures of the package
|
||||||
@ -759,7 +775,7 @@ cmd_dict = {
|
|||||||
diff: ['diff'],
|
diff: ['diff'],
|
||||||
editmeta: ['editmeta'],
|
editmeta: ['editmeta'],
|
||||||
help: ['help'],
|
help: ['help'],
|
||||||
history: ['history', 'hist'],
|
buildhistory: ['buildhistory', 'buildhist'],
|
||||||
linkpac: ['linkpac'],
|
linkpac: ['linkpac'],
|
||||||
userid: ['id'], # <- small difference here
|
userid: ['id'], # <- small difference here
|
||||||
init: ['init'], # depracated
|
init: ['init'], # depracated
|
||||||
|
@ -22,7 +22,7 @@ scheme = 'http'
|
|||||||
|
|
||||||
BUFSIZE = 1024*1024
|
BUFSIZE = 1024*1024
|
||||||
store = '.osc'
|
store = '.osc'
|
||||||
exclude_stuff = [store, '.svn', 'CVS']
|
exclude_stuff = [store, '.svn', 'CVS', '.git']
|
||||||
|
|
||||||
|
|
||||||
new_project_templ = """\
|
new_project_templ = """\
|
||||||
@ -1138,11 +1138,8 @@ def get_buildconfig(prj, package, platform, arch):
|
|||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
def get_history(prj, package):
|
def get_buildhistory(prj, package, platform, arch):
|
||||||
# http://api.opensuse.org/rpm/Apache/factory/i586/apache2/history ?
|
u = makeurl(['rpm', prj, platform, arch, package, 'history'])
|
||||||
# http://api.opensuse.org/package/Apache/apache2/history ?
|
|
||||||
u = makeurl(['package', prj, package, 'history'])
|
|
||||||
print u
|
|
||||||
f = urlopen(u)
|
f = urlopen(u)
|
||||||
return f.readlines()
|
return f.readlines()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user