- if (open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $sourcesfile)) {
+ my $tmpfile_pattern = "/tmp/wanna-build-interesting-sources-$distribution.$$-";
+ my ($tmpfile, $i);
+ for( $i = 0;; ++$i ) {
+ $tmpfile = $tmpfile_pattern . $i;
+ last if ! -e $tmpfile;
+ }
+
+ open SOURCES, '>', $tmpfile or die "Could not open temporary file $tmpfile\n";
+ for my $key (keys %interesting_packages) {
+ my $pkg = $db{$key};
+ print SOURCES "Package: $key\n";
+ print SOURCES "Version: $pkg->{'Version'}\n";
+ print SOURCES "Build-Depends: $srcs->{$key}{'dep'}\n" if $srcs->{$key}{'dep'};
+ print SOURCES "Build-Conflicts: $srcs->{$key}{'conf'}\n" if $srcs->{$key}{'conf'};
+ print SOURCES "Architecture: all\n";
+ print SOURCES "\n";
+ }
+ close SOURCES;
+
+ if (open(EDOS,"-|","wb-edos-builddebcheck", "-a", $arch, $packagesfile, $tmpfile))
+ {