Hello community,
here is the log from the commit of package osc for openSUSE:Factory checked in at 2016-09-16 11:02:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/osc (Old)
and /work/SRC/openSUSE:Factory/.osc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "osc"
Changes:
--------
--- /work/SRC/openSUSE:Factory/osc/osc.changes 2016-08-03 11:44:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.osc.new/osc.changes 2016-09-16 11:02:44.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 15 11:28:57 UTC 2016 - adrian@suse.de
+
+- 0.155.1
+ - fixed "osc add" of new package container
+
+-------------------------------------------------------------------
Old:
----
osc-0.155.0.tar.gz
New:
----
osc-0.155.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ osc.spec ++++++
--- /var/tmp/diff_new_pack.EWpvUP/_old 2016-09-16 11:02:45.000000000 +0200
+++ /var/tmp/diff_new_pack.EWpvUP/_new 2016-09-16 11:02:45.000000000 +0200
@@ -16,10 +16,10 @@
#
-%define version_unconverted 0.155.0
+%define version_unconverted 0.155.1
Name: osc
-Version: 0.155.0
+Version: 0.155.1
Release: 0
Summary: Open Build Service Commander
License: GPL-2.0+
++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.EWpvUP/_old 2016-09-16 11:02:46.000000000 +0200
+++ /var/tmp/diff_new_pack.EWpvUP/_new 2016-09-16 11:02:46.000000000 +0200
@@ -1,5 +1,5 @@
pkgname=osc
-pkgver=0.155.0
+pkgver=0.155.1
pkgrel=0
pkgdesc="Open Build Service client"
arch=('i686' 'x86_64')
++++++ _service ++++++
--- /var/tmp/diff_new_pack.EWpvUP/_old 2016-09-16 11:02:46.000000000 +0200
+++ /var/tmp/diff_new_pack.EWpvUP/_new 2016-09-16 11:02:46.000000000 +0200
@@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="version">0.155.0</param>
- <param name="revision">0.155.0</param>
+ <param name="version">0.155.1</param>
+ <param name="revision">0.155.1</param>
<param name="url">git://github.com/openSUSE/osc.git</param>
<param name="scm">git</param>
</service>
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.EWpvUP/_old 2016-09-16 11:02:46.000000000 +0200
+++ /var/tmp/diff_new_pack.EWpvUP/_new 2016-09-16 11:02:46.000000000 +0200
@@ -1,4 +1,4 @@
-osc (0.155.0) unstable; urgency=low
+osc (0.155.1) unstable; urgency=low
- Update to 0.135.0
-- Adrian Schroeter Wed, 28 Jun 2012 10:00:00 +0200
++++++ osc-0.155.0.tar.gz -> osc-0.155.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/.travis.yml new/osc-0.155.1/.travis.yml
--- old/osc-0.155.0/.travis.yml 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/.travis.yml 2016-09-13 12:39:24.000000000 +0200
@@ -1,12 +1,21 @@
language: python
python:
- - "2.7"
- - "3.3"
- - "3.4"
- - "3.5-dev"
+- '2.7'
+- '3.3'
+- '3.4'
+- 3.5-dev
addons:
apt:
packages:
- diffstat
sudo: false
script: cd tests; python suite.py
+deploy:
+ provider: pypi
+ user: suse
+ password:
+ secure: R4+YNPW2tsiY06hibGvONYn0//1z1QdcY8VmNbYpIRly4eTAbPE9uejKpyuflUkznpEkoqCdFzi5FNFhgat9N+AkIKyX9NTkf0oxaKKbdqBM7H1V8bqLYlAO479262spRyO0ee5fV5v6g81AFjncIV+pGjtQ0Vg/sjVcvGa61bs=
+ on:
+ tags: true
+ distributions: sdist bdist_wheel
+ repo: openSUSE/osc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/NEWS new/osc-0.155.1/NEWS
--- old/osc-0.155.0/NEWS 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/NEWS 2016-09-13 12:39:24.000000000 +0200
@@ -1,3 +1,6 @@
+0.156
+ -
+
0.155
- osc service runall: runs all service local, independend of the mode
This allows to create local files even when disabled or
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/dist/osc.complete new/osc-0.155.1/dist/osc.complete
--- old/osc-0.155.0/dist/osc.complete 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/dist/osc.complete 2016-09-13 12:39:24.000000000 +0200
@@ -635,7 +635,7 @@
fi
;;
sr|submitpac|submitreq|submitrequest)
- opts=(--help --yes --diff --no-update --no-cleanup --cleanup --seperate-requests
+ opts=(--help --yes --diff --no-update --no-cleanup --cleanup --separate-requests
--nodevelproject --supersede --revision)
if ((count == 1)) ; then
builtin compgen -W "${osccmds[*]}" -- "${cmdline[count]}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/babysitter.py new/osc-0.155.1/osc/babysitter.py
--- old/osc-0.155.0/osc/babysitter.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/babysitter.py 2016-09-13 12:39:24.000000000 +0200
@@ -122,6 +122,7 @@
if '<summary>' in body:
msg = body.split('<summary>')[1]
msg = msg.split('</summary>')[0]
+ msg = msg.replace('<', '<').replace('>' , '>').replace('&', '&')
print(msg, file=sys.stderr)
if e.code >= 500 and e.code <= 599:
print('\nRequest: %s' % e.filename)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/build.py new/osc-0.155.1/osc/build.py
--- old/osc-0.155.0/osc/build.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/build.py 2016-09-13 12:39:24.000000000 +0200
@@ -427,8 +427,6 @@
continue
if path.endswith('.patch.rpm') or path.endswith('.delta.rpm'):
continue
- if path.find('-debuginfo-') > 0:
- continue
packageQuery = packagequery.PackageQuery.query(path)
packageQueries.add(packageQuery)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/commandline.py new/osc-0.155.1/osc/commandline.py
--- old/osc-0.155.0/osc/commandline.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/commandline.py 2016-09-13 12:39:24.000000000 +0200
@@ -1042,8 +1042,10 @@
@cmdln.option('--nodevelproject', action='store_true',
help='do not follow a defined devel project ' \
'(primary project where a package is developed)')
+ @cmdln.option('--separate-requests', action='store_true',
+ help='Create multiple requests instead of a single one (when command is used for entire project)')
@cmdln.option('--seperate-requests', action='store_true',
- help='Create multiple request instead of a single one (when command is used for entire project)')
+ help='Deprecated (wrong spelling - see --separate-requests)')
@cmdln.option('--cleanup', action='store_true',
help='remove package if submission gets accepted (default for home:<id>:branch projects)')
@cmdln.option('--no-cleanup', action='store_true',
@@ -1079,6 +1081,10 @@
if opts.cleanup and opts.no_cleanup:
raise oscerr.WrongOptions('\'--cleanup\' and \'--no-cleanup\' are mutually exclusive')
+ if opts.seperate_requests:
+ # compatibility option will be removed in the future
+ print('--seperate-requests is deprecated (use '
+ '--separate-requests)', file=sys.stderr)
src_update = conf.config['submitrequest_on_accept_action'] or None
# we should check here for home:<id>:branch and default to update, but that would require OBS 1.7 server
@@ -1180,7 +1186,7 @@
sys.exit("Please fix this first")
# submitting this package
- if opts.seperate_requests:
+ if opts.separate_requests or opts.seperate_requests:
# create a single request
result = create_submit_request(apiurl, project, p)
if not result:
@@ -2900,10 +2906,11 @@
raise oscerr.WrongArgs('Too many arguments.')
if len(args) == 0:
- if is_project_dir(os.curdir):
+ if is_package_dir(os.curdir):
+ source_project = store_read_project(os.curdir)
+ source_package = store_read_package(os.curdir)
+ elif is_project_dir(os.curdir):
source_project = store_read_project(os.curdir)
- elif is_package_dir(os.curdir):
- source_package = store_read_package(wd)
else:
raise oscerr.WrongArgs('Too few arguments.')
if len(args) > 0:
@@ -4432,17 +4439,8 @@
addGitSource(arg)
else:
addDownloadUrlService(arg)
- continue
- if os.path.isdir(arg):
- resp = raw_input("%s is a directory, do you want to archive it for submission? (y/n)" % (arg))
- if resp not in ('y', 'Y'):
- continue
- archive = ("%s.obscpio" % arg)
- run_external("find %s | cpio -o -H newc > %s" % (arg, archive), shell=True)
- addFiles([archive])
- continue
-
- addFiles([arg])
+ else:
+ addFiles([arg])
def do_mkpac(self, subcmd, opts, *args):
@@ -4553,8 +4551,19 @@
${cmd_usage}
${cmd_option_list}
"""
- args = parseargs(args)
+ try:
+ self._commit(subcmd, opts, args)
+ except oscerr.ExtRuntimeError as e:
+ print("ERROR: service run failed", e, file=sys.stderr)
+ return 1
+ except oscerr.PackageNotInstalled as e:
+ print("ERROR: please install %s " % e.args, end='')
+ print("or use the --noservice option")
+ return 1
+
+ def _commit(self, subcmd, opts, args):
+ args = parseargs(args)
if opts.skip_validation:
print("WARNING: deprecated option --skip-validation ignored.", file=sys.stderr)
@@ -4575,25 +4584,21 @@
arg_list = args[:]
for arg in arg_list:
if conf.config['do_package_tracking'] and is_project_dir(arg):
- try:
- prj = Project(arg)
- if not msg and not opts.no_message:
- msg = edit_message()
-
- # check any of the packages is a link, if so, as for branching
- pacs = (Package(os.path.join(prj.dir, pac))
- for pac in prj.pacs_have if prj.get_state(pac) == ' ')
- can_branch = False
- if any(pac.is_link_to_different_project() for pac in pacs):
- repl = raw_input('Some of the packages are links to a different project!\n' \
- 'Create a local branch before commit? (y|N) ')
- if repl in('y', 'Y'):
- can_branch = True
-
- prj.commit(msg=msg, skip_local_service_run=skip_local_service_run, verbose=opts.verbose, can_branch=can_branch)
- except oscerr.ExtRuntimeError as e:
- print("ERROR: service run failed", e, file=sys.stderr)
- return 1
+ prj = Project(arg)
+ if not msg and not opts.no_message:
+ msg = edit_message()
+
+ # check any of the packages is a link, if so, as for branching
+ pacs = (Package(os.path.join(prj.dir, pac))
+ for pac in prj.pacs_have if prj.get_state(pac) == ' ')
+ can_branch = False
+ if any(pac.is_link_to_different_project() for pac in pacs):
+ repl = raw_input('Some of the packages are links to a different project!\n' \
+ 'Create a local branch before commit? (y|N) ')
+ if repl in('y', 'Y'):
+ can_branch = True
+
+ prj.commit(msg=msg, skip_local_service_run=skip_local_service_run, verbose=opts.verbose, can_branch=can_branch)
args.remove(arg)
pacs = findpacs(args)
@@ -6892,9 +6897,9 @@
print("")
return
except HTTPError as e:
- if e.code == 400:
- # skip it ... try again with old style below
- pass
+ if e.code != 400:
+ raise e
+ # skip it ... try again with old style below
res = get_user_projpkgs(apiurl, user, role_filter, exclude_projects,
'project' in what, 'package' in what,
@@ -6904,18 +6909,19 @@
# if list of packages is empty user is maintainer of the whole project
request_todo = {}
+ dummy_elm = ET.Element('dummy')
roles = {}
if len(what.keys()) == 2:
- for i in res.get('project_id', res.get('project', {})).findall('project'):
+ for i in res.get('project_id', res.get('project', dummy_elm)).findall('project'):
request_todo[i.get('name')] = []
roles[i.get('name')] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
- for i in res.get('package_id', res.get('package', {})).findall('package'):
+ for i in res.get('package_id', res.get('package', dummy_elm)).findall('package'):
prj = i.get('project')
roles['/'.join([prj, i.get('name')])] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
if not prj in request_todo or request_todo[prj] != []:
request_todo.setdefault(prj, []).append(i.get('name'))
else:
- for i in res.get('project_id', res.get('project', {})).findall('project'):
+ for i in res.get('project_id', res.get('project', dummy_elm)).findall('project'):
roles[i.get('name')] = [p.get('role') for p in i.findall('person') if p.get('userid') == user]
if list_requests:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/core.py new/osc-0.155.1/osc/core.py
--- old/osc-0.155.0/osc/core.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/core.py 2016-09-13 12:39:24.000000000 +0200
@@ -5,7 +5,7 @@
from __future__ import print_function
-__version__ = '0.155.0'
+__version__ = '0.155git'
# __store_version__ is to be incremented when the format of the working copy
# "store" changes in an incompatible way. Please add any needed migration
@@ -3062,12 +3062,19 @@
return args
-def findpacs(files, progress_obj=None):
+def findpacs(files, progress_obj=None, fatal=True):
"""collect Package objects belonging to the given files
and make sure each Package is returned only once"""
pacs = []
+ no_pacs = []
for f in files:
- p = filedir_to_pac(f, progress_obj)
+ try:
+ p = filedir_to_pac(f, progress_obj)
+ except oscerr.OscBaseError as e:
+ if fatal:
+ raise e
+ no_pacs.append(f)
+ continue
known = None
for i in pacs:
if i.name == p.name:
@@ -3077,6 +3084,8 @@
i.merge(p)
else:
pacs.append(p)
+ if not fatal:
+ return pacs, no_pacs
return pacs
@@ -3758,7 +3767,9 @@
# old API servers (e.g. 2.3.5) do not know the 'nofilename' parameter, so retry without
if e.code == 400 and nofilename:
return get_project_sourceinfo(apiurl, project, False, *packages)
- if e.code != 414:
+ # an uri too long error is sometimes handled as status 500
+ # (depending, e.g., on the apache2 configuration)
+ if e.code not in (414, 500):
raise
if len(packages) == 1:
raise oscerr.APIError('package name too long: %s' % packages[0])
@@ -4310,6 +4321,8 @@
for i in res['package_id'].findall('package'):
if not i.get('project') in projects:
projpkgs.setdefault(i.get('project'), []).append(i.get('name'))
+ if not projpkgs:
+ return []
xpath = ''
for prj, pacs in projpkgs.items():
if not len(pacs):
@@ -5525,11 +5538,12 @@
elif result.get('code') in waiting_states:
waiting = True
break
- elif (result.get('code') == 'succeeded'
- and result.get('repostate') != 'published'):
- waiting = True
- break
-
+ else:
+ pkg = result.find('status')
+ if pkg is not None and pkg.get('code') in waiting_states:
+ waiting = True
+ break
+
if not wait or not waiting:
break
else:
@@ -6746,15 +6760,28 @@
prj_apiurl = store_read_apiurl(prj_dir, defaulturl=False)
Package.init_package(prj_apiurl, prj_name, pac_dir, filename)
elif is_package_dir(filename) and conf.config['do_package_tracking']:
- raise oscerr.PackageExists(store_read_project(filename), store_read_package(filename),
- 'osc: warning: \'%s\' is already under version control' % filename)
+ print('osc: warning: \'%s\' is already under version control' % filename)
+ pacs.remove(filename)
elif os.path.isdir(filename) and is_project_dir(prj_dir):
raise oscerr.WrongArgs('osc: cannot add a directory to a project unless ' \
'\'do_package_tracking\' is enabled in the configuration file')
- elif os.path.isdir(filename):
- print('skipping directory \'%s\'' % filename)
- pacs.remove(filename)
- pacs = findpacs(pacs)
+
+ pacs, no_pacs = findpacs(pacs, fatal=False)
+ for filename in no_pacs:
+ filename = os.path.normpath(filename)
+ directory = os.path.join(filename, os.pardir)
+ if not is_package_dir(directory):
+ print('osc: warning: \'%s\' cannot be associated to a package' % filename)
+ continue
+ resp = raw_input("%s is a directory, do you want to archive it for submission? (y/n) " % (filename))
+ if resp not in ('y', 'Y'):
+ continue
+ archive = "%s.obscpio" % filename
+ # XXX: hmm we should use subprocess.Popen here (to avoid all the
+ # issues that come with shell=True...)
+ run_external("find %s | cpio -o -H newc > %s" % (filename, archive), shell=True)
+ pacs.extend(findpacs([archive]))
+
for pac in pacs:
if conf.config['do_package_tracking'] and not pac.todo:
prj = prj_obj or Project(os.path.dirname(pac.absdir), False)
@@ -6774,7 +6801,11 @@
if filename in pac.excluded:
print('osc: warning: \'%s\' is excluded from a working copy' % filename, file=sys.stderr)
continue
- pac.addfile(filename)
+ try:
+ pac.addfile(filename)
+ except oscerr.PackageFileConflict as e:
+ fname = os.path.join(getTransActPath(pac.dir), filename)
+ print('osc: warning: \'%s\' is already under version control' % fname)
def getPrjPacPaths(path):
"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/oscerr.py new/osc-0.155.1/osc/oscerr.py
--- old/osc-0.155.0/osc/oscerr.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/oscerr.py 2016-09-13 12:39:24.000000000 +0200
@@ -115,10 +115,10 @@
Exception raised when a package is not installed on local system
"""
def __init__(self, pkg):
- OscBaseError.__init__(self, pkg)
+ OscBaseError.__init__(self, (pkg,))
def __str__(self):
- return 'Package %s is required for this operation' % ''.join(self.args)
+ return 'Package %s is required for this operation' % self.args
class SignalInterrupt(Exception):
"""Exception raised on SIGTERM and SIGHUP."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/osc-0.155.0/osc/util/packagequery.py new/osc-0.155.1/osc/util/packagequery.py
--- old/osc-0.155.0/osc/util/packagequery.py 2016-07-29 16:03:59.000000000 +0200
+++ new/osc-0.155.1/osc/util/packagequery.py 2016-09-13 12:39:24.000000000 +0200
@@ -14,8 +14,8 @@
wanted architecture and if it has a greater version than the current value.
"""
- # map debian arches to common obs arches
- architectureMap = {'i386': ['i586', 'i686'], 'amd64': ['x86_64'], 'ppc64el': ['ppc64le']}
+ # map debian and rpm arches to common obs arches
+ architectureMap = {'i386': ['i586', 'i686'], 'amd64': ['x86_64'], 'ppc64el': ['ppc64le'], 'armv6hl': ['armv6l'], 'armv7hl': ['armv7l']}
def __init__(self, wanted_architecture):
self.wanted_architecture = wanted_architecture
++++++ osc.dsc ++++++
--- /var/tmp/diff_new_pack.EWpvUP/_old 2016-09-16 11:02:46.000000000 +0200
+++ /var/tmp/diff_new_pack.EWpvUP/_new 2016-09-16 11:02:46.000000000 +0200
@@ -1,6 +1,6 @@
Format: 1.0
Source: osc
-Version: 0.155.0
+Version: 0.155.1
Binary: osc
Maintainer: Adrian Schroeter
Architecture: any