+2007-08-28 Guillem Jover <guillem@debian.org>
+
+ * scripts/dpkg-gencontrol.pl: Add comments about the second pass
+ parsing for dependency fields. Remove handling of uninteresting fields
+ in the second pass parsing.
+
2007-08-24 Guillem Jover <guillem@debian.org>
* scripts/dpkg-gencontrol.pl: Allow a package stanza to override the
if (m/^(Package|Description|Homepage|Essential|Optional)$/) {
$f{$_}= $v;
} elsif (exists($pkg_dep_fields{$_})) {
+ # Delay the parsing until later
} elsif (m/^Section$|^Priority$/) {
$spvalue{$_}= $v;
} elsif (m/^Architecture$/) {
&init_substvars;
init_substvar_arch();
+# Process dependency fields in a second pass, now that substvars have been
+# initialized.
+
for $_ (keys %fi) {
my $v = $fi{$_};
- if (s/^C //) {
- } elsif (s/^C$myindex //) {
- if (m/^(Package|Description|Essential|Optional)$/) {
- } elsif (exists($pkg_dep_fields{$_})) {
+ if (s/^C$myindex //) {
+ if (exists($pkg_dep_fields{$_})) {
my $dep = parsedep(substvars($v), 1, 1);
&error(sprintf(_g("error occurred while parsing %s"), $_)) unless defined $dep;
$f{$_}= showdep($dep, 0);
- } elsif (m/^Section$|^Priority$/) {
- } elsif (m/^Architecture$/) {
- } elsif (s/^X[CS]*B[CS]*-//i) {
- } elsif (!m/^X[CS]+-/i) {
}
- } elsif (m/^C\d+ /) {
- } elsif (s/^L //) {
- } elsif (m/o:/) {
- } else {
}
}