Bug 19382

Summary: drakrpm crashed because of malformed skip.list
Product: Mageia Reporter: Jüri Ivask <jyri2000>
Component: RPM PackagesAssignee: Mageia tools maintainers <mageiatools>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Normal CC: marja11
Version: Cauldron   
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: rpmdrake-6.22-2.mga6 CVE:
Status comment:

Description Jüri Ivask 2016-09-16 07:31:56 CEST
The "drakrpm" program crashed. Drakbug-17.54 caught it.

Just started drakrpm...

Quantifier follows nothing in regex; marked by <-- HERE in m/(?:* <-- HERE -5.7.95*)/ at /usr/lib/perl5/vendor_perl/5.22.2/i386-linux-thread-multi/URPM/Resolve.pm line 1949.
Perl's trace:
drakbug::bug_handler() called from /usr/lib/perl5/vendor_perl/5.22.2/i386-linux-thread-multi/URPM/Resolve.pm:1949
URPM::compute_flags() called from /usr/lib/perl5/vendor_perl/5.22.2/urpm/media.pm:845
urpm::media::_compute_flags_for_skiplist() called from /usr/lib/perl5/vendor_perl/5.22.2/urpm/media.pm:739
urpm::media::configure() called from /usr/lib/perl5/vendor_perl/5.22.2/Rpmdrake/open_db.pm:157
Rpmdrake::open_db::open_urpmi_db() called from /usr/lib/perl5/vendor_perl/5.22.2/Rpmdrake/pkg.pm:444
Rpmdrake::pkg::get_pkgs() called from /usr/lib/perl5/vendor_perl/5.22.2/Rpmdrake/gui.pm:642
Rpmdrake::gui::pkgs_provider() called from /usr/libexec/drakrpm:805
main::__ANON__() called from /usr/lib/perl5/vendor_perl/5.22.2/rpmdrake.pm:415
rpmdrake::slow_func() called from /usr/libexec/drakrpm:805
main::run_treeview_dialog() called from /usr/libexec/drakrpm:848

Theme name: Adwaita
Kernel version = 4.7.3-server-1.mga6
Distribution=Mageia release 6 (Cauldron) for i586
CPU=Intel(R) Core(TM)2 Duo CPU     P8600  @ 2.40GHz
Comment 1 Jüri Ivask 2016-09-16 09:16:22 CEST
That was caused by testing different expressions in urpmi skip.lst
Just tried to avoid installing plasma 5.7.95 packages on the basis of version number.
Removing that "incorrect" expression from skip.lst makes drakrpm to start OK again...
Comment 2 Samuel Verschelde 2016-09-16 09:19:21 CEST
Can you attach the incorrect skip.lst file? That could help debugging the issue so that we can help drakrpm better react to such situations.
Samuel Verschelde 2016-09-16 09:29:56 CEST

Summary: drakrpm crashed => drakrpm crashed because of malformed skip.lst

Comment 3 Jüri Ivask 2016-09-16 10:03:55 CEST
Just the default file + the following line:

/*-5.7.95*/

BTW is there documentation how to make rules for skip.list and is it possible to create a rule on the basis of version number at all?
Jüri Ivask 2016-09-16 10:16:54 CEST

Summary: drakrpm crashed because of malformed skip.lst => drakrpm crashed because of malformed skip.list

Comment 4 Marja Van Waes 2016-09-20 20:05:35 CEST
(In reply to Jüri Ivask from comment #3)
> Just the default file + the following line:
> 
> /*-5.7.95*/
> 
> BTW is there documentation how to make rules for skip.list and is it
> possible to create a rule on the basis of version number at all?

from the man page (man urpmi.files):

       /etc/urpmi/skip.list
           The list of packages that should not be
           automatically updated when using
           --auto-select. It contains one package
           expression per line; either a package name,
           or a regular expression (if enclosed in
           slashes /) to match the name of packages
           against. (Actually, it's matched against the
           full name of the package, which has the form
           name-version-release.arch.)


Please try again with just 
    
     /-5.7.95/

in the skip.list

CC: (none) => marja11
Assignee: bugsquad => mageiatools

Comment 5 Marja Van Waes 2016-09-22 16:36:24 CEST
(In reply to Marja van Waes from comment #4)

 
> 
> Please try again with just 
>     
>      /-5.7.95/
> 
> in the skip.list

That works fine, by the way, but it might, of course, also make you skip a possible package with e.g. "-547195" as part of a very long git version.

So escaping the dots and doing "/-5\.7\.95/" is better.

The "*" in your string didn't work, because there it's about having the previous character 1 or more times. There was no previous character for the first *, so it failed.

Keeping this report open, because I think it would be nice to add more valid examples to the skip.list file.

(I doubt preventing a Plasma5 upgrade will work easily with adding the matching versions to the skip list, though, unless you keep an eye on the changelog mailing list and block the versions of about anything neoclust pushes  ;-) )

Summary: drakrpm crashed because of malformed skip.list => drakrpm crashed because of malformed skip.list - it would be nice to have more valid examples in that file
Severity: normal => enhancement

Comment 6 Marja Van Waes 2016-09-22 16:50:41 CEST
2016:09:22:16:40 < stormi> marja: to me bug 19382 is not an enhancement, it's a bug. You don't crash when you have an invalid configuration file, you throw and error.

2016:09:22:16:41 < stormi> You kind of hijacked it into an enhancement request for examples in the file

Reverting severity to normal (also because I don't manage to get urpmi to crash over a similar wrong configuration, so a rpmdrake crash seems avoidable)

Severity: enhancement => normal

Marja Van Waes 2016-09-22 16:51:00 CEST

Summary: drakrpm crashed because of malformed skip.list - it would be nice to have more valid examples in that file => drakrpm crashed because of malformed skip.list

Comment 7 Marja Van Waes 2016-09-22 17:02:07 CEST
(In reply to Marja van Waes from comment #6)

> 
> Reverting severity to normal (also because I don't manage to get urpmi to
> crash over a similar wrong configuration, so a rpmdrake crash seems
> avoidable)

Forget that, when I do exactly the same, so when I start the string to match with a *, then urpmi _quits_, after as good as the same message about "Quantifier follows nothing in regex"

the only thing I don't get is a backtrace :-þ
Comment 8 Jüri Ivask 2016-09-23 09:40:05 CEST
Thanks Marja for sharing knowledge!
However, I "pulled the plug" and upgraded to Plasma 5.8 beta - no regrets so far... :)
Comment 9 Marja Van Waes 2016-10-15 23:43:21 CEST
Dup of bug 15353, which has a patch.

*** This bug has been marked as a duplicate of bug 15353 ***

Status: NEW => RESOLVED
Resolution: (none) => DUPLICATE