my $url = "$prefix/$package$suffix";
my @cmd = (qw(curl -sS -I), $url);
my $result = cmdoutput @cmd;
+ $result =~ s/^\S+ 200 .*\n\r?\n//;
+ # curl -sS -I with https_proxy prints
+ # HTTP/1.0 200 Connection established
$result =~ m/^\S+ (404|200) /s or
fail "unexpected results from git check query - ".
Dumper($prefix, $result);
return $tree;
}
-sub mktree_in_ud_from_only_subdir () {
- # changes into the subdir
- my (@dirs) = <*/.>;
- die unless @dirs==1;
- $dirs[0] =~ m#^([^/]+)/\.$# or die;
- my $dir = $1;
- changedir $dir;
-
+sub remove_stray_gits () {
my @gitscmd = qw(find -name .git -prune -print0);
debugcmd "|",@gitscmd;
open GITS, "-|", @gitscmd or failedcmd @gitscmd;
}
}
$!=0; $?=0; close GITS or failedcmd @gitscmd;
+}
+
+sub mktree_in_ud_from_only_subdir () {
+ # changes into the subdir
+ my (@dirs) = <*/.>;
+ die unless @dirs==1;
+ $dirs[0] =~ m#^([^/]+)/\.$# or die;
+ my $dir = $1;
+ changedir $dir;
+ remove_stray_gits();
mktree_in_ud_here();
my $format=get_source_format();
if (madformat($format)) {
# should be contained within debian/patches.
changedir '../fake';
+ remove_stray_gits();
mktree_in_ud_here();
rmtree '.pc';
runcmd @git, 'add', '.';