From 98aa12c9a3901da55ce01825f08ba141bddbae02 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Tue, 27 Jul 2010 15:20:35 +0200 Subject: [PATCH 1/4] fix links that point into the wiki Signed-off-by: Henne Vogelsang --- NEWS | 2 +- README | 2 +- TODO | 2 +- osc/commandline.py | 24 ++++++++++++------------ osc/core.py | 2 +- setup.py | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/NEWS b/NEWS index 4c3d3c4e..da2b5e43 100644 --- a/NEWS +++ b/NEWS @@ -528,7 +528,7 @@ Changes were from Marcus_H, poeml, dmueller, tpatzig. 0.99+patches (interim releases, including Wed Apr 2 16:36:40 CEST 2008) - new command submitreq, to handle "submit requests" (next generation build - service feature). See http://en.opensuse.org/Build_Service/Collaboration + service feature). See http://en.opensuse.org/openSUSE:Build_Service_Collaboration - new link handling: add support for handling linked packages in expanded form. They can be checked out, updated (expanding or unexpanding them), diff --git a/README b/README index bf5f55e5..578416da 100644 --- a/README +++ b/README @@ -130,7 +130,7 @@ stored in the keyring application. USAGE EXAMPLES: -(online at http://en.opensuse.org/Build_Service/CLI ) +(online at http://en.opensuse.org/openSUSE:OSC ) To list existing content on the server osc ls # list projects diff --git a/TODO b/TODO index 1afe3376..84c3f143 100644 --- a/TODO +++ b/TODO @@ -35,7 +35,7 @@ CRITICAL: apiurl/source/prj/pkg The current working directory or its descendants should provide defaults for apiurl, prj and/or pkg. - See also http://en.opensuse.org/Build_Service/Concepts/OscProjPack + See also http://en.opensuse.org/openSUSE:Build_Service_Concept_OscProjPack MAJOR: diff --git a/osc/commandline.py b/osc/commandline.py index dbfcb5d5..783726c9 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -27,11 +27,11 @@ MAN_FOOTER = r""" Type 'osc help ' for more detailed help on a specific subcommand. .PP For additional information, see - * http://wiki.opensuse.org/openSUSE:Build_Service_Tutorial - * http://wiki.opensuse.org/openSUSE:OSC + * http://en.opensuse.org/openSUSE:Build_Service_Tutorial + * http://en.opensuse.org/openSUSE:OSC .PP You can modify osc commands, or roll you own, via the plugin API: - * http://wiki.opensuse.org/openSUSE:OSC_plugins + * http://en.opensuse.org/openSUSE:OSC_plugins .SH AUTHOR osc was written by several authors. This man page is automatically generated. """ @@ -47,11 +47,11 @@ class Osc(cmdln.Cmdln): ${help_list} global ${option_list} For additional information, see - * http://wiki.opensuse.org/openSUSE:Build_Service_Tutorial - * http://wiki.opensuse.org/openSUSE:OSC + * http://en.opensuse.org/openSUSE:Build_Service_Tutorial + * http://en.opensuse.org/openSUSE:OSC You can modify osc commands, or roll you own, via the plugin API: - * http://wiki.opensuse.org/openSUSE:OSC_plugins + * http://en.opensuse.org/openSUSE:OSC_plugins """ name = 'osc' conf = None @@ -723,7 +723,7 @@ class Osc(cmdln.Cmdln): def do_submitrequest(self, subcmd, opts, *args): """${cmd_name}: Create request to submit source into another Project - [See http://wiki.opensuse.org/openSUSE:Build_Service_Collaboration for information + [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration for information on this topic.] See the "request" command for showing and modifing existing requests. @@ -1380,7 +1380,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. def do_changedevelrequest(self, subcmd, opts, *args): """${cmd_name}: Create request to change the devel package definition. - [See http://wiki.opensuse.org/openSUSE:Build_Service_Collaboration + [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration for information on this topic.] See the "request" command for showing and modifing existing requests. @@ -1458,7 +1458,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. def do_request(self, subcmd, opts, *args): """${cmd_name}: Show and modify requests - [See http://wiki.opensuse.org/openSUSE:Build_Service_Collaboration + [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration for information on this topic.] This command shows and modifies existing requests. To create new requests @@ -1895,7 +1895,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. This can be used to make packages available from building that are needed in a project but available only in a different project. Note that this is done at the expense of disk space. See - http://wiki.opensuse.org/openSUSE:Build_Service_Tips_and_Tricks#_link_and__aggregate + http://en.opensuse.org/openSUSE:Build_Service_Tips_and_Tricks#_link_and__aggregate for more information. The DESTPAC name is optional; the source packages' name will be used if @@ -2026,7 +2026,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. def do_mbranch(self, subcmd, opts, *args): """${cmd_name}: Multiple branch of a package - [See http://wiki.opensuse.org/openSUSE:Build_Service_Concept_Maintenance + [See http://en.opensuse.org/openSUSE:Build_Service_Concept_Maintenance for information on this topic.] This command is used for creating multiple links of defined version of a package @@ -2095,7 +2095,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. def do_branch(self, subcmd, opts, *args): """${cmd_name}: Branch a package - [See http://wiki.opensuse.org/openSUSE:Build_Service_Collaboration + [See http://en.opensuse.org/openSUSE:Build_Service_Collaboration for information on this topic.] Create a source link from a package of an existing project to a new diff --git a/osc/core.py b/osc/core.py index 21ad2b45..75cfee79 100644 --- a/osc/core.py +++ b/osc/core.py @@ -127,7 +127,7 @@ new_package_templ = """\ Please have a look at: - http://wiki.opensuse.org/Restricted_formats + http://en.opensuse.org/Restricted_formats Packages containing formats listed there are NOT allowed to be packaged in the openSUSE Buildservice and will be deleted! diff --git a/setup.py b/setup.py index f994cbb4..77086388 100755 --- a/setup.py +++ b/setup.py @@ -58,7 +58,7 @@ setup(name='osc', license = 'GPL', platforms = ['Linux','Mac OSX','Windows XP/2000/NT','Windows 95/98/ME'], keywords = ['openSUSE', 'SUSE', 'RPM', 'build', 'buildservice'], - url = 'http://en.opensuse.org/Build_Service/CLI', + url = 'http://en.opensuse.org/openSUSE:OSC', download_url = 'http://gitorious.org/opensuse/osc', packages = ['osc', 'osc.util'], From d128ff46016d875b98a18d8d065c92fd139f4900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 28 Jul 2010 12:08:40 +0200 Subject: [PATCH 2/4] generated service files are always to be skipped regarding status and commit --- osc/commandline.py | 3 ++- osc/core.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 783726c9..de372871 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -5415,7 +5415,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. p = Package('.') # check if everything is committed for filename in p.filenamelist: - if p.status(filename) != ' ': + state = p.status(filename) + if state != ' ' and state != 'S': raise oscerr.WrongArgs('Please commit your local changes first!') # check if we need to update upstream_rev = p.latest_rev() diff --git a/osc/core.py b/osc/core.py index 75cfee79..53cd6440 100644 --- a/osc/core.py +++ b/osc/core.py @@ -1239,7 +1239,7 @@ class Package: exists_in_store = True - if n in self.skipped: + if n in self.skipped or n.startswith('_service:'): state = 'S' elif exists and not exists_in_store and known_by_meta: state = 'D' @@ -4838,6 +4838,8 @@ def getStatus(pacs, prj_obj=None, verbose=False, quiet=False): lines.append(statfrmt(state, os.path.normpath(os.path.join(prj_obj.dir, p.name)))) for filename in p.todo: + if filename.startswith('_service:'): + continue if filename in p.excluded: continue if filename in p.skipped: From 10f4a6240da2a2e4723624fa435585ab98ecb6e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 28 Jul 2010 12:13:46 +0200 Subject: [PATCH 3/4] remove a file from conflict list in any case, when it gets removed --- osc/commandline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/osc/commandline.py b/osc/commandline.py index de372871..230abd6d 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -3100,6 +3100,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. else: pathn = getTransActPath(p.dir) for filename in p.todo: + p.clear_from_conflictlist(filename) ret, state = p.delete_file(filename, opts.force) if ret: print statfrmt('D', os.path.join(pathn, filename)) From 4c6ffb7607ef42e188d630ff06ded8f6e90e3092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Wed, 28 Jul 2010 15:38:01 +0200 Subject: [PATCH 4/4] prjresult: Do not show package rows or repo columnss by default which are not building at all (in disabled or excluded) A Rudi feature ;) --- osc/commandline.py | 5 ++++- osc/core.py | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 230abd6d..aa74b131 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -3269,6 +3269,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. opts.name_filter = None opts.status_filter = None opts.vertical = None + opts.show_non_building = None self.do_prjresults('prjresults', opts, *args) sys.exit(0) else: @@ -3310,6 +3311,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='show results only for specified repo(s)') @cmdln.option('-V', '--vertical', action='store_true', help='list packages vertically instead horizontally') + @cmdln.option('-S', '--show-non-building', action='store_true', + help='Show also packages which are build disabled or excluded') @cmdln.alias('pr') def do_prjresults(self, subcmd, opts, *args): """${cmd_name}: Shows project-wide build results @@ -3331,7 +3334,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. wd = os.curdir project = store_read_project(wd) - print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical)) + print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical, show_non_building=opts.show_non_building)) @cmdln.option('-q', '--hide-legend', action='store_true', diff --git a/osc/core.py b/osc/core.py index 53cd6440..1f7b1e08 100644 --- a/osc/core.py +++ b/osc/core.py @@ -3784,7 +3784,7 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[], ve return r -def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None): +def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None, show_non_building=None): #print '----------------------------------------' r = [] @@ -3823,7 +3823,7 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non targets.sort() # filter option - if status_filter or name_filter: + if status_filter or name_filter or not show_non_building: pacs_to_show = [] targets_to_show = [] @@ -3849,6 +3849,17 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non if name_filter in pkg: pacs_to_show.append(pkg) + #filter non building states + elif not show_non_building: + for pkg in status.keys(): + print "RUN for", pkg + for repo in status[pkg].keys(): + if status[pkg][repo] != "excluded" and status[pkg][repo] != "disabled": + pacs_to_show.append(pkg) + targets_to_show.append(repo) + break + + pacs = [ i for i in pacs if i in pacs_to_show ] if len(targets_to_show): targets = [ i for i in targets if i in targets_to_show ]