Mailinglist Archive: opensuse-commit (875 mails)

< Previous Next >
commit osc
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 10 Jul 2008 16:01:54 +0200
  • Message-id: <20080710140154.8B76167817B@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package osc
checked in at Thu Jul 10 16:01:54 CEST 2008.


--------
--- osc/osc.changes 2008-06-11 10:36:43.000000000 +0200
+++ osc/osc.changes 2008-07-10 15:38:56.000000000 +0200
@@ -1,0 +2,33 @@
+Wed Jul 9 17:25:25 CEST 2008 - poeml@xxxxxxx
+
+- update to r4401: (version 0.105):
+ - osc submitreq list:
+ - can now be called without parameters, applying to the working copy then.
+ - calling it in a project directory is also possible now.
+ - output was improved. Newest requests are listed first.
+ - osc submitreq delete: a new action which has been added
+ - osc submitreq list/create: use api URL from the working copy
+ - osc meta: editing returns the API error description instead of a plain HTTP
+ error if available
+ - osc copypac: use the correct userid when copying to another api host
+ - osc importsrcpkg: disable signature check when getting data from a rpm file
+ - osc linkpac: --revision option added.
+ - osc search: added option -i|--involved, to show in which projects/packages
+ a developer is involved
+ - osc build: double check the buildinfo for local builds. Refuse to build for
+ architectures that are not supported by the host
+ - osc buildhist: change the output into a format which better matches actual
+ RPM filenames.
+ - osc commit: give commit message tempfiles a ".diff" suffix, so syntax
+ highlighting automatically works in capable editors
+ - other bug fixes:
+ - don't expand/unexpand if the working copy has local modifications - this
is
+ an ugly workaround for bnc#399247 but this way the working copy isn't
screwed up
+ - work around a bug which causes packages to be cached locally under the
+ "None" architecture (and therefore causing issues when building for more
+ than one architecture via osc build).
+ - don't create _linkerror files in working copies
+ - better error handling (mostly printing more details) in a number of cases
+ - show error messages from the API also for type 500 errors
+
+-------------------------------------------------------------------



Old:
----
osc-0.104.tar.gz

New:
----
osc-0.105.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.A26601/_old 2008-07-10 16:01:35.000000000 +0200
+++ /var/tmp/diff_new_pack.A26601/_new 2008-07-10 16:01:35.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package osc (Version 0.104)
+# spec file for package osc (Version 0.105)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,7 +13,7 @@

Name: osc
BuildRequires: python-devel
-Version: 0.104
+Version: 0.105
Release: 1
Group: Development/Tools/Other
License: GPL v2 or later
@@ -80,6 +80,36 @@
%doc README TODO NEWS

%changelog
+* Wed Jul 09 2008 poeml@xxxxxxx
+- update to r4401: (version 0.105):
+ - osc submitreq list:
+ - can now be called without parameters, applying to the working copy then.
+ - calling it in a project directory is also possible now.
+ - output was improved. Newest requests are listed first.
+ - osc submitreq delete: a new action which has been added
+ - osc submitreq list/create: use api URL from the working copy
+ - osc meta: editing returns the API error description instead of a plain HTTP
+ error if available
+ - osc copypac: use the correct userid when copying to another api host
+ - osc importsrcpkg: disable signature check when getting data from a rpm file
+ - osc linkpac: --revision option added.
+ - osc search: added option -i|--involved, to show in which projects/packages
+ a developer is involved
+ - osc build: double check the buildinfo for local builds. Refuse to build for
+ architectures that are not supported by the host
+ - osc buildhist: change the output into a format which better matches actual
+ RPM filenames.
+ - osc commit: give commit message tempfiles a ".diff" suffix, so syntax
+ highlighting automatically works in capable editors
+ - other bug fixes:
+ - don't expand/unexpand if the working copy has local modifications - this
is
+ an ugly workaround for bnc#399247 but this way the working copy isn't
screwed up
+ - work around a bug which causes packages to be cached locally under the
+ "None" architecture (and therefore causing issues when building for more
+ than one architecture via osc build).
+ - don't create _linkerror files in working copies
+ - better error handling (mostly printing more details) in a number of cases
+ - show error messages from the API also for type 500 errors
* Wed Jun 11 2008 poeml@xxxxxxx
- update to r4164 (version 0.104):
- osc update: after update, reset the revision when updating

++++++ debian.changelog ++++++
--- osc/debian.changelog 2008-06-11 10:36:41.000000000 +0200
+++ osc/debian.changelog 2008-07-09 17:30:51.000000000 +0200
@@ -1,3 +1,37 @@
+osc (0.105-1) unstable; urgency=high
+
+ - update to r4401: (version 0.105):
+ - osc submitreq list:
+ - can now be called without parameters, applying to the working copy
then.
+ - calling it in a project directory is also possible now.
+ - output was improved. Newest requests are listed first.
+ - osc submitreq delete: a new action which has been added
+ - osc submitreq list/create: use api URL from the working copy
+ - osc meta: editing returns the API error description instead of a plain
HTTP
+ error if available
+ - osc copypac: use the correct userid when copying to another api host
+ - osc importsrcpkg: disable signature check when getting data from a rpm
file
+ - osc linkpac: --revision option added.
+ - osc search: added option -i|--involved, to show in which
projects/packages
+ a developer is involved
+ - osc build: double check the buildinfo for local builds. Refuse to build
for
+ architectures that are not supported by the host
+ - osc buildhist: change the output into a format which better matches
actual
+ RPM filenames.
+ - osc commit: give commit message tempfiles a ".diff" suffix, so syntax
+ highlighting automatically works in capable editors
+ - other bug fixes:
+ - don't expand/unexpand if the working copy has local modifications -
this is
+ an ugly workaround for #399247 but this way the working copy isn't
screwed up
+ - work around a bug which causes packages to be cached locally under the
+ "None" architecture (and therefore causing issues when building for
more
+ than one architecture via osc build).
+ - don't create _linkerror files in working copies
+ - better error handling (mostly printing more details) in a number of
cases
+ - show error messages from the API also for type 500 errors
+
+ -- Peter Poeml <poeml@xxxxxxx> Wed, 9 Jul 2008 12:00:00 +0200
+
osc (0.104-1) unstable; urgency=high

- update to r4164 (version 0.104):

++++++ osc-0.104.tar.gz -> osc-0.105.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/NEWS new/osc-0.105/NEWS
--- old/osc-0.104/NEWS 2008-06-11 10:34:39.000000000 +0200
+++ new/osc-0.105/NEWS 2008-07-09 17:26:24.000000000 +0200
@@ -1,3 +1,35 @@
+0.105:
+
+- osc submitreq list:
+ - can now be called without parameters, applying to the working copy then.
+ - calling it in a project directory is also possible now.
+ - output was improved. Newest requests are listed first.
+- osc submitreq delete: a new action which has been added
+- osc submitreq list/create: use api URL from the working copy
+- osc meta: editing returns the API error description instead of a plain HTTP
+ error if available
+- osc copypac: use the correct userid when copying to another api host
+- osc importsrcpkg: disable signature check when getting data from a rpm file
+- osc linkpac: --revision option added.
+- osc search: added option -i|--involved, to show in which projects/packages
+ a developer is involved
+- osc build: double check the buildinfo for local builds. Refuse to build for
+ architectures that are not supported by the host
+- osc buildhist: change the output into a format which better matches actual
+ RPM filenames.
+- osc commit: give commit message tempfiles a ".diff" suffix, so syntax
+ highlighting automatically works in capable editors
+- other bug fixes:
+ - don't expand/unexpand if the working copy has local modifications - this is
+ an ugly workaround for #399247 but this way the working copy isn't screwed
up
+ - work around a bug which causes packages to be cached locally under the
+ "None" architecture (and therefore causing issues when building for more
+ than one architecture via osc build).
+ - don't create _linkerror files in working copies
+ - better error handling (mostly printing more details) in a number of cases
+ - show error messages from the API also for type 500 errors
+
+
0.104:
- osc update: after update, reset the revision when updating multiple package.
Fixes "404: Not Found" type errors when updating an entire project.
[bnc#399177]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/osc/babysitter.py
new/osc-0.105/osc/babysitter.py
--- old/osc-0.104/osc/babysitter.py 2008-06-11 10:17:55.000000000 +0200
+++ new/osc-0.105/osc/babysitter.py 2008-07-08 17:51:37.000000000 +0200
@@ -9,6 +9,8 @@
import signal
from osc import oscerr
from urllib2 import URLError, HTTPError
+# import as RPMError because the class "error" is too generic
+from rpm import error as RPMError

# the good things are stolen from Matt Mackall's mercurial

@@ -62,6 +64,10 @@
print >>sys.stderr, 'aborted.'
return 1

+ except oscerr.APIError, e:
+ print >>sys.stderr, 'BuildService API error:', e.msg
+ return 1
+
except oscerr.UnreadableFile, e:
print >>sys.stderr, e.msg
return 1
@@ -81,10 +87,11 @@
print >>sys.stderr, e.hdrs
print >>sys.stderr, body

- if e.code in [ 400, 403, 404 ]:
- msg = body.split('<summary>')[1]
- msg = msg.split('</summary>')[0]
- print >>sys.stderr, msg
+ if e.code in [ 400, 403, 404, 500 ]:
+ if '<summary>' in body:
+ msg = body.split('<summary>')[1]
+ msg = msg.split('</summary>')[0]
+ print >>sys.stderr, msg

return 1

@@ -122,3 +129,7 @@
except AttributeError, e:
print >>sys.stderr, e
return 1
+
+ except RPMError, e:
+ print >>sys.stderr, e
+ return 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/osc/build.py new/osc-0.105/osc/build.py
--- old/osc-0.104/osc/build.py 2008-05-08 14:21:57.000000000 +0200
+++ new/osc-0.105/osc/build.py 2008-07-04 14:56:32.000000000 +0200
@@ -14,6 +14,7 @@
from osc.fetch import *
from osc.core import get_buildinfo, store_read_apiurl, store_read_project,
store_read_package, meta_exists, quote_plus, get_buildconfig
import osc.conf
+import oscerr
try:
from xml.etree import cElementTree as ET
except ImportError:
@@ -24,13 +25,15 @@
change_personality = {
'i686': 'linux32',
'i586': 'linux32',
+ 'i386': 'linux32',
'ppc': 'powerpc32',
's390': 's390',
}

can_also_build = {
- 'x86_64': ['i686', 'i586'],
+ 'x86_64': ['i686', 'i586', 'i386'],
'i686': ['i586'],
+ 'i386': ['i586'],
'ppc64': ['ppc'],
's390x': ['s390'],
}
@@ -49,7 +52,7 @@
try:
tree = ET.parse(filename)
except:
- print >>sys.stderr, 'could not parse the buildconfig:'
+ print >>sys.stderr, 'could not parse the buildinfo:'
print >>sys.stderr, open(filename).read()
sys.exit(1)

@@ -82,12 +85,23 @@

self.deps = []
for node in root.findall('bdep'):
- p = Pac(node.get('name'),
- node.get('version'),
- node.get('release'),
+ p_name = node.get('name')
+ p_arch = node.get('arch')
+ if not p_arch:
+ p_arch = self.buildarch
+ p_version = node.get('version')
+ p_release = node.get('release')
+
+ if not (p_name and p_arch and p_version):
+ raise oscerr.APIError(
+ "buildinfo for package %s/%s/%s is incomplete" % (p_name,
p_arch, p_version))
+
+ p = Pac(p_name,
+ p_version,
+ p_release,
node.get('project'),
node.get('repository'),
- node.get('arch'),
+ p_arch,
node.get('preinstall'),
node.get('runscripts'),
self.buildarch, # buildarch is used only for the URL
to access the full tree...
@@ -301,6 +315,8 @@
print >>sys.stderr, 'The project \'%s\' does not exists -
please ' \
'rerun with \'--alternative-project
<alternative_project>\'' % prj
sys.exit(1)
+ else:
+ raise
bi_file.write(bi_text)
bi_file.flush()

@@ -390,7 +406,9 @@
# change personality, if needed
if bi.buildarch in can_also_build.get(hostarch, []):
cmd = change_personality[bi.buildarch] + ' ' + cmd
-
+ else:
+ print >>sys.stderr, 'Error: hostarch \'%s\' cannot build \'%s\'.'
% (hostarch, bi.buildarch)
+ return 1

print cmd
rc = os.system(cmd)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/osc/commandline.py
new/osc-0.105/osc/commandline.py
--- old/osc-0.104/osc/commandline.py 2008-06-11 10:29:27.000000000 +0200
+++ new/osc-0.105/osc/commandline.py 2008-07-09 17:22:18.000000000 +0200
@@ -1,4 +1,5 @@
#!/usr/bin/python
+# vim: sw=4 et

# Copyright (C) 2006 Peter Poeml / Novell Inc. All rights reserved.
# This program is free software; it may be used, copied, modified
@@ -430,6 +431,9 @@
"decline" will change the request state to "declined" and append a
message that you specify with the --message option.

+ "delete" will change the request state to "deleted" and append a
+ message that you specify with the --message option.
+
"accept" will change the request state to "accepted" and will trigger
the actual submit process. That would normally be a server-side copy of
the source package to the target package.
@@ -438,16 +442,17 @@
usage:
osc submitreq create [-m TEXT]
osc submitreq create [-m TEXT] SOURCEPRJ SOURCEPKG DESTPRJ
[DESTPKG]
- osc submitreq list PRJ [PKG]
+ osc submitreq list [PRJ [PKG]]
osc submitreq show [-d] ID
osc submitreq decline [-m TEXT] ID
+ osc submitreq delete [-m TEXT] ID
osc submitreq accept [-m TEXT] ID
${cmd_option_list}
"""

args = slash_split(args)

- cmds = ['create', 'list', 'show', 'decline', 'accept']
+ cmds = ['create', 'list', 'show', 'decline', 'accept', 'delete']
if not args or args[0] not in cmds:
raise oscerr.WrongArgs('Unknown submitreq action. Choose one of
%s.' \
% ', '.join(cmds))
@@ -458,7 +463,7 @@
if cmd in ['create']:
min_args, max_args = 0, 4
elif cmd in ['list']:
- min_args, max_args = 1, 2
+ min_args, max_args = 0, 2
else:
min_args, max_args = 1, 1
if len(args) < min_args:
@@ -490,20 +495,32 @@
dst_package = args[3]
else:
dst_package = src_package
+ else:
+ raise oscerr.WrongArgs('Incorrect number of arguments.\n\n' \
+ + self.get_cmd_help('submitreq'))

elif cmd == 'list':
- project = args[0]
+ package = None
+ project = None
+ if len(args) > 0:
+ project = args[0]
+ else:
+ project = store_read_project(os.curdir)
+ apiurl = store_read_apiurl(os.curdir)
+ try:
+ package = store_read_package(os.curdir)
+ except oscerr.NoWorkingCopy:
+ pass
+
if len(args) > 1:
package = args[1]
- else:
- package = None
- elif cmd in ['show', 'decline', 'accept']:
+ elif cmd in ['show', 'decline', 'accept', 'delete']:
reqid = args[0]


# create
if cmd == 'create':
- devloc = show_develproject(conf.config['apiurl'], dst_project,
dst_package)
+ devloc = show_develproject(apiurl, dst_project, dst_package)
if devloc \
and dst_project != devloc \
and src_project != devloc \
@@ -524,8 +541,11 @@

# list
elif cmd == 'list':
- results = get_submit_request_list(conf.config['apiurl'],
+ results = get_submit_request_list(apiurl,
project, package)
+
+ results.sort(reverse=True)
+
for result in results:
print result.list_view()

@@ -555,6 +575,11 @@
r = change_submit_request_state(conf.config['apiurl'],
reqid, 'accepted', opts.message or '')
print r
+ # delete
+ elif cmd == 'delete':
+ r = change_submit_request_state(conf.config['apiurl'],
+ reqid, 'deleted', opts.message or '')
+ print r


# editmeta and its aliases are all depracated
@@ -579,6 +604,8 @@
return 2


+ @cmdln.option('-r', '--revision', metavar='rev',
+ help='link the specified revision.')
def do_linkpac(self, subcmd, opts, *args):
"""${cmd_name}: "Link" a package to another package

@@ -606,6 +633,8 @@
raise oscerr.WrongArgs('Incorrect number of arguments.\n\n' \
+ self.get_cmd_help('linkpac'))

+ rev, dummy = parseRevisionOption(opts.revision)
+
src_project = args[0]
src_package = args[1]
dst_project = args[2]
@@ -617,7 +646,12 @@
if src_project == dst_project and src_package == dst_package:
print >>sys.stderr, 'Error: source and destination are the same.'
return 1
- link_pac(src_project, src_package, dst_project, dst_package)
+
+ if rev and not checkRevision(src_project, src_package, rev):
+ print >>sys.stderr, 'Revision \'%s\' does not exist' % rev
+ sys.exit(1)
+
+ link_pac(src_project, src_package, dst_project, dst_package, rev)

def do_aggregatepac(self, subcmd, opts, *args):
"""${cmd_name}: "Aggregate" a package to another package
@@ -1272,6 +1306,13 @@
rev = show_upstream_xsrcmd5(p.apiurl,
p.prjname, p.name)

+ # FIXME: ugly workaround for #399247
+ if opts.expand_link or opts.unexpand_link:
+ if [ i for i in p.filenamelist+p.filenamelist_unvers if
p.status(i) != ' ' ]:
+ print >>sys.stderr, 'osc: cannot expand/unexpand because
your working ' \
+ 'copy has local modifications. Please
remove them ' \
+ 'and try again'
+ sys.exit(1)
p.update(rev)
rev = None

@@ -1400,6 +1441,7 @@
print ''.join(show_results_meta(pac.apiurl, pac.prjname,
package=pac.name))


+ @cmdln.alias('r')
def do_results(self, subcmd, opts, *args):
"""${cmd_name}: Shows the build results of a package

@@ -1440,6 +1482,7 @@
@cmdln.option('-n', '--name-filter', metavar='EXPR',
help='show only packages whos name matches EXPR')

+ @cmdln.alias('pr')
def do_prjresults(self, subcmd, opts, *args):
"""${cmd_name}: Shows project-wide build results

@@ -1939,6 +1982,8 @@
help='search for matches in the \'description\'
element')
@cmdln.option('-v', '--verbose', action='store_true',
help='show more information')
+ @cmdln.option('-i', '--involved', action='store_true',
+ help='show involved projects/packages')
def do_search(self, subcmd, opts, *args):
"""${cmd_name}: Search for a project and/or package.

@@ -1951,10 +1996,17 @@
${cmd_option_list}
"""

+ search_term = None
if len(args) > 1:
raise oscerr.WrongArgs('Too many arguments.')
- elif len(args) < 1:
+ elif len(args) < 1 and not opts.involved:
raise oscerr.WrongArgs('Too few arguments.')
+ elif len(args) == 1:
+ search_term = args[0]
+
+ if (opts.title or opts.description) and opts.involved:
+ raise oscerr.WrongArgs('Sorry, the options \'--title\' and/or
\'--description\' ' \
+ 'plus \'--involved\' are mutual exclusive')

search_list = []
search_for = []
@@ -1968,13 +2020,17 @@
if opts.project:
search_list.append('@name')
search_for.append('project')
+ if opts.involved:
+ search_list = [ 'person/@userid' ]
+ search_term = search_term or
conf.get_apiurl_usr(conf.config['apiurl'])
+ opts.enable_exact = True

if not search_list:
search_list = ['title', 'description', '@name']
if not search_for:
search_for = [ 'project', 'package' ]
for kind in search_for:
- result = search(conf.config['apiurl'], set(search_list), kind,
args[0], opts.verbose, opts.enable_exact, opts.repos_baseurl)
+ result = search(conf.config['apiurl'], set(search_list), kind,
search_term, opts.verbose, opts.enable_exact, opts.repos_baseurl)
if result:
if kind == 'package':
headline = [ '# Package', '# Project' ]
@@ -1986,11 +2042,11 @@
headline.append('# URL')
if len(search_for) > 1:
print '#' * 68
- print 'matches for \'%s\' in %ss:\n' % (args[0], kind)
+ print 'matches for \'%s\' in %ss:\n' % (search_term, kind)
for row in build_table(len(headline), result, headline, 2):
print row
else:
- print 'No matches found for \'%s\' in %ss' % (args[0], kind)
+ print 'No matches found for \'%s\' in %ss' % (search_term, kind)


@cmdln.option('-p', '--project', metavar='project',
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/osc/core.py new/osc-0.105/osc/core.py
--- old/osc-0.104/osc/core.py 2008-06-11 10:34:39.000000000 +0200
+++ new/osc-0.105/osc/core.py 2008-07-09 17:23:12.000000000 +0200
@@ -1,11 +1,13 @@
#!/usr/bin/python

+# vim: sw=4 et
+
# Copyright (C) 2006 Peter Poeml / Novell Inc. All rights reserved.
# This program is free software; it may be used, copied, modified
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.

-__version__ = '0.104'
+__version__ = '0.105'
# __store_version__ is to be incremented when the format of the working copy
# "store" changes in an incompatible way. Please add any needed migration
# functionality to check_store_version().
@@ -29,7 +31,7 @@

BUFSIZE = 1024*1024
store = '.osc'
-exclude_stuff = [store, 'CVS', '*~', '.*']
+exclude_stuff = [store, 'CVS', '*~', '.*', '_linkerror']


new_project_templ = """\
@@ -944,7 +946,7 @@

return state

- def comparePac(self, pac):
+ def comparePac(self, cmp_pac):
"""
This method compares the local filelist with
the filelist of the passed package to see which files
@@ -955,17 +957,21 @@
added_files = []
removed_files = []

- for file in self.filenamelist:
- if not file in self.to_be_deleted:
- if file in pac.filenamelist:
- if dgst(file) != pac.findfilebyname(file).md5:
- changed_files.append(file)
- else:
- added_files.append(file)
-
- for file in pac.filenamelist:
- if (not file in self.filenamelist) or (file in self.to_be_deleted):
+ for file in self.filenamelist+self.filenamelist_unvers:
+ state = self.status(file)
+ if state == 'A' and (not file in cmp_pac.filenamelist):
+ added_files.append(file)
+ elif file in cmp_pac.filenamelist and state == 'D':
+ removed_files.append(file)
+ elif state == ' ' and not file in cmp_pac.filenamelist:
+ added_files.append(file)
+ elif file in cmp_pac.filenamelist and state != 'A' and state !=
'?':
+ if dgst(os.path.join(self.absdir, file)) !=
cmp_pac.findfilebyname(file).md5:
+ changed_files.append(file)
+ for file in cmp_pac.filenamelist:
+ if not file in self.filenamelist:
removed_files.append(file)
+ removed_files = set(removed_files)

return changed_files, added_files, removed_files

@@ -1137,7 +1143,7 @@
self.statehistory = []

def read(self, root):
- self.reqid = root.get('id')
+ self.reqid = int(root.get('id'))

n = root.find('submit').find('source')
self.src_project = n.get('project')
@@ -1172,18 +1178,26 @@


def list_view(self):
- return '%s %-8s %s/%s -> %s/%s %s' % \
+ dst = "%s/%s" % (self.dst_project, self.dst_package)
+ if self.src_package == self.dst_package:
+ dst = self.dst_project
+
+ desc = ""
+ if self.descr:
+ desc = "\n %s" % (repr(self.descr))
+
+ return '%6d %-7s %-50s -> %-20s %s' % \
(self.reqid,
- self.state.name,
- self.src_project,
- self.src_package,
- self.dst_project,
- self.dst_package,
- repr(self.descr) or '')
+ self.state.name,
+ "%s/%s" % (self.src_project, self.src_package),
+ dst, desc)
+
+ def __cmp__(self, other):
+ return cmp(self.reqid, other.reqid)

def __str__(self):
s = """\
-Request to submit (id %s):
+Request to submit (sri%d):

%s/%s -> %s/%s

@@ -1700,8 +1714,12 @@
try:
f.sync()
except urllib2.HTTPError, e:
- print e
- input = raw_input('Try again? (yY = Yes - nN = No): ')
+ error_help = "%d" % e.code
+ if e.headers.get('X-Opensuse-Errorcode'):
+ error_help = "%s (%d)" %
(e.headers.get('X-Opensuse-Errorcode'), e.code)
+
+ print >>sys.stderr, 'BuildService API error:', error_help
+ input = raw_input('Try again? ([y/N]): ')
if input != 'y' and input != 'Y':
break
else:
@@ -1801,7 +1819,7 @@
def edit_message(footer=''):
delim = '--This line, and those below, will be ignored--\n\n' + footer
import tempfile
- (fd, filename) = tempfile.mkstemp(prefix = 'osc-commitmsg', suffix =
'.txt', dir = '/tmp')
+ (fd, filename) = tempfile.mkstemp(prefix = 'osc-commitmsg', suffix =
'.diff', dir = '/tmp')
f = os.fdopen(fd, 'w')
f.write('\n')
f.write(delim)
@@ -1886,7 +1904,7 @@
return f.read()


-def get_submit_request_list(apiurl, project, package):
+def get_submit_request_list(apiurl, project, package, req_state=('new')):
match = 'submit/target/@project=\'%s\'' % quote_plus(project)
if package:
match += '%20and%20' + 'submit/target/@package=\'%s\'' %
quote_plus(package)
@@ -1899,7 +1917,7 @@
for root in collection.findall('request'):
r = SubmitReq()
r.read(root)
- if r.state.name not in ['accepted', 'declined', 'deleted']:
+ if r.state.name in req_state:
requests.append(r)

return requests
@@ -2120,21 +2138,7 @@
else:
diff.append('osc: unable to find \'%s\' in revision %s' %
(file, cmp_pac.rev))
else:
- for file in wc.filenamelist+wc.filenamelist_unvers:
- state = wc.status(file)
- if state == 'A' and (not file in cmp_pac.filenamelist):
- added_files.append(file)
- elif file in cmp_pac.filenamelist and state == 'D':
- removed_files.append(file)
- elif state == ' ' and not file in cmp_pac.filenamelist:
- added_files.append(file)
- elif file in cmp_pac.filenamelist and state != 'A' and state
!= '?':
- if dgst(os.path.join(wc.absdir, file)) !=
cmp_pac.findfilebyname(file).md5:
- changed_files.append(file)
- for file in cmp_pac.filenamelist:
- if not file in wc.filenamelist:
- removed_files.append(file)
- removed_files = set(removed_files)
+ changed_files, added_files, removed_files = wc.comparePac(cmp_pac)

for file in changed_files:
diff.append(diff_hdr % file)
@@ -2262,7 +2266,7 @@
os.chdir(olddir)


-def replace_pkg_meta(pkgmeta, new_name, new_prj, keep_maintainers = False):
+def replace_pkg_meta(pkgmeta, new_name, new_prj, keep_maintainers = False,
dst_userid = None):
"""
update pkgmeta with new new_name and new_prj and set calling user as the
only maintainer (unless keep_maintainers is set)
@@ -2273,11 +2277,12 @@
if not keep_maintainers:
for person in root.findall('person'):
root.remove(person)
+ dst_userid = dst_userid or conf.config['user']
ET.SubElement(root, 'person',
- userid = conf.config['user'], role = 'maintainer')
+ userid = dst_userid, role = 'maintainer')
return ET.tostring(root)

-def link_pac(src_project, src_package, dst_project, dst_package):
+def link_pac(src_project, src_package, dst_project, dst_package, rev=''):
"""
create a linked package
- "src" is the original package
@@ -2297,16 +2302,21 @@
print >>sys.stderr
print >>sys.stderr, '_link file already exists...! Aborting'
sys.exit(1)
-
+
+ if rev:
+ rev = 'rev="%s"' % rev
+ else:
+ rev = ''
+
print 'Creating _link...',
link_template = """\
-<link project="%s" package="%s">
+<link project="%s" package="%s" %s>
<patches>
<!-- <apply name="patch" /> -->
<!-- <topadd>%%define build_with_feature_x 1</topadd> -->
</patches>
</link>
-""" % (src_project, src_package)
+""" % (src_project, src_package, rev)

u = makeurl(conf.config['apiurl'], ['source', dst_project, dst_package,
'_link'])
http_PUT(u, data=link_template)
@@ -2379,7 +2389,8 @@
"""

src_meta = show_package_meta(src_apiurl, src_project, src_package)
- src_meta = replace_pkg_meta(src_meta, dst_package, dst_project,
keep_maintainers)
+ dst_userid = conf.get_apiurl_usr(dst_apiurl)
+ src_meta = replace_pkg_meta(src_meta, dst_package, dst_project,
keep_maintainers, dst_userid)

print 'Sending meta data...'
u = makeurl(dst_apiurl, ['source', dst_project, dst_package, '_meta'])
@@ -2676,9 +2687,9 @@
t = time.localtime(int(node.get('time')))
t = time.strftime('%Y-%m-%d %H:%M:%S', t)

- r.append('%s %s %6d %2d %s' % (t, srcmd5, rev, bcnt, versrel))
+ r.append('%s %s %6d %s.%d' % (t, srcmd5, rev, versrel, bcnt))

- r.insert(0, 'time srcmd5 rev
bcnt vers-rel')
+ r.insert(0, 'time srcmd5 rev
vers-rel.bcnt')

return r

@@ -3085,6 +3096,7 @@
try:
import rpm
ts = rpm.TransactionSet()
+ ts.setVSFlags(rpm._RPMVSF_NOSIGNATURES)
file = open(rpm_file, 'r')
header = ts.hdrFromFdno(file.fileno())
file.close()
@@ -3261,8 +3273,8 @@
os.chdir(old_dir)

elif is_package_dir(filename) and conf.config['do_package_tracking']:
- print 'osc: warning: \'%s\' is already under version control' %
filename
- sys.exit(1)
+ print >>sys.stderr, 'osc: warning: \'%s\' is already under version
control' % filename
+ return 1

pacs = findpacs(filenames)

@@ -3279,6 +3291,7 @@
print 'osc: warning: \'%s\' is already under version control'
% pac.name
for filename in pac.todo:
if filename in pac.excluded:
+ print >>sys.stderr, 'osc: warning: \'%s\' is excluded from a
working copy' % filename
continue
if filename in pac.filenamelist:
print >>sys.stderr, 'osc: warning: \'%s\' is already under
version control' % filename
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/osc/oscerr.py new/osc-0.105/osc/oscerr.py
--- old/osc-0.104/osc/oscerr.py 2008-05-21 15:44:49.000000000 +0200
+++ new/osc-0.105/osc/oscerr.py 2008-06-20 15:36:45.000000000 +0200
@@ -23,6 +23,12 @@
OscBaseError.__init__(self)
self.msg = msg

+class APIError(OscBaseError):
+ """Exception raised when there is an error in the output from the API"""
+ def __init__(self, msg):
+ OscBaseError.__init__(self)
+ self.msg = msg
+
class NoConfigfile(OscBaseError):
"""Exception raised when osc's configfile cannot be found"""
def __init__(self, fname, msg):
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn
--exclude=.svnignore old/osc-0.104/TODO new/osc-0.105/TODO
--- old/osc-0.104/TODO 2008-05-19 17:15:18.000000000 +0200
+++ new/osc-0.105/TODO 2008-07-09 17:25:16.000000000 +0200
@@ -127,45 +127,6 @@



-when can this happen?
- % osc up
-checking out new package t
-A home:poeml/t
-A home:poeml/t/foo
-At revision 16.
-At revision 9.
-D bar1
-Traceback (most recent call last):
- File "/suse/poeml/bin/osc", line 7, in ?
- commandline.main()
- File "/suse/poeml/osc-stable/osc/commandline.py", line 1072, in main
- cmd(args)
- File "/suse/poeml/osc-stable/osc/commandline.py", line 572, in update
- if state == 'M' and p.findfilebyname(filename).md5 ==
oldp.findfilebyname(filename).md5:
-AttributeError: 'NoneType' object has no attribute 'md5'
-[1] 11871 exit 1 osc up
-
-
-
-
- % osc importsrcpkg -n apache2-mod_memcache
/tmp/apache-mod_memcache-0.1.0-2mdv2008.0.src.rpm
-warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 26752624
-Traceback (most recent call last):
- File "/suse/poeml/bin/osc", line 10, in ?
- sys.exit( osc.main() )
- File "/suse/poeml/osc/osc/cmdln.py", line 256, in main
- return self.cmd(args)
- File "/suse/poeml/osc/osc/cmdln.py", line 279, in cmd
- retval = self.onecmd(argv)
- File "/suse/poeml/osc/osc/cmdln.py", line 395, in onecmd
- return self._dispatch_cmd(handler, argv)
- File "/suse/poeml/osc/osc/cmdln.py", line 1070, in _dispatch_cmd
- return handler(argv[0], opts, *args)
- File "/suse/poeml/osc/osc/commandline.py", line 1714, in do_importsrcpkg
- rpm_data = data_from_rpm(srpm, 'Name:', 'Summary:', '%description')
- File "/suse/poeml/osc/osc/core.py", line 2128, in data_from_rpm
- header = ts.hdrFromFdno(file.fileno())
-_rpm.error: public key not available


15:16 < DuDE> mt: Projekte anlegen geht nur, wenn es ein Subprojekt ist von
einem Projekt wo Du Schreibrechte hast



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread