diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-08-10 17:50:46 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-08-10 17:50:46 +0000 |
commit | ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93 (patch) | |
tree | cf42ae0bdbc492254c60e5d75ad2d8bfdc3b4524 /URPM.pm | |
parent | ec87001206a2408b7d926f7c9d9327fe15ba5b80 (diff) | |
download | perl-URPM-ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93.tar perl-URPM-ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93.tar.gz perl-URPM-ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93.tar.bz2 perl-URPM-ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93.tar.xz perl-URPM-ff1b2dafd0e2a3ea2d15efb3e626d994aa655f93.zip |
- modify parse_hdlist so that partial hdlist reading can be used
(needed when some stuff is already done in the callback)
Diffstat (limited to 'URPM.pm')
-rw-r--r-- | URPM.pm | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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, @_) } |