tag 315409 + patch
thanks
On Tue, 03 Apr 2007, Eddy Petrișor wrote:
> As much as we'd like this kind of integration note that we might
> consider dropping the usage of the file in question (at least in its
> current usage pattern. This might lead to a situation in which it
> might not exist at all.
Okay. Ity would have been nice to actually CC me when replying to the bug
log. :-)
I've made a first patch. Please find it attached.
It uses buildArea as debsdir if it's configured in .svn/deb-layout.
If the file doesn't exist, I still hook before the failure: if there's a
.svn directory and a ../build-area directory, then it uses that as
possible fallback.
Does that match well enough the default behaviour of svn-buildpackage? Or
are there additional cases which are interesting to cover?
Cheers,
--
Raphaël Hertzog
Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/
diff --git a/scripts/debi.pl b/scripts/debi.pl
index dadfa81..1e2755f 100755
--- a/scripts/debi.pl
+++ b/scripts/debi.pl
@@ -249,6 +249,19 @@ if (! defined $changes) {
}
}
+ if (-e ".svn/deb-layout") {
+ # Cope with format of svn-buildpackage tree
+ my $fh;
+ open($fh, "<", ".svn/deb-layout") || die "Can't open .svn/deb-layout: $!\n";
+ my($build_area) = grep /^buildArea=/, <$fh>;
+ close($fh);
+ if (defined($build_area)) {
+ chomp($build_area);
+ $build_area =~ s/^buildArea=//;
+ $debsdir = $build_area if -d $build_area;
+ }
+ }
+
# Find the source package name and version number
my %changelog;
open PARSED, q[dpkg-parsechangelog | grep '^\(Source\|Version\):' |]
@@ -298,6 +311,13 @@ EOF
my $package = $changelog{'Source'};
my $pva="${package}_${sversion}_${arch}";
$changes="$debsdir/$pva.changes";
+
+ if (! -e $changes and -d ".svn" and -d "../build-area") {
+ # Try out default svn-buildpackage structure in case
+ # we were going to fail anyway...
+ $changes = "../build-area/$pva.changes";
+ }
+
if ($opt_multi) {
my @mchanges = glob("$debsdir/${package}_${sversion}_*+*.changes");
@mchanges = grep { /[_+]$arch[\.+]/ } @mchanges;