[Midnightbsd-cvs] mports: lib/Magus: Sync with current developement version.
ctriv at midnightbsd.org
ctriv at midnightbsd.org
Sun Feb 24 18:58:50 EST 2008
Log Message:
-----------
Sync with current developement version. This is not ready for primetime
yet, but it was felt that a checkin was good for backing up and peer review.
Modified Files:
--------------
mports/Tools/lib/Magus:
Category.pm (r1.1 -> r1.2)
Chroot.pm (r1.13 -> r1.14)
Config.pm (r1.2 -> r1.3)
DBI.pm (r1.2 -> r1.3)
Depend.pm (r1.2 -> r1.3)
Index.pm (r1.7 -> r1.8)
Lock.pm (r1.3 -> r1.4)
Log.pm (r1.4 -> r1.5)
Machine.pm (r1.3 -> r1.4)
OutcomeRules.pm (r1.4 -> r1.5)
Port.pm (r1.11 -> r1.12)
PortCategory.pm (r1.2 -> r1.3)
PortTest.pm (r1.7 -> r1.8)
mports/Tools/lib/Magus/OutcomeRules:
Base.pm (r1.5 -> r1.6)
Added Files:
-----------
mports/Tools/lib/Magus:
Event.pm (r1.1)
Run.pm (r1.1)
Removed Files:
-------------
mports/Tools/lib/Magus:
OSVersion.pm
Result.pm
SubResult.pm
-------------- next part --------------
--- Tools/lib/Magus/SubResult.pm
+++ /dev/null
@@ -1,45 +0,0 @@
-package Magus::SubResult;
-#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright notice
-# this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $MidnightBSD: mports/Tools/lib/Magus/SubResult.pm,v 1.7 2007/11/16 05:29:37 ctriv Exp $
-#
-# MAINTAINER= ctriv at MidnightBSD.org
-#
-
-
-use strict;
-use warnings;
-use base qw(Magus::DBI);
-
-__PACKAGE__->table('subresults');
-__PACKAGE__->columns(All => qw/id result phase type name msg/);
-__PACKAGE__->has_a(result => 'Magus::Result');
-
-
-
-1;
-__END__
-
Index: Log.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Log.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -L Tools/lib/Magus/Log.pm -L Tools/lib/Magus/Log.pm -u -r1.4 -r1.5
--- Tools/lib/Magus/Log.pm
+++ Tools/lib/Magus/Log.pm
@@ -1,6 +1,6 @@
package Magus::Log;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -35,7 +35,9 @@
__PACKAGE__->table('logs');
-__PACKAGE__->columns(Essential => qw/result data/);
+__PACKAGE__->columns(Essential => qw/id port data/);
+__PACKAGE__->has_a(port => 'Magus::Port');
+
1;
--- /dev/null
+++ Tools/lib/Magus/Event.pm
@@ -0,0 +1,47 @@
+package Magus::Event;
+#
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright notice
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# $MidnightBSD: mports/Tools/lib/Magus/Event.pm,v 1.1 2008/02/24 23:58:47 ctriv Exp $
+#
+# MAINTAINER= ctriv at MidnightBSD.org
+#
+
+
+use strict;
+use warnings;
+use base qw(Magus::DBI);
+
+__PACKAGE__->table('events');
+__PACKAGE__->columns(All => qw/id port phase type name msg machine/);
+__PACKAGE__->has_a(port => 'Magus::Port');
+__PACKAGE__->has_a(machine => 'Magus::Machine');
+
+
+
+
+1;
+__END__
+
Index: PortTest.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/PortTest.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -L Tools/lib/Magus/PortTest.pm -L Tools/lib/Magus/PortTest.pm -u -r1.7 -r1.8
--- Tools/lib/Magus/PortTest.pm
+++ Tools/lib/Magus/PortTest.pm
@@ -1,6 +1,6 @@
package Magus::PortTest;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Port.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Port.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -L Tools/lib/Magus/Port.pm -L Tools/lib/Magus/Port.pm -u -r1.11 -r1.12
--- Tools/lib/Magus/Port.pm
+++ Tools/lib/Magus/Port.pm
@@ -1,6 +1,6 @@
package Magus::Port;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -38,24 +38,25 @@
__PACKAGE__->table('ports');
-__PACKAGE__->columns(Essential => qw(id name arch version license pkgname));
-__PACKAGE__->columns(All => qw(description));
+__PACKAGE__->columns(Essential => qw(id run name version status));
+__PACKAGE__->columns(All => qw(description license www created updated));
__PACKAGE__->columns(Stringify => qw(name));
+__PACKAGE__->has_a(run => 'Magus::Run');
+
__PACKAGE__->has_many(depends => [ 'Magus::Depend' => 'dependency' ] => 'port');
-__PACKAGE__->has_many(results => 'Magus::Result');
__PACKAGE__->has_many(categories => [ 'Magus::PortCategory' => 'category' ]);
+__PACKAGE__->has_many(events => [ 'Magus::Event' => 'port' ]);
+
__PACKAGE__->set_sql(ready_ports => <<'END_OF_SQL');
SELECT ports.*,(SELECT COUNT(*) FROM depends WHERE dependency=ports.id) AS priority
FROM ports
WHERE
- arch=?
+ run=:a AND status='untested'
AND
(id NOT IN (SELECT port FROM locks WHERE port=ports.id))
AND
- (id NOT IN (SELECT port FROM results WHERE version=ports.version AND port=ports.id AND osversion=?))
- AND
((id NOT IN (SELECT port FROM depends WHERE port=ports.id))
OR
(id NOT IN (
@@ -64,12 +65,12 @@
AND
(
(dependency NOT IN (
- SELECT port FROM results JOIN ports ON ports.id=results.port AND ports.version=results.version WHERE
- results.port=dependency
+ SELECT port FROM ports WHERE
+ id=dependency
AND
- osversion=?
+ run=:a
AND
- (summary='pass' OR summary='warn')
+ (status='pass' OR status='warn')
))
OR
(dependency IN (SELECT port FROM locks WHERE port=dependency))
@@ -78,9 +79,11 @@
ORDER BY priority DESC;
END_OF_SQL
-=head2 Magus::Port->get_ready_port;
+#__PACKAGE__->
-Return a port that is ready to be tested for the current arch.
+=head2 Magus::Port->get_ready_port($run);
+
+Return a port that is ready to be tested for the current run.
Ready is defined as:
=over 4
@@ -102,10 +105,8 @@
=cut
sub get_ready_port {
- my $osver = $Magus::Machine->osversion;
- my $arch = $Magus::Machine->arch;
-
- return shift->search_ready_ports($arch, $osver, $osver)->next;
+ my ($class, $run) = @_;
+ return shift->search_ready_ports($run)->next;
}
@@ -129,8 +130,8 @@
=cut
sub current_result {
- my ($self) = @_;
- return $self->results(version => $self->version, osversion => $Magus::Machine->osversion)->next;
+ require Carp;
+ Carp::confess("Use of deprecated method: Magus::Port->current_result. There is no replacement.");
}
=head2 $port->all_depends
@@ -221,22 +222,11 @@
sub _set_result {
my ($self, $summary, $phase, $name, $msg) = @_;
- my $result;
-
- if ($result = $self->current_result) {
- $result->delete;
- }
-
- my $version = $self->version || '???';
-
- $result = $self->add_to_results({
- version => $version,
+ $self->status($summary);
+ $self->update;
+
+ $self->add_to_events({
machine => $Magus::Machine,
- osversion => $Magus::Machine->osversion,
- summary => $summary,
- });
-
- $result->add_to_subresults({
type => $summary,
name => $name,
msg => $msg,
Index: DBI.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/DBI.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -L Tools/lib/Magus/DBI.pm -L Tools/lib/Magus/DBI.pm -u -r1.2 -r1.3
--- Tools/lib/Magus/DBI.pm
+++ Tools/lib/Magus/DBI.pm
@@ -1,6 +1,6 @@
package Magus::DBI;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Chroot.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Chroot.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -L Tools/lib/Magus/Chroot.pm -L Tools/lib/Magus/Chroot.pm -u -r1.13 -r1.14
--- Tools/lib/Magus/Chroot.pm
+++ Tools/lib/Magus/Chroot.pm
@@ -1,6 +1,6 @@
package Magus::Chroot;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Config.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Config.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -L Tools/lib/Magus/Config.pm -L Tools/lib/Magus/Config.pm -u -r1.2 -r1.3
--- Tools/lib/Magus/Config.pm
+++ Tools/lib/Magus/Config.pm
@@ -1,6 +1,6 @@
package Magus::Config;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Index.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Index.pm,v
retrieving revision 1.7
retrieving revision 1.8
diff -L Tools/lib/Magus/Index.pm -L Tools/lib/Magus/Index.pm -u -r1.7 -r1.8
--- Tools/lib/Magus/Index.pm
+++ Tools/lib/Magus/Index.pm
@@ -1,6 +1,6 @@
package Magus::Index;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -37,7 +37,8 @@
use YAML qw(Load);
sub sync {
- my ($class, $root) = @_;
+ my ($class, $root, $run) = @_;
+ my $arch = $run->arch;
my %visited;
$root ||= "$Magus::Config{MasterDataDir}/$Magus::Config{MportsCvsDir}";
@@ -49,78 +50,60 @@
recurse_ports {
print @_, "... ";
- foreach my $arch (@Magus::Archs) {
- my $yaml = `ARCH=$arch PORTSDIR=$root BATCH=1 PACKAGE_BUILDING=1 MAGUS=1 make describe-yaml`;
- my %dump;
-
- eval {
- %dump = %{ Load($yaml) };
- };
-
- if ($@) {
- warn "Unable to parse yaml for $_[0]: $@\n";
- return;
- }
+ my $yaml = `ARCH=$arch PORTSDIR=$root BATCH=1 PACKAGE_BUILDING=1 MAGUS=1 make describe-yaml`;
+ my %dump;
- my $port = Magus::Port->find_or_create({ name => $dump{name}, arch => $arch });
+ eval {
+ %dump = %{ Load($yaml) };
+ };
+
+ if ($@) {
+ warn "Unable to parse yaml for $_[0]: $@\n";
+ return;
+ }
- $port->version($dump{version});
- $port->description($dump{description});
- $port->pkgname($dump{pkgname});
- $port->license($dump{license});
- $port->update;
-
- # We only have one depend type, merge into a unique list
- my %portdepends;
- while (my ($type, $deps) = each %{$dump{'depends'}}) {
- foreach my $dep (@$deps) {
- $portdepends{$dep}++;
- }
+ my $port = Magus::Port->create({
+ run => $run,
+ name => $dump{name},
+ version => $dump{version},
+ description => $dump{description},
+ license => $dump{license},
+ www => $dump{www}
+ });
+
+ # We only have one depend type, merge into a unique list
+ my %portdepends;
+ while (my ($type, $deps) = each %{$dump{'depends'}}) {
+ foreach my $dep (@$deps) {
+ $portdepends{$dep}++;
}
+ }
- $depends{$port->id} = [keys %portdepends];
+ $depends{$port->id} = [keys %portdepends];
- $class->sync_categories(\%dump, $port, $arch);
+ $class->sync_categories(\%dump, $port, $arch);
- if ($dump{is_interactive} && !$port->current_result) {
- print "\n\tIGNORE set. Marking as skippped.";
- $port->set_result_skip(index => IsInteractive => "Port is marked as interactive.");
- }
-
- print "$arch ";
- $visited{$port->id}++;
+ if ($dump{is_interactive}) {
+ print "\n\tIGNORE set. Marking as skippped.";
+ $port->set_result_skip(index => IsInteractive => "Port is marked as interactive.");
}
+
print "done.\n";
} root => $root;
my $ports = Magus::Port->retrieve_all;
- # if the port is in the database, but not in the tree, then we need to delete it
- # from the database.
- print "Checking for deleted ports...";
- while (my $port = $ports->next) {
- if (!$visited{$port->id}) {
- print "\n\t$port (" . $port->arch . ")";
- $port->delete;
- }
- }
- print "done\n";
-
- #
- # finally we build the depends table.
- #
- Magus::Depend->db_Main->do('DELETE FROM depends');
-
- print "Rebuilding depends list... \n";
+
+ print "Building depends list... \n";
PORT: while (my ($id, $depends) = each %depends) {
my $port = Magus::Port->retrieve($id) || die "Got an invalid port in the depends list! ($id)";
-
+
for (@$depends) {
- my $depend = Magus::Port->retrieve(name => $_, arch => $port->arch);
+ my $depend = Magus::Port->retrieve(run => $run, name => $_);
if (!$depend) {
- print "\tMissing depend for $port: $depend\n";
+ warn "\tMissing depend for $port: $_\n";
$port->set_result_fail(index => 'NonExistantDepend' => qq(depend "$_" does not exist.));
next PORT;
}
@@ -131,7 +114,7 @@
}
}
- print "done.";
+ print "done.\n";
}
Index: Lock.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Lock.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -L Tools/lib/Magus/Lock.pm -L Tools/lib/Magus/Lock.pm -u -r1.3 -r1.4
--- Tools/lib/Magus/Lock.pm
+++ Tools/lib/Magus/Lock.pm
@@ -1,6 +1,6 @@
package Magus::Lock;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Depend.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Depend.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -L Tools/lib/Magus/Depend.pm -L Tools/lib/Magus/Depend.pm -u -r1.2 -r1.3
--- Tools/lib/Magus/Depend.pm
+++ Tools/lib/Magus/Depend.pm
@@ -1,6 +1,6 @@
package Magus::Depend;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
--- /dev/null
+++ Tools/lib/Magus/Run.pm
@@ -0,0 +1,100 @@
+package Magus::Run;
+#
+# Copyright (c) 2008 Chris Reinhardt. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+# 1. Redistributions of source code must retain the above copyright notice
+# this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# $MidnightBSD: mports/Tools/lib/Magus/Run.pm,v 1.1 2008/02/24 23:58:47 ctriv Exp $
+#
+# MAINTAINER= ctriv at MidnightBSD.org
+#
+
+use strict;
+use warnings;
+use base qw(Magus::DBI);
+
+
+__PACKAGE__->table('runs');
+__PACKAGE__->columns(Essential => qw/id osversion arch status created/);
+
+
+=head2 Magus::Run->latest($machine)
+
+Takes a machine, and returns the latest run for that machine's osversion and arch.
+
+=cut
+
+sub latest {
+ my ($class, $machine) = @_;
+
+ return $class->search(
+ osversion => $machine->osversion,
+ arch => $machine->arch,
+ { order_by => 'id DESC' }
+ )->next;
+}
+
+
+=head2 $run->is_empty();
+
+Returns true if the run has no ports left to be tested
+
+=cut
+
+sub is_empty {
+ my ($self) = @_;
+
+ return Magus::Port->get_ready_port($self) ? 0 : 1;
+}
+
+
+=head2 $run->tarball
+
+Returns the run's tarball filename (no path)
+
+=cut
+
+sub tarball {
+ my ($self) = @_;
+ my $id = $self->id;
+
+ return "mports-tree-$id.tar.bz2"
+}
+
+=head2 $run->tarballpath
+
+Returns the absolute path to the tarball (including scp information if you're
+on a node). This is implemented as:
+
+ "$Magus::Config{MasterDataDir}/$Magus::Conig{MportsSnapDir}/" . $run->tarball
+
+=cut
+
+sub tarballpath {
+ return "$Magus::Config{MasterDataDir}/$Magus::Conig{MportsSnapDir}/" . shift->tarball;
+}
+
+
+1;
+__END__
+
Index: Machine.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Machine.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -L Tools/lib/Magus/Machine.pm -L Tools/lib/Magus/Machine.pm -u -r1.3 -r1.4
--- Tools/lib/Magus/Machine.pm
+++ Tools/lib/Magus/Machine.pm
@@ -1,6 +1,6 @@
package Magus::Machine;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -35,8 +35,8 @@
__PACKAGE__->table('machines');
-__PACKAGE__->columns(Essential => qw/id arch name maintainer osversion/);
-__PACKAGE__->has_a(osversion => 'Magus::OSVersion');
+__PACKAGE__->columns(Essential => qw/id arch name maintainer run/);
+__PACKAGE__->has_a(run => 'Magus::Run');
1;
--- Tools/lib/Magus/OSVersion.pm
+++ /dev/null
@@ -1,43 +0,0 @@
-package Magus::OSVersion;
-#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright notice
-# this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $MidnightBSD: mports/Tools/lib/Magus/OSVersion.pm,v 1.1 2007/11/20 17:03:45 ctriv Exp $
-#
-# MAINTAINER= ctriv at MidnightBSD.org
-#
-
-use strict;
-use warnings;
-use base qw(Magus::DBI);
-
-
-__PACKAGE__->table('osversions');
-__PACKAGE__->columns(Essential => qw/id name branch date/);
-
-
-1;
-__END__
-
Index: OutcomeRules.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/OutcomeRules.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -L Tools/lib/Magus/OutcomeRules.pm -L Tools/lib/Magus/OutcomeRules.pm -u -r1.4 -r1.5
--- Tools/lib/Magus/OutcomeRules.pm
+++ Tools/lib/Magus/OutcomeRules.pm
@@ -1,6 +1,6 @@
package Magus::OutcomeRules;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
--- Tools/lib/Magus/Result.pm
+++ /dev/null
@@ -1,62 +0,0 @@
-package Magus::Result;
-#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# 1. Redistributions of source code must retain the above copyright notice
-# this list of conditions and the following disclaimer.
-#
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-#
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# $MidnightBSD: mports/Tools/lib/Magus/Result.pm,v 1.6 2007/11/20 17:03:45 ctriv Exp $
-#
-# MAINTAINER= ctriv at MidnightBSD.org
-#
-
-
-
-use base qw(Magus::DBI);
-use strict;
-use warnings;
-
-
-__PACKAGE__->table('results');
-__PACKAGE__->columns(All => qw/id port version summary machine osversion/);
-
-__PACKAGE__->has_a(port => 'Magus::Port');
-__PACKAGE__->has_a(machine => 'Magus::Machine');
-__PACKAGE__->has_a(osversion => 'Magus::OSVersion');
-
-__PACKAGE__->has_many(subresults => 'Magus::SubResult');
-__PACKAGE__->might_have(log => 'Magus::Log' => 'data');
-
-
-#
-# depreacted method
-#
-use Carp qw(cluck);
-sub arch {
- my ($self) = @_;
- cluck("Use of deprecated method: " . ref $self . "->arch. Use ->machine->arch instead.");
- return $self->machine->arch;
-}
-
-1;
-__END__
-
Index: PortCategory.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/PortCategory.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -L Tools/lib/Magus/PortCategory.pm -L Tools/lib/Magus/PortCategory.pm -u -r1.2 -r1.3
--- Tools/lib/Magus/PortCategory.pm
+++ Tools/lib/Magus/PortCategory.pm
@@ -1,6 +1,6 @@
package Magus::PortCategory;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Category.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/Category.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -L Tools/lib/Magus/Category.pm -L Tools/lib/Magus/Category.pm -u -r1.1 -r1.2
--- Tools/lib/Magus/Category.pm
+++ Tools/lib/Magus/Category.pm
@@ -1,6 +1,6 @@
package Magus::Category;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Index: Base.pm
===================================================================
RCS file: /home/cvs/mports/Tools/lib/Magus/OutcomeRules/Base.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -L Tools/lib/Magus/OutcomeRules/Base.pm -L Tools/lib/Magus/OutcomeRules/Base.pm -u -r1.5 -r1.6
--- Tools/lib/Magus/OutcomeRules/Base.pm
+++ Tools/lib/Magus/OutcomeRules/Base.pm
@@ -1,6 +1,6 @@
package Magus::OutcomeRules::Base;
#
-# Copyright (c) 2007 Chris Reinhardt. All rights reserved.
+# Copyright (c) 2007,2008 Chris Reinhardt. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
More information about the Midnightbsd-cvs
mailing list