* Store the meta.longDescription and meta.license attributes in the

database.
This commit is contained in:
Eelco Dolstra 2008-12-16 15:09:39 +00:00
parent 7231556f47
commit dfcaa51d7b
21 changed files with 59 additions and 39 deletions

View file

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes; __PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RmC02q4hhhk/Vs/2O97L5w # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1mThEkw3+RDcO37DQaKMYg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ysEtYtg8L5z3W6dyFzXy9A # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mm8nqCVrUNaV+QbK9xDYpw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/OlaD8I5rojLRBbAL+C/qw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JlRwZ3f5MO3NKdiUoKdPHg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -31,8 +31,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cl2tJxeh476i1qzp28BB4g # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9rMPnerkNMCnmIcZsfvyXA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -30,6 +30,10 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 0, size => undef }, { data_type => "text", is_nullable => 0, size => undef },
"system", "system",
{ data_type => "text", is_nullable => 0, size => undef }, { data_type => "text", is_nullable => 0, size => undef },
"longdescription",
{ data_type => "text", is_nullable => 0, size => undef },
"license",
{ data_type => "text", is_nullable => 0, size => undef },
); );
__PACKAGE__->set_primary_key("id"); __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" });
@ -70,8 +74,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UX6GChi62wrJdc3eYRtCyQ # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+1cH3km/2qF9kVXzvuLCpQ
__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency');

View file

@ -27,8 +27,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M45MbodAbVDwSiQDsw3erA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h/lbs6oEwvoAcY6LizWv0w
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZAv//9TF7lfoaKCDdCLFNw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o/Z/w60KRyJelArjR0PSfg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -22,8 +22,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("srcpath", "sha256hash"); __PACKAGE__->set_primary_key("srcpath", "sha256hash");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJxFwR19zFl2zEcAchDCLg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dxVJXTU+q0fJeFyrBqvlDg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -20,8 +20,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("uri", "revision"); __PACKAGE__->set_primary_key("uri", "revision");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dOpp84bWlqOwiHPe8bsZhQ # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bx9lxEE8q+tuDk2XTiSsuQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -31,8 +31,8 @@ __PACKAGE__->belongs_to(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SXp0Jc4rBeGfm2RajVLJmw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rATCecNYPIL+G9vO6eifqw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -43,8 +43,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:miVk9N1PJ3HxZVBlMVgxFA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5AFlwVcHyenI+IwaxiZgMA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -50,8 +50,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QTfecLOgMWmoaFLt5Yh2Uw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:suzwQtkvBtH9i3i7fkNObA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -43,8 +43,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I8vNdExrfd/eGfHeZRQ21A # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+IOm0ORfmn7N/ujS8axubw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -32,8 +32,8 @@ __PACKAGE__->belongs_to(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m3ADAo2XKQ1Mu5JdNa3FFw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EA4dBRNNk3CgUVosyClVUQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -29,8 +29,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2SXTc8MC9KG9VM0uRHUwig # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uNeiMopmw7TNICoiL0ttaA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -16,8 +16,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("system"); __PACKAGE__->set_primary_key("system");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AyTEOJr+JjRxJpI1ITG1Tw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5CNlTPCvcuXjTyoYCitBQg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -17,8 +17,8 @@ __PACKAGE__->set_primary_key("username", "role");
__PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" }); __PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5dAhmCyy7/B75rfHAhvNLw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hXmj8AaIhROVYgDJdV+N9A
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -30,8 +30,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xAAXMAwZYAD5ICFz1dEpKQ # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UTOV3gdmXWEm8S9RIytA0A
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -69,8 +69,16 @@
<td><tt>[% build.nixname %]</tt></td> <td><tt>[% build.nixname %]</tt></td>
</tr> </tr>
<tr> <tr>
<th>Description:</th> <th>Short description:</th>
<td>[% build.description %]</td> <td>[% IF build.description %][% HTML.escape(build.description) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr>
<tr>
<th>Long description:</th>
<td>[% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr>
<tr>
<th>License:</th>
<td>[% IF build.license %][% HTML.escape(build.license) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr> </tr>
<tr> <tr>
<th>System:</th> <th>System:</th>

View file

@ -188,6 +188,9 @@ sub checkJob {
die if !defined $job; die if !defined $job;
my $description = defined $job->{meta}->{description} ? $job->{meta}->{description}->{value} : ""; my $description = defined $job->{meta}->{description} ? $job->{meta}->{description}->{value} : "";
my $longDescription = defined $job->{meta}->{longDescription} ? $job->{meta}->{longDescription}->{value} : "";
my $license = defined $job->{meta}->{license} ? $job->{meta}->{license}->{value} : "";
die unless $job->{drvPath} eq $drvPath; die unless $job->{drvPath} eq $drvPath;
my $outPath = $job->{outPath}; my $outPath = $job->{outPath};
@ -216,6 +219,8 @@ sub checkJob {
, jobset => $jobset->name , jobset => $jobset->name
, attrname => $jobName , attrname => $jobName
, description => $description , description => $description
, longdescription => $longDescription
, license => $license
, nixname => $job->{name} , nixname => $job->{name}
, drvpath => $drvPath , drvpath => $drvPath
, outpath => $outPath , outpath => $outPath

View file

@ -17,11 +17,14 @@ create table Builds (
-- Info about the build result. -- Info about the build result.
nixName text, -- name attribute of the derivation nixName text, -- name attribute of the derivation
description text, description text, -- meta.description
drvPath text not null, drvPath text not null,
outPath text not null, outPath text not null,
system text not null, system text not null,
longDescription text, -- meta.longDescription
license text, -- meta.license
foreign key (project) references Projects(name), -- ignored by sqlite foreign key (project) references Projects(name), -- ignored by sqlite
foreign key (project, jobset) references Jobsets(project, name) -- ignored by sqlite foreign key (project, jobset) references Jobsets(project, name) -- ignored by sqlite
); );