Bug 759467

Summary: RFE: Allow multiple groups in re
Product: [Fedora] Fedora Reporter: Jaroslav Škarvada <jskarvad>
Component: cnucnuAssignee: Susi Lehtola <susi.lehtola>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: opensource, susi.lehtola
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:3123c228
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-31 14:12:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
Proposed patch
none
Improved patch none

Description Jaroslav Škarvada 2011-12-02 13:03:43 UTC
abrt version: 1.1.18
architecture: x86_64
comment: It shouldn't abrt, but write some error and cleanly exit.
component: cnucnu
executable: /usr/bin/cnucnu
kernel: 2.6.35.14-106.fc14.x86_64
package: cnucnu-0-0.7.20110308git2033ec78.fc14
reason: helper.py:175:split_rc:TypeError: expected string or buffer
release: Fedora release 14 (Laughlin)
time: 1322830740
uid: 500

backtrace
-----
helper.py:175:split_rc:TypeError: expected string or buffer

Traceback (most recent call last):
  File "/usr/bin/cnucnu", line 71, in <module>
    if not shell.cmdloop():
  File "/usr/lib64/python2.7/cmd.py", line 143, in cmdloop
    stop = self.postcmd(stop, line)
  File "/usr/lib/python2.7/site-packages/cnucnu/checkshell.py", line 127, in postcmd
    print "Latest:", self.package.latest_upstream
  File "/usr/lib/python2.7/site-packages/cnucnu/package_list.py", line 271, in latest_upstream
    self._latest_upstream = upstream_max(self.upstream_versions)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 199, in upstream_max
    list.sort(cmp=upstream_cmp)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 148, in upstream_cmp
    v1, rc1 = split_rc(v1)
  File "/usr/lib/python2.7/site-packages/cnucnu/helper.py", line 175, in split_rc
    match = RC.match(version)
TypeError: expected string or buffer

Local variables in innermost frame:
re: <module 're' from '/usr/lib64/python2.7/re.pyc'>
version: ('3', '3_001')
RC: <_sre.SRE_Pattern object at 0x26a4810>

How to reproduce
-----
1. cnucnu --shell
2. https://github.com/EttusResearch/UHD-Mirror/archives/master
3. release_0*([0-9]+)_0*([0-9]+_[0-9]+)

Comment 1 Jaroslav Škarvada 2011-12-02 13:03:46 UTC
Created attachment 539622 [details]
File: backtrace

Comment 2 Jaroslav Škarvada 2011-12-02 14:40:31 UTC
Created attachment 539671 [details]
Proposed patch

Patch to allow multiple groups in re. All groups are concat.

Comment 3 Jaroslav Škarvada 2011-12-02 16:00:23 UTC
Created attachment 539693 [details]
Improved patch

Comment 4 Jaroslav Škarvada 2011-12-02 16:01:33 UTC
This patch allows parsing of more complex patterns, e.g. the uhd from backtrace.

Comment 5 Till Maas 2013-03-04 19:57:39 UTC
This feature has been added to cnucnu's git repository on fedorapeople and can be used now in the wiki. I will prepare an update for Fedora soon to allow to test it using the cnucnu shell.

Comment 6 Jaroslav Škarvada 2013-03-05 08:47:35 UTC
Thanks.

Comment 7 Till Maas 2015-01-31 14:12:58 UTC
FYI: cnucnu will be replaced by anitya/the-new-hotness soon:
https://github.com/fedora-infra/anitya
https://github.com/fedora-infra/the-new-hotness

Therefore a new update for Fedora does not make much sense.