Subversion Repositories DevTools

Rev

Rev 7299 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7299 Rev 7301
Line 50... Line 50...
50
{
50
{
51
    my ($path, $mode) = @_;
51
    my ($path, $mode) = @_;
52
    my $line;
52
    my $line;
53
    my $rec;
53
    my $rec;
54
    my $ver_string;
54
    my $ver_string;
-
 
55
    my $signature;
55
 
56
 
56
    open (DESCPKG, "$path") || return undef;
57
    open (DESCPKG, "$path") || return undef;
57
 
58
 
58
    #
59
    #
59
    #  Slurp the first line and determine the type of the file
60
    #  Slurp the first line and determine the type of the file
Line 96... Line 97...
96
                }
97
                }
97
                elsif ( $line =~ m/^Package Version:\s*(.*)$/ )
98
                elsif ( $line =~ m/^Package Version:\s*(.*)$/ )
98
                {
99
                {
99
                    $ver_string = $1;
100
                    $ver_string = $1;
100
                }
101
                }
-
 
102
                elsif ( $line =~ m/^Signature:\s*(.*)$/ )
-
 
103
                {
-
 
104
                    $signature = $1;
-
 
105
                }
101
            }
106
            }
102
            elsif ( $mode && $section eq "Build Dependencies" )
107
            elsif ( $mode && $section eq "Build Dependencies" )
103
            {
108
            {
104
                my %data;
109
                my %data;
105
                if ( $line =~ m/(.*):\s*(.*)/ )
110
                if ( $line =~ m/(.*):\s*(.*)/ )
Line 125... Line 130...
125
            }
130
            }
126
            elsif ( $line =~ m/^Version:\s*(.*)$/ )
131
            elsif ( $line =~ m/^Version:\s*(.*)$/ )
127
            {
132
            {
128
                    $ver_string = $1;
133
                    $ver_string = $1;
129
            }
134
            }
-
 
135
            elsif ( $line =~ m/^Signature:\s*(.*)$/ )
-
 
136
            {
-
 
137
                $signature = $1;
-
 
138
            }
130
            elsif ( $line =~ m/^Build Dependencies:/ )
139
            elsif ( $line =~ m/^Build Dependencies:/ )
131
            {
140
            {
132
                last;
141
                last;
133
            }
142
            }
134
            last unless ( defined ($line = <DESCPKG>) )
143
            last unless ( defined ($line = <DESCPKG>) )
Line 190... Line 199...
190
    #   Ensure the package Name has been found
199
    #   Ensure the package Name has been found
191
    #
200
    #
192
    return undef
201
    return undef
193
        unless ( exists ($rec->{'NAME'}) && $rec->{'NAME'} && $ver_string );
202
        unless ( exists ($rec->{'NAME'}) && $rec->{'NAME'} && $ver_string );
194
 
203
 
-
 
204
    #   Should be present
-
 
205
    $rec->{'SIGNATURE'} = $signature if defined $signature;
-
 
206
 
195
    #
207
    #
196
    #   Split the version string into bits and save the results
208
    #   Split the version string into bits and save the results
197
    #
209
    #
198
    (
210
    (
199
     $rec->{'NAME'},
211
     $rec->{'NAME'},