aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.pm
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.pm')
-rw-r--r--URPM.pm7
1 files changed, 6 insertions, 1 deletions
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, @_) }