ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/Requirements.pm
(Generate patch)

Comparing COMP/SCRAM/src/BuildSystem/Requirements.pm (file contents):
Revision 1.1.2.4.2.2 by williamc, Thu Aug 10 15:39:19 2000 UTC vs.
Revision 1.1.2.4.2.4 by williamc, Mon Aug 21 16:32:35 2000 UTC

# Line 2 | Line 2
2   #
3   # Interface
4   # ---------
5 < # new(file,URLcache)     : new requirements doc
5 > # new(file,URLcache,ObjectStore)     : new requirements doc
6   # setup(toolbox): set up the requirements into the specified toolbox object
7   # download(toolbox)    : download description files (into toolbox cache)
8   # tools()       : Return list of requirements (ordered)
# Line 10 | Line 10
10   # url(tool)     : return the url of a given tool
11  
12   package BuildSystem::Requirements;
13 < use ActiveDoc::SimpleURLDoc;
13 > use ActiveDoc::ActiveDoc;
14   use Utilities::Verbose;
15  
16   require 5.004;
# Line 22 | Line 22 | sub new {
22          bless $self, $class;
23          $self->{file}=shift;
24          $self->{cache}=shift;
25 +        $self->{dbstore}=shift;
26          $self->{mydocversion}="2.0";
27          $self->{Arch}=1;
28          push @{$self->{ARCHBLOCK}}, $self->{Arch};
# Line 61 | Line 62 | sub init {
62          my $self=shift;
63          my $file=shift;
64  
65 <        my $switch=ActiveDoc::SimpleURLDoc->new($self->{cache});
65 >        my $switch=ActiveDoc::ActiveDoc->new($self->{cache});
66          $switch->filetoparse($file);
67          $switch->newparse("doc");
68          $switch->addtag("doc","Doc", \&Doc_start,$self,"",$self,"",$self);
# Line 76 | Line 77 | sub init {
77                                          \&require_start,$self,
78                                          "", $self,
79                                          "", $self);
79        # -- backwards compatiblity - TODO remove with backwards comp in ToolBox
80        $switch->newparse("oldordering");
81        $switch->addtag("oldordering","Architecture",
82                                        \&Arch_Start,$self,
83                                        "", $self,
84                                        \&Arch_End, $self);
85        $switch->grouptag("Architecture","oldordering");
86        $switch->addtag("oldordering","require",
87                                        \&oldrequire_start,$self,
88                                        "", $self,
89                                        "", $self);
80  
81          $self->{switch}=$switch;
82          @{$self->{tools}}=();
# Line 98 | Line 88 | sub init {
88            if ( $self->{docversion} eq $self->{mydocversion} ) {
89              $self->{switch}->parse("ordering");
90            }
101          elsif ( $self->{docversion} eq "1.0" ) {
102            print "Warning : Version 1.0 Requirement docs deprecated\n";
103            $self->{switch}->parse("oldordering");
104          }
91          }
92          else {
93            #print "wrong doc version - not parsing\n";
# Line 167 | Line 153 | sub Arch_End {
153          pop @{$self->{ARCHBLOCK}};
154          $self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}];
155   }
170
171 sub oldrequire_start {
172        my $self=shift;
173        my $name=shift;
174        my $hashref=shift;
175
176        $self->{switch}->checktag( $name, $hashref, 'version');
177        $self->{switch}->checktag( $name, $hashref, 'name');
178        $self->{switch}->checktag( $name, $hashref, 'file');
179        if ( $self->{Arch} ) {
180          push @{$self->{tools}}, $$hashref{'name'};
181          $self->{version}{$$hashref{'name'}}=$$hashref{'version'};
182          $self->{url}{$$hashref{'name'}}=$$hashref{'file'};
183        }
184 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines