Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 583721

Summary: yum's applydate does not properly catch time ranges
Product: Red Hat Enterprise Linux 5 Reporter: Peter Bieringer <pb>
Component: logwatchAssignee: Jan Synacek <jsynacek>
Status: CLOSED ERRATA QA Contact: David Kutálek <dkutalek>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: ovasik
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-29 11:17:00 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
Patch none

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