Project

General

Profile

Defect #112

Update string matching/sanitization needs improvement

Added by Deoren Moor over 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Core
Target version:
Start date:
07/18/2013
Due date:
% Done:

0%

Estimated time:
Affected Version:
devel
Resolution:
Fixed
GitHub Issue:

Description

Right now there are two clunky regexes that are used to filter out non-update lines. These will require maintenance going forward to match on new update types/sources. Instead, perhaps there is a better pattern to use that I didn't catch when I first set these up.

UP2DATE_MATCH_ON='i386[[:space:]]*$|noarch[[:space:]]*$'
YUM_MATCH_ON='rhel-.-server-rpms[[:space:]]*$|base[[:space:]]*$|updates?[[:space:]]*$|lockss[[:space:]]*$'

Related issues

Related to Defect #105: Trim excess spaces from patch strings before storing and before comparing themClosed2012-10-05

Related to Defect #114: grep warns of invalid syntax on Ubuntu 12.04 LTSClosed2013-07-26

Associated revisions

Revision 73 (diff)
Added by Deoren Moor over 5 years ago

[issues #112]
Rough draft of what I have in mind.

Revision 75 (diff)
Added by Deoren Moor over 5 years ago

[issues #112]
Testing different approaches to abstract the bulk of the logic out into the sanitize_string() function.

Revision 76 (diff)
Added by Deoren Moor over 5 years ago

[issues #112]
I have a working sanitize_string() function that handles input from calculate_updates_via_apt() and calculate_updates_via_yum() without requiring a lot of preprocessing.

Revision 77 (diff)
Added by Deoren Moor over 5 years ago

[issues #112]
Incorporated changes tested within massage_output.sh:

  • massage_string()
    • Better documentation
    • Beefed up transformation of strings to make them more readable (tested on Ubuntu 10 and CentOS 5.x)
  • Removed old 'UP2DATE_MATCH_ON' and 'YUM_MATCH_ON' regexes now that massage_string() has been enhanced

History

#1 Updated by Deoren Moor about 4 years ago

  • Status changed from Assigned to Closed
  • Resolution set to Fixed

As the commit log entries show this was resolved a while back.

Also available in: Atom PDF