Hello community,
here is the log from the commit of package osc
checked in at Fri Jul 18 01:06:33 CEST 2008.
--------
--- osc/osc.changes 2008-07-11 12:44:37.000000000 +0200
+++ osc/osc.changes 2008-07-17 11:57:29.000000000 +0200
@@ -1,0 +2,10 @@
+Wed Jul 16 17:16:27 CEST 2008 - poeml@suse.de
+
+- update to r4461 (version 0.107):
+ - osc update / checkout: *important bugfix* don't check out a
+ working copy, or update an existing one, when a source link
+ cannot be applied [bnc#409373]
+ - osc build: the --extra-pkgs option is now a configurable
+ setting in .oscrc. Default is "extra-pkgs = vim gdb strace"
+
+-------------------------------------------------------------------
Old:
----
osc-0.106.tar.gz
New:
----
osc-0.107.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.FK2093/_old 2008-07-18 01:06:20.000000000 +0200
+++ /var/tmp/diff_new_pack.FK2093/_new 2008-07-18 01:06:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package osc (Version 0.106)
+# spec file for package osc (Version 0.107)
#
# 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.106
+Version: 0.107
Release: 1
Group: Development/Tools/Other
License: GPL v2 or later
@@ -80,6 +80,13 @@
%doc README TODO NEWS
%changelog
+* Wed Jul 16 2008 poeml@suse.de
+- update to r4461 (version 0.107):
+ - osc update / checkout: *important bugfix* don't check out a
+ working copy, or update an existing one, when a source link
+ cannot be applied [bnc#409373]
+ - osc build: the --extra-pkgs option is now a configurable
+ setting in .oscrc. Default is "extra-pkgs = vim gdb strace"
* Fri Jul 11 2008 poeml@suse.de
- update to r4428 (version 0.106):
- osc rdiff / osc submitreq show: diff the _expanded_ sources [bnc#408267]
++++++ debian.changelog ++++++
--- osc/debian.changelog 2008-07-11 12:44:36.000000000 +0200
+++ osc/debian.changelog 2008-07-17 11:57:29.000000000 +0200
@@ -1,3 +1,14 @@
+osc (0.107-1) unstable; urgency=high
+
+ - update to r4461 (version 0.107):
+ - osc update / checkout: *important bugfix* don't check out a
+ working copy, or update an existing one, when a source link
+ cannot be applied [bnc#409373]
+ - osc build: the --extra-pkgs option is now a configurable
+ setting in .oscrc. Default is "extra-pkgs = vim gdb strace"
+
+ -- Peter Poeml Wed, 16 Jul 2008 12:00:00 +0200
+
osc (0.106-1) unstable; urgency=high
- update to r4428 (version 0.106):
++++++ osc-0.106.tar.gz -> osc-0.107.tar.gz ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/NEWS new/osc-0.107/NEWS
--- old/osc-0.106/NEWS 2008-07-11 12:42:01.000000000 +0200
+++ new/osc-0.107/NEWS 2008-07-16 17:15:42.000000000 +0200
@@ -1,3 +1,12 @@
+0.107:
+
+- osc build: the --extra-pkgs option is now a configurable setting in .oscrc.
+ Default is "extra-pkgs = vim gdb strace"
+- .oscrc: make tilde expansion work on the packagecachedir setting
+- osc update / checkout: don't check out a working copy, or update an existing
+ one, when a source link cannot be applied [bnc#409373]
+
+
0.106:
- osc rdiff / osc submitreq show: diff the _expanded_ sources [bnc#408267]
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/osc/babysitter.py new/osc-0.107/osc/babysitter.py
--- old/osc-0.106/osc/babysitter.py 2008-07-08 17:51:37.000000000 +0200
+++ new/osc-0.107/osc/babysitter.py 2008-07-16 17:14:57.000000000 +0200
@@ -68,6 +68,10 @@
print >>sys.stderr, 'BuildService API error:', e.msg
return 1
+ except oscerr.LinkExpandError, e:
+ print >>sys.stderr, 'Link cannot be expanded:\n', e
+ return 1
+
except oscerr.UnreadableFile, e:
print >>sys.stderr, e.msg
return 1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/osc/build.py new/osc-0.107/osc/build.py
--- old/osc-0.106/osc/build.py 2008-07-04 14:56:32.000000000 +0200
+++ new/osc-0.107/osc/build.py 2008-07-12 14:06:23.000000000 +0200
@@ -288,6 +288,13 @@
config['build-root'] = config['build-root'] % {'repo': repo, 'arch': arch}
+ if not opts.extra_pkgs:
+ extra_pkgs = config['extra-pkgs']
+ elif opts.extra_pkgs == ['']:
+ extra_pkgs = None
+ else:
+ extra_pkgs = opts.extra_pkgs
+
print 'Getting buildinfo from server'
bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = '/tmp')
try:
@@ -297,7 +304,7 @@
repo,
arch,
specfile=open(spec).read(),
- addlist=opts.extra_pkgs))
+ addlist=extra_pkgs))
except urllib2.HTTPError, e:
if e.code == 404:
# check what caused the 404
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/osc/conf.py new/osc-0.107/osc/conf.py
--- old/osc-0.106/osc/conf.py 2008-04-28 18:37:44.000000000 +0200
+++ new/osc-0.107/osc/conf.py 2008-07-12 14:06:23.000000000 +0200
@@ -63,6 +63,8 @@
'cookiejar': '~/.osc_cookiejar',
# disable project tracking by default
'do_package_tracking': '0',
+ # default for osc build
+ 'extra-pkgs': 'vim gdb strace',
}
boolean_opts = ['debug', 'do_package_tracking', 'http_debug', 'post_mortem', 'traceback']
@@ -84,6 +86,12 @@
# /srv/oscbuild/%%(repo)s-%%(arch)s
#build-root = %(build-root)s
+# extra packages to install when building packages locally (osc build)
+# this corresponds to osc build's -x option and can be overridden with that
+# -x '' can also be given on the command line to override this setting, or
+# you can have an empty setting here.
+#extra-pkgs = vim gdb strace
+
# show info useful for debugging
#debug = 1
@@ -296,7 +304,11 @@
except:
raise oscerr.ConfigError('option %s requires an integer value' % i)
- packagecachedir = os.path.expanduser(config['packagecachedir'])
+ config['packagecachedir'] = os.path.expanduser(config['packagecachedir'])
+
+ config['extra-pkgs'] = [ i.strip(',') for i in config['extra-pkgs'].split() ]
+ if config['extra-pkgs'] == []:
+ config['extra-pkgs'] = None
# transform 'url1, url2, url3' form into a list
if type(config['urllist']) == str:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/osc/core.py new/osc-0.107/osc/core.py
--- old/osc-0.106/osc/core.py 2008-07-11 12:42:01.000000000 +0200
+++ new/osc-0.107/osc/core.py 2008-07-16 17:15:42.000000000 +0200
@@ -7,7 +7,7 @@
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or (at your option) any later version.
-__version__ = '0.106'
+__version__ = '0.107'
# __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().
@@ -185,6 +185,7 @@
self.xsrcmd5 = None
self.lsrcmd5 = None
self.srcmd5 = None
+ self.error = None
def read(self, linkinfo_node):
"""read in the linkinfo metadata from the <linkinfo> element passed as
@@ -198,6 +199,7 @@
self.xsrcmd5 = linkinfo_node.get('xsrcmd5')
self.lsrcmd5 = linkinfo_node.get('lsrcmd5')
self.srcmd5 = linkinfo_node.get('srcmd5')
+ self.error = linkinfo_node.get('error')
def islink(self):
"""returns True if the linkinfo is not empty, otherwise False"""
@@ -211,14 +213,24 @@
return True
return False
+ def haserror(self):
+ """returns True if the link is in error state (could not be applied)"""
+ if self.error:
+ return True
+ return False
+
def __str__(self):
"""return an informatory string representation"""
if self.islink() and not self.isexpanded():
return 'project %s, package %s, xsrcmd5 %s' \
% (self.project, self.package, self.xsrcmd5)
elif self.islink() and self.isexpanded():
- return 'expanded link to project %s, package %s, srcmd5 %s, lsrcmd5 %s' \
- % (self.project, self.package, self.srcmd5, self.lsrcmd5)
+ if self.haserror():
+ return 'broken link to project %s, package %s, srcmd5 %s, lsrcmd5 %s: %s' \
+ % (self.project, self.package, self.srcmd5, self.lsrcmd5, self.error)
+ else:
+ return 'expanded link to project %s, package %s, srcmd5 %s, lsrcmd5 %s' \
+ % (self.project, self.package, self.srcmd5, self.lsrcmd5)
else:
return 'None'
@@ -1748,10 +1760,18 @@
m = show_files_meta(apiurl, prj, pac)
try:
# only source link packages have a <linkinfo> element.
- return ET.parse(StringIO(''.join(m))).getroot().find('linkinfo').get('xsrcmd5')
+ li_node = ET.parse(StringIO(''.join(m))).getroot().find('linkinfo')
except:
return None
+ li = Linkinfo()
+ li.read(li_node)
+
+ if li.haserror():
+ raise oscerr.LinkExpandError, li.error
+ else:
+ return li.xsrcmd5
+
def show_upstream_rev(apiurl, prj, pac):
m = show_files_meta(apiurl, prj, pac)
@@ -2231,8 +2251,17 @@
def checkout_package(apiurl, project, package,
revision=None, pathname=None, prj_obj=None,
- expand_link=False, prj_dir=os.getcwd()):
- olddir = os.getcwd()
+ expand_link=False, prj_dir=None):
+
+ try:
+ # the project we're in might be deleted.
+ # that'll throw an error then.
+ olddir = os.getcwd()
+ except:
+ olddir = os.environ.get("PWD")
+
+ if not prj_dir:
+ prj_dir = olddir
if not pathname:
pathname = getTransActPath(os.path.join(prj_dir, package))
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/osc-0.106/osc/oscerr.py new/osc-0.107/osc/oscerr.py
--- old/osc-0.106/osc/oscerr.py 2008-06-20 15:36:45.000000000 +0200
+++ new/osc-0.107/osc/oscerr.py 2008-07-16 17:14:57.000000000 +0200
@@ -64,6 +64,9 @@
% (self[0], self[1], self[2]))
+class LinkExpandError(OscBaseError):
+ """Exception raised when source link expansion fails"""
+
class UnreadableFile(OscBaseError):
def __init__(self, msg):
OscBaseError.__init__(self)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org