Bug 583721 - yum's applydate does not properly catch time ranges
Summary: yum's applydate does not properly catch time ranges
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: logwatch
Version: 5.5
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jan Synacek
QA Contact: David Kutálek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-19 14:31 UTC by Peter Bieringer
Modified: 2013-04-12 20:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-29 11:17:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch (569 bytes, patch)
2012-06-27 12:59 UTC, Jan Synacek
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:1217 0 normal SHIPPED_LIVE logwatch bug fix update 2012-08-29 15:15:59 UTC

Description Peter Bieringer 2010-04-19 14:31:58 UTC
Description of problem:
yum's applydate is out-of-date in RHEL 5.5

Version-Release number of selected component (if applicable):
logwatch-7.3-8.el5

How reproducible:
Always


Steps to Reproduce:
1. logwatch --print --range 'since April 13'
  
Actual results:
 --------------------- yum Begin ------------------------


 **Unmatched Entries**
 ..:..:..|04/15/10 ..:..:..|04/16/10 ..:..:..|04/17/10 ..:..:..|04/18/10 ..:..:..|04/19/10 ..:..:..|04/19/10 ..:..:..) Updated: venyon-system-adjustments-0-0.3.0.rev.236.vy.noarch
 ..:..:..|04/15/10 ..:..:..|04/16/10 ..:..:..|04/17/10 ..:..:..|04/18/10 ..:..:..|04/19/10 ..:..:..|04/19/10 ..:..:..) Updated: tzdata-2010f-10.el5.i386
 ..:..:..|04/15/10 ..:..:..|04/16/10 ..:..:..|04/17/10 ..:..:..|04/18/10 ..:..:..|04/19/10 ..:..:..|04/19/10 ..:..:..) Erased: redhat-menus
 ..:..:..|04/15/10 ..:..:..|04/16/10 ..:..:..|04/17/10 ..:..:..|04/18/10 ..:..:..|04/19/10 ..:..:..|04/19/10 ..:..:..) Erased: redhat-menus
 ..:..:..|04/15/10 ..:..:..|04/16/10 ..:..:..|04/17/10 ..:..:..|04/18/10 ..:..:..|04/19/10 ..:..:..|04/19/10 ..:..:..) Installed: perl-DateManip-5.44-1.2.1.noarch

 ---------------------- yum End -------------------------


Expected results:

logwatch --print --range Today
--------------------- yum Begin ------------------------


 Packages Installed:
    perl-DateManip-5.44-1.2.1.noarch

 Packages Updated:
    venyon-system-adjustments-0-0.3.0.rev.236.vy.noarch
    tzdata-2010f-10.el5.i386

 Packages Erased:
    redhat-menus

 ---------------------- yum End -------------------------

Additional info:

Looks like /usr/share/logwatch/scripts/logfiles/yum/applydate is outdated in RHEL 5.5 logwatch

File from Fedora 12 (logwatch-7.3.6-50.fc12.noarch) looks like 

while (defined($ThisLine = <STDIN>)) {
    # Here we actually remove the dates, as well
    if ($ThisLine =~ s/^$SearchNewDate //o ||
        $ThisLine =~ s/$SearchDate //o) {
      print $ThisLine;
    }
}


while RHEL 5.5 looks like

while (defined($ThisLine = <STDIN>)) {
    # Convert new (yum 2.1) format to old, as yum service script expects that
    if ($ThisLine =~ s/$SearchNewDate /$SearchDate /o ||
        $ThisLine =~ m/$SearchDate /o) {
      print $ThisLine;
    }
}

Comment 1 RHEL Program Management 2011-01-11 20:29:17 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2011-01-11 23:02:27 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 3 RHEL Program Management 2011-05-31 13:22:45 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 4 Jan Synacek 2012-06-27 12:59:17 UTC
Created attachment 594761 [details]
Patch

Fix yum's applydate.

Comment 8 errata-xmlrpc 2012-08-29 11:17:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-1217.html


Note You need to log in before you can comment on or make changes to this bug.