ZVTSOVHNQNQCRF3N44RKDQSL3UM7HSLTAXICMWEE6EIA6SWJXZCQC PKPWUHUXLGPQFQUTNHLVGWNT6AB3H2VMDCBKT6IPZDC53CEL4W7QC CMU3YKOUUB6VNP54NVYUKFHI3A46YAAANNYOZSHCUJIQOQEZ3GCAC PHX2HIVGHHKCAX6VNN2WXD4LRGSA74KQMJCCTMHK7HS6JPELVECAC J5UVLXOK6EDIL5I7VKWH4V2QDS4DPD7FHRK6XBWSXFRQS4JKXFZQC L2E6EVE2RVFVDCUNRJ4CZYSQNS2DZUA5DTBETHBDUQUV2KQQRAOQC CLJQCY2XHIDNNMFBJ5PK3GQEN6RFALEFKXBJRWZPEIKR4PR5ZQ5AC M552HLIAP52D42AVXVC5SGROAYN2TBCEUZOXESWEMBBUX7G3U6TAC X27GNHDV5KPZ5GSH6DCAJMNCEMZLCP7M43JWF2X3O5QWXMOX273AC N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC H7CNGK4OJNRYZQGPLBGR72DULLEPFQ5UISF5J24D7IMA7SYW5LGQC # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/SS7rITRzALAmC9rNn70cQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Mwn4Pp+vduPrAU9s089pAg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j3niyjyAmX10xY1maNh4gA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kzQauEWWXur6WilY/1LcfA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/KtAIFiCb8EkAMd6OdHSXA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:85sz3phT3arumqXladRtMQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ig6LUSp4zaPhrxuzC8gL4Q
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1fnKUzCj0eAt4HWx0UB3SA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QuIbtSr8Q9JwhAcePu3Kuw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+a/kUdHtdjxdAOBSWdUsVA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sLsyDl8Nu63DWaYDIYBTkg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FYosIfp2O9OAolXdzalK+Q
package Hydra::Schema::Cachedpathinputs;use strict;use warnings;use base 'DBIx::Class';__PACKAGE__->load_components("Core");__PACKAGE__->table("CachedPathInputs");__PACKAGE__->add_columns("srcpath",{ data_type => "text", is_nullable => 0, size => undef },"timestamp",{ data_type => "integer", is_nullable => 0, size => undef },"lastseen",{ data_type => "integer", is_nullable => 0, size => undef },"sha256hash",{ data_type => "text", is_nullable => 0, size => undef },"storepath",{ data_type => "text", is_nullable => 0, size => undef },);__PACKAGE__->set_primary_key("srcpath", "sha256hash");# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KhMAz8E3CDxG2D+zleQEFw# You can replace this text with custom content, and it will be preserved on regeneration1;
package Hydra::Schema::Cachedsubversioninputs;use strict;use warnings;use base 'DBIx::Class';__PACKAGE__->load_components("Core");__PACKAGE__->table("CachedSubversionInputs");__PACKAGE__->add_columns("uri",{ data_type => "text", is_nullable => 0, size => undef },"revision",{ data_type => "integer", is_nullable => 0, size => undef },"sha256hash",{ data_type => "text", is_nullable => 0, size => undef },"storepath",{ data_type => "text", is_nullable => 0, size => undef },);__PACKAGE__->set_primary_key("uri", "revision");# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S62F6Z2wPT/+NoIApQcBmQ# You can replace this text with custom content, and it will be preserved on regeneration1;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nL04tddxVrJnpaDHMBWkEQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6N8dRzQi9IYgP5F2rbDtWg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vPNmAznaZ6z3M8eYOwnENg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QeB1Zh2L3q81y5j+fLcazw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:juL3q644z+R8S4ynbp6MMw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6aZCPgci+SLJuoGHcR3boA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e+sS5o6q9SX12ik9beTuFQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:meEhwhiWsywgQlrkwOz48A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4eWDgovhuQLEGBA42J9kKA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 18:59:54# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:woBkuPRoV3DnJmHdcZ2ZIg
elsif ($type eq "svn") {my $uri = $alt->value;my $sha256;my $storePath;# First figure out the last-modified revision of the URI.my @cmd = (["svn", "ls", "-v", "--depth", "empty", $uri],"|", ["sed", 's/^ *\([0-9]*\).*/\1/']);my $stdout; my $stderr;die "cannot get head revision of Subversion repository at `$uri':\n$stderr"unless IPC::Run::run(@cmd, \$stdout, \$stderr);my $revision = $stdout; chomp $revision;die unless $revision =~ /^\d+$/;(my $cachedInput) = $db->resultset('Cachedsubversioninputs')->search({uri => $uri, revision => $revision});if (defined $cachedInput && isValidPath($cachedInput->storepath)) {$storePath = $cachedInput->storepath;$sha256 = $cachedInput->sha256hash;} else {# Then download this revision into the store.print "checking out Subversion input ", $input->name, " from $uri revision $revision\n";$ENV{"NIX_HASH_ALGO"} = "sha256";$ENV{"PRINT_PATH"} = "1";(my $res, $stdout, $stderr) = captureStdoutStderr("nix-prefetch-svn", $uri, $revision);die "cannot check out Subversion repository `$uri':\n$stderr" unless $res;
($sha256, $storePath) = split ' ', $stdout;$db->txn_do(sub {$db->resultset('Cachedsubversioninputs')->create({ uri => $uri, revision => $revision, sha256hash => $sha256, storepath => $storePath});});}$$inputInfo{$input->name} ={ type => $type, uri => $uri, storePath => $storePath, sha256hash => $sha256, revision => $revision};}
create table CachedSubversionInputs (uri text not null,revision integer not null,sha256hash text not null,storePath text not null,primary key (uri, revision));