From a3bc300c72f6dc74cddc8f78ac38f97904a02f1d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 10 Aug 2007 18:52:10 +0000 Subject: - genhdlist2: o error message when parse_hdlist (partially) fail --- NEWS | 1 + genhdlist2 | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 75e765c..d43c34b 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ - genhdlist2: + o error message when parse_hdlist (partially) fail o handle old-rpms.lst (to be generated by youri) which will allow keeping rpms for some time without having in hdlist (useful for installs which expect the pkgs to be in sync in hdlist during diff --git a/genhdlist2 b/genhdlist2 index b373ab7..89b01d6 100644 --- a/genhdlist2 +++ b/genhdlist2 @@ -149,7 +149,7 @@ sub build_hdlist { sub filter_existing_hdlist { my ($urpm, $rpms_todo, $in_hdlist, $out) = @_; - $urpm->parse_hdlist($in_hdlist, packing => 1, callback => sub { + if ($urpm->parse_hdlist($in_hdlist, packing => 1, callback => sub { my (undef, $pkg) = @_; my $fullname = $pkg->fullname; if (delete $rpms_todo->{$fullname}) { @@ -160,7 +160,12 @@ sub filter_existing_hdlist { print "removing $fullname\n" if $verbose > 0; 0; # don't keep in memory } - }); + })) { + # ok + } else { + my $nb = @{$urpm->{depslist}}; + print STDERR "parse_hdlist has failed, keeping $nb headers succesfully parsed\n" if $verbose >= 0; + } } sub add_new_rpms_to_hdlist { -- cgit v1.2.1