$cmd .= " archive-api-query $subpath";
printdebug "apiquery $cmd\n";
$!=0; $?=0; my $json = `$cmd`;
- defined $json or die "$subpath $! $?";
+ defined $json && !$? or die "$subpath $! $?";
my $r = decode_json $json;
my $d = new Data::Dumper([$r], [qw(r)]);
printdebug "apiquery $subpath | ", $d->Dump() if $debuglevel>=2;
t-archive-none () {
p=$1
mkdir -p $tmp/aq $tmp/mirror/pool/main
- mkdir -p $tmp/aq/dsc_in_suite $tmp/aq/dsc_in_suite/sid
local suite=sid
+
>$tmp/aq/package.$suite.$p
t-archive-updated $suite $p
+ >$tmp/aq/package.new.$p
+ t-archive-updated new $p
+
ln -s sid $tmp/aq/dsc_in_suite/unstable
cat <<'END' >$tmp/aq/suites
[
t-archive-updated () {
local suite=$1
local p=$2
- perl <$tmp/aq/package.$suite.$p >$tmp/aq/dsc_in_suite/$suite/$p -wne '
+ local suitedir=$tmp/aq/dsc_in_suite/$suite
+ mkdir -p $suitedir
+ perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
use JSON;
use strict;
our @v;