[Fedora-security-commits] fedora-security/tools add-tracking-bugs, 1.2.2.4, 1.2.2.5 check-updates, 1.1.2.2, 1.1.2.3
fedora-security-commits at redhat.com
fedora-security-commits at redhat.com
Thu Jan 3 11:22:22 UTC 2008
Author: lkundrak
Update of /cvs/fedora/fedora-security/tools
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12153
Modified Files:
Tag: lkundrak-tools-ng
add-tracking-bugs check-updates
Log Message:
make check-updates work again
Index: add-tracking-bugs
===================================================================
RCS file: /cvs/fedora/fedora-security/tools/add-tracking-bugs,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -r1.2.2.4 -r1.2.2.5
--- add-tracking-bugs 2 Jan 2008 19:09:55 -0000 1.2.2.4
+++ add-tracking-bugs 3 Jan 2008 11:22:20 -0000 1.2.2.5
@@ -55,7 +55,7 @@
"\n\n";
my $comment_rawhide =
- 'Please close this bug withe RAWHIDE once is it fixed in devel '.
+ 'Please close this bug with RAWHIDE once is it fixed in devel '.
'branch. Do *not* include the bug id of thid bug in the commit message'.
"\n\n";
Index: check-updates
===================================================================
RCS file: /cvs/fedora/fedora-security/tools/Attic/check-updates,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- check-updates 2 Jan 2008 19:09:55 -0000 1.1.2.2
+++ check-updates 3 Jan 2008 11:22:20 -0000 1.1.2.3
@@ -4,36 +4,29 @@
# Dump what's VULNERABLE, but been subject to an update
# Lubomir Kundrak <lkundrak at redhat.com>
-die 'Needs rewrite for object-oriented Audit interface';
-=cut
-
#use warnings;
use strict;
use Libexig::Audit;
use Libexig::Bodhi;
-use Data::Dumper;
# Parse the audit file
-my @audit = Libexig::Audit::parse_audit (<>);
+my $audit = new Libexig::Audit ({file => $ARGV[0]});
-foreach my $entry (@audit) {
+foreach my $entry (@{$audit->{audit}}) {
$entry->{'status'} eq 'VULNERABLE' or next;
# See if the VULNERABLE bug was referenced by an update
- foreach my $u (Libexig::Bodhi::get_updates ($entry->{'package'})) {
- $u->{'_Bugs'}->{$entry->{'bug'}} or next;
+ foreach my $u (Libexig::Bodhi::get_updates ($entry->{component})) {
+ $u->{'_Bugs'}->{$entry->{bug}} or next;
# Modify the line accordingly
- $entry->{'since'} = $u->{'Update ID'};
- $u->{'Status'} eq 'stable' and $entry->{'status'} = 'fixed';
+ $entry->{since} = $u->{'Update ID'};
+ $u->{'Status'} eq 'stable' and $entry->{status} = 'fixed';
Libexig::Audit::update_entry ($entry);
last;
};
}
-# Spit out the output
-foreach my $entry (@audit) {
- print $entry->{'line'};
-}
+$audit->save;
More information about the Fedora-security-commits
mailing list