+Fri Sep 19 12:26:54 CDT 2003 Adam Heath <doogie@debian.org>
+
+ * scripts/{controllib,dpkg-{source,checkbuilddeps,control}}.pl:
+ * Rewrote the parsedep stuff, so that it wasn't done during control
+ file parsing. Scripts that need the internal parsed format should
+ call parsedep on the field's value.
+ * Split the substvars parsing into a separate function.
+ * No longer validate dependency fields when reading the control file.
+ Some fields may have vars in them, which breaks the validation.
+ * dpkg-gencontrol calls substvars after parsing the control file, and
+ then validates the substituted depends lines. Originally,
+ substitution occured only during writing of the final output file.
+ * Andreas Barth <aba@not.so.argh.org>:
+ Fix bad regex that didn't allow spaces in dependency field parsing.
+ It now directly matches what the c code expects. It previously was
+ allowing all of \S, which matched on '('.
+ Closes: #211660.
+ * debian/control: Remove stale debug that would have broken installation
+ on s390.
+ * debian/rules: We were calling our own local copy of dpkg-gencontrol,
+ but the system-installed copy of dpkg-shlibdeps. Now, both are called
+ from the build directory.
+
Wed Sep 17 13:26:14 CDT 2003 Adam Heath <doogie@debian.org>
* debian/changelog, version-nr: Updated to 1.10.13.
+dpkg (1.10.14) unstable; urgency=low
+
+ * controllib.pl:
+ * Rewrote the parsedep stuff, so that it wasn't done during control
+ file parsing. Scripts that need the internal parsed format should
+ call parsedep on the field's value.
+ * Split the substvars parsing into a separate function.
+ * No longer validate dependency fields when reading the control file.
+ Some fields may have vars in them, which breaks the validation.
+ * dpkg-gencontrol calls substvars after parsing the control file, and
+ then validates the substituted depends lines. Originally,
+ substitution occured only during writing of the final output file.
+ * Andreas Barth <aba@not.so.argh.org>:
+ Fix bad regex that didn't allow spaces in dependency field parsing.
+ It now directly matches what the c code expects. It previously was
+ allowing all of \S, which matched on '('.
+ Closes: #211660.
+ * Remove stale debug in debian/control that would have broken
+ installation on s390.
+ * We were calling our own local copy of dpkg-gencontrol, but the
+ system-installed copy of dpkg-shlibdeps. Now, both are called from
+ the build directory.
+
+ -- Adam Heath <doogie@debian.org> UNRELEASED
+
dpkg (1.10.13) unstable; urgency=low
* Fix parsing of deps when both () and [] are specified.
Architecture: any
Essential: yes
Pre-Depends: dselect, ${shlibs:Pre-Depends}
-Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11), dpkg-static, dpkg-dev (<< 1.9), foo [s390]
+Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11), dpkg-static, dpkg-dev (<< 1.9)
Replaces: dpkg-doc-ja, dpkg-static, manpages-de (<= 0.4-3)
Description: Package maintenance system for Debian
This package contains the programs which handle the installation and
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2> /dev/null || true)
arch := $(shell dpkg-architecture -qDEB_HOST_ARCH)
-GENCONTROL := perl -I $(CURDIR)/scripts scripts/dpkg-gencontrol.pl -isp
+GENCONTROL := perl -I $(CURDIR)/scripts $(BUILD)/scripts/dpkg-gencontrol -isp
+SHLIBDEPS := perl -I $(CURDIR)/scripts $(BUILD)/scripts/dpkg-shlibdeps
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
config_arg := --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
install -p -m 755 -o root -g root debian/dpkg.postinst $(TMP_DPKG)/DEBIAN/postinst
install -p -m 755 -o root -g root debian/dpkg.postrm $(TMP_DPKG)/DEBIAN/postrm
- dpkg-shlibdeps -dPre-Depends -Tdebian/dpkg$(static).substvars \
+ $(SHLIBDEPS) -dPre-Depends -Tdebian/dpkg$(static).substvars \
$(TMP_DPKG)/sbin/start-stop-daemon \
`test -z "$(static)" && echo $(TMP_DPKG)/usr/bin/dpkg $(TMP_DPKG)/usr/bin/md5sum $(TMP_DPKG)/usr/bin/dpkg-deb`
install -d -m 755 -o root -g root $(TMP_DSELECT)/DEBIAN
install -p -m 644 -o root -g root debian/dselect.conffiles $(TMP_DSELECT)/DEBIAN/conffiles
- dpkg-shlibdeps -Tdebian/dselect.substvars \
+ $(SHLIBDEPS) -Tdebian/dselect.substvars \
$(TMP_DSELECT)/usr/bin/dselect
$(GENCONTROL) -Tdebian/dselect.substvars -pdselect -P$(TMP_DSELECT)
dpkg --build $(TMP_DSELECT) ..
sub outputclose {
my ($dosubstvars) = @_;
for $f (keys %f) { $substvar{"F:$f"}= $f{$f}; }
- if (length($varlistfile) and $dosubstvars) {
- $varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
- if (open(SV,"< $varlistfile")) {
- binmode(SV);
- while (<SV>) {
- next if m/^\#/ || !m/\S/;
- s/\s*\n$//;
- m/^(\w[-:0-9A-Za-z]*)\=/ ||
- &error("bad line in substvars file $varlistfile at line $.");
- $substvar{$1}= $';
- }
- close(SV);
- } elsif ($! != ENOENT ) {
- &error("unable to open substvars file $varlistfile: $!");
- }
- }
+ &parsesubstvars if ($dosubstvars);
for $f (sort { $fieldimps{$b} <=> $fieldimps{$a} } keys %f) {
$v= $f{$f};
if ($dosubstvars) {
defined($fi{"C$i Package"}) ||
&error("per-package paragraph $i in control info file is ".
"missing Package line");
- foreach my $dep_field (@pkg_dep_fields) {
- if (defined($fi{"C$i $dep_field"})) {
- ($fi{"C$i $dep_field"} = parsedep($fi{"C$i $dep_field"}, 1, 1)) ||
- &error("per-package paragraph $i in control info file ".
- "invalid dependency field \`$dep_field'");
- }
- }
}
- foreach my $dep_field (@src_dep_fields) {
- if (defined($fi{"C $dep_field"})) {
- ($fi{"C $dep_field"} = parsedep($fi{"C $dep_field"}, 1, 1)) ||
- &error("source paragraph in control info file ".
- "invalid dependency field \`$dep_field'");
+ defined($fi{"C Source"}) ||
+ &error("source paragraph in control info file is ".
+ "missing Source line");
+
+}
+
+my $substvarsparsed = 0;
+sub parsesubstvars {
+ if (length($varlistfile) && !$substvarsparsed) {
+ $varlistfile="./$varlistfile" if $varlistfile =~ m/\s/;
+ if (open(SV,"< $varlistfile")) {
+ binmode(SV);
+ while (<SV>) {
+ next if m/^\#/ || !m/\S/;
+ s/\s*\n$//;
+ m/^(\w[-:0-9A-Za-z]*)\=/ ||
+ &error("bad line in substvars file $varlistfile at line $.");
+ $substvar{$1}= $';
+ }
+ close(SV);
+ } elsif ($! != ENOENT ) {
+ &error("unable to open substvars file $varlistfile: $!");
}
+ $substvarsparsed = 1;
}
}
ALTERNATE:
foreach my $dep_or (split(/\s*\|\s*/m, $dep_and)) {
my ($package, $relation, $version);
- $package = $1 if ($dep_or =~ s/^(\S+)\s*//m);
+ $package = $1 if ($dep_or =~ s/^([a-zA-Z0-9][a-zA-Z0-9+._-]*)\s*//m);
($relation, $version) = ($1, $2) if ($dep_or =~ s/^\((=|<=|>=|<<?|>>?)\s*([^)]+).*\)\s*//m);
my @arches = split(/\s+/m, $1) if ($use_arch && $dep_or =~ s/^\[([^]]+)\]\s*//m);
if ($reduce_arch && @arches) {
my $dep_regex=qr/[ \t]*(([^\n]+|\n[ \t])*)\s/; # allow multi-line
if (defined($fi{"C Build-Depends"})) {
- push @unmet, build_depends($fi{"C Build-Depends"}, @status);
+ push @unmet, build_depends(parsedep($fi{"C Build-Depends"}), @status);
}
if (defined($fi{"C Build-Conflicts"})) {
- push @unmet, build_conflicts($fi{"C Build-Conflicts"}, @status);
+ push @unmet, build_conflicts(parsedep($fi{"C Build-Conflicts"}), @status);
}
if (! $binary_only && defined($fi{"C Build-Depends-Indep"})) {
- push @unmet, build_depends($fi{"C Build-Depends-Indep"}, @status);
+ push @unmet, build_depends(parsedep($fi{"C Build-Depends-Indep"}), @status);
}
if (! $binary_only && defined($fi{"C Build-Conflicts-Indep"})) {
- push @unmet, build_conflicts($fi{"C Build-Conflicts-Indep"}, @status);
+ push @unmet, build_conflicts(parsedep($fi{"C Build-Conflicts-Indep"}), @status);
}
if (@unmet) {
&findarch;
&parsechangelog;
+&parsesubstvars;
&parsecontrolfile;
if (length($oppackage)) {
if (m/^(Package|Description|Essential|Optional)$/) {
$f{$_}= $v;
} elsif (exists($pkg_dep_fields{$_})) {
- $f{$_}= showdep($v, 0);
+ $f{$_}= showdep(parsedep(substvars($v)), 0);
} elsif (m/^Section$|^Priority$/) {
$spvalue{$_}= $v;
} elsif (m/^Architecture$/) {
if (s/^C //) {
if (m/^Source$/i) { &setsourcepackage; }
elsif (m/^(Standards-Version|Origin|Maintainer|Uploaders)$/i) { $f{$_}= $v; }
- elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) { $f{$_}= showdep($v, 0); }
+ elsif (m/^Build-(Depends|Conflicts)(-Indep)?$/i) { $f{$_}= $v; }
elsif (s/^X[BC]*S[BC]*-//i) { $f{$_}= $v; }
elsif (m/^(Section|Priority|Files|Bugs)$/i || m/^X[BC]+-/i) { }
else { &unknown('general section of control info file'); }