diff --git a/NEWS b/NEWS index 82ed8dfa..20b59506 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ + - support added for osc search 'perl(Foo::Bar)' + 0.130 - New "service" command to run source services locally or trigger a re-run on the server. - setlinkrev is setting now the revision to xsrcmd5 by default to avoid later breakage on indirect links by default. diff --git a/osc/commandline.py b/osc/commandline.py index 61addfdf..9fdace47 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4939,7 +4939,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. osc search \'search term\' osc sm \'source package name\' ('osc search --maintained') osc bse ... ('osc search --binary') - osc se ... + osc se 'perl(Foo::Bar)' ('osc --package perl-Foo-Bar') ${cmd_option_list} """ def build_xpath(attr, what, substr = False): @@ -4948,6 +4948,15 @@ Please submit there instead, or use --nodevelproject to force direct submission. else: return '%s = \'%s\'' % (attr, what) + # support perl package names and symbols: + if re.match('^\w+(::\w+)+$', search_term): + search_term = 'perl-' + re.sub('::','-', search_term) + opts.package = True + + if re.match('^perl\(\w+(::\w+)*\)$', search_term): + search_term = re.sub('\)','', re.sub('(::|\()','-', search_term)) + opts.package = True + if opts.mine: opts.bugowner = True opts.package = True