aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--URPM.pm7
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b956a00..656ee0c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- modify parse_hdlist so that partial hdlist reading can be used
+ (needed when some stuff is already done in the callback)
+
Version 1.71 - 9 August 2007, by Pascal "Pixel" Rigaux
- compilation fixes on rpm < 4.4.8
diff --git a/URPM.pm b/URPM.pm
index c1118d4..9d56f1d 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -169,13 +169,18 @@ sub parse_hdlist_or_synthesis {
my $previous_indice = @{$urpm->{depslist}};
if (my ($start, $end) = $parse_func->($urpm, $file, %options)) {
($start, $end);
- } else {
+ } elsif (!$options{callback}) {
#- parse_hdlist__XS may have added some pkgs to {depslist},
#- but we don't want those pkgs since reading hdlist failed later.
#- so we need to drop them
#- FIXME: {provides} would need to be reverted too!
splice(@{$urpm->{depslist}}, $previous_indice);
();
+ } else {
+ #- we need to keep them since the callback has been used
+ #- and we can't pretend we didn't parse anything
+ #- (needed for genhdlist2)
+ ();
}
}
sub parse_synthesis { parse_hdlist_or_synthesis(\&parse_synthesis__XS, @_) }