* A quick hack to list the contents of various types of files (RPM,

[?]
Mar 18, 2009, 5:40 PM
NUIKDEHLDR4ANFZFRCWBAWZGFVMHCZ7PSMPPFVQJ3AAAAWAQQD4AC

Dependencies

  • [2] D3DIBMOK * For products that are directories (like manuals), allow a default
  • [3] HPIJ35SG
  • [4] JFZNAYJX * Showing releases.
  • [5] Y35C6GHH * One-click installs.
  • [6] SMM4HQTP * Put actions related to builds under /build (e.g. /log/<buildid>
  • [7] LBNVQXUB * Build the /build stuff in a separate controller.
  • [8] P6K2FSSS
  • [9] NDL67SQT * XHTML validity.
  • [10] T4LLYESZ * Nix expression for building Hydra.
  • [11] UQ6K57MS * Include nix-prefetch-svn in the Hydra binary distribution.
  • [12] 6F4UNDTC * Provide access to the raw, non-pretty-printed logfiles.
  • [13] A4ZMBK7D * Icon for ISOs.
  • [*] 5NO7NCKT * Refactoring.

Change contents

  • replacement in release.nix at line 85
    [4.75][3.273:323](),[3.323][4.0:37](),[4.133][4.0:37]()
    libxslt sqlite subversion nix coreutils
    gzip bzip2 gnused graphviz
    [4.75]
    [4.161]
    libxslt sqlite subversion nix coreutils findutils
    gzip bzip2 lzma gnutar unzip
    gnused graphviz
    rpm dpkg
  • replacement in src/lib/Hydra/Controller/Build.pm at line 93
    [4.2288][4.2288:2343]()
    sub download : Chained('build') PathPart('download') {
    [4.2288]
    [2.0]
    sub download : Chained('build') PathPart {
  • edit in src/lib/Hydra/Controller/Build.pm at line 125
    [4.3293]
    [15.1406]
    }
    sub contents : Chained('build') PathPart {
    my ($self, $c, $productnr, @path) = @_;
    my $product = $c->stash->{build}->buildproducts->find({productnr => $productnr});
    notFound($c, "Build doesn't have a product $productnr.") if !defined $product;
    my $path = $product->path;
    notFound($c, "Product $path has disappeared.") unless -e $path;
    my $res;
    if ($product->type eq "nix-build") {
    $res = `cd $path && find . -print0 | xargs -0 ls -ld --`;
    error($c, "`ls -lR' error: $?") if $? != 0;
    }
    elsif ($path =~ /\.rpm$/) {
    $res = `rpm --query --info --package "$path"`;
    error($c, "RPM error: $?") if $? != 0;
    $res .= "===\n";
    $res .= `rpm --query --list --verbose --package "$path"`;
    error($c, "RPM error: $?") if $? != 0;
    }
    elsif ($path =~ /\.deb$/) {
    $res = `dpkg-deb --info "$path"`;
    error($c, "`dpkg-deb' error: $?") if $? != 0;
    $res .= "===\n";
    $res .= `dpkg-deb --contents "$path"`;
    error($c, "`dpkg-deb' error: $?") if $? != 0;
    }
    elsif ($path =~ /\.tar(\.gz|\.bz2|\.lzma)?$/ ) {
    $res = `tar tvfa "$path"`;
    error($c, "`tar' error: $?") if $? != 0;
    }
    elsif ($path =~ /\.zip$/ ) {
    $res = `unzip -v "$path"`;
    error($c, "`unzip' error: $?") if $? != 0;
    }
    else {
    error($c, "Unsupported file type.");
    }
    die unless $res;
    $c->stash->{'plain'} = { data => $res };
    $c->forward('Hydra::View::Plain');
  • edit in src/root/product-list.tt at line 12
    [2.3315]
    [4.2262]
    [% contents = c.uri_for('/build' build.id 'contents' product.productnr) %]
  • replacement in src/root/product-list.tt at line 25
    [4.1157][4.1157:1227]()
    [<a class="productDetailsToggle" href="javascript:">help</a>]
    [4.1157]
    [4.1227]
    [<a class="productDetailsToggle" href="javascript:">help</a>, <a href="[% contents %]">contents</a>]
  • replacement in src/root/product-list.tt at line 101
    [4.5093][4.5093:5166]()
    [<a class="productDetailsToggle" href="javascript:">details</a>]
    [4.5093]
    [4.5166]
    [<a class="productDetailsToggle" href="javascript:">details</a>, <a href="[% contents %]">contents</a>]