Subversion Repositories DevTools

Rev

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

Rev 5986 Rev 6073
Line 2086... Line 2086...
2086
        #       If package is newer that copy, then force transfer
2086
        #       If package is newer that copy, then force transfer
2087
        #       If copy does not exist, then force a transfer
2087
        #       If copy does not exist, then force a transfer
2088
        #
2088
        #
2089
        my $tag_dir = "$Cwd/$BUILDINTERFACE/BuildTags";
2089
        my $tag_dir = "$Cwd/$BUILDINTERFACE/BuildTags";
2090
        my $tag_file = "$tag_dir/${name}_${version}.tag";
2090
        my $tag_file = "$tag_dir/${name}_${version}.tag";
-
 
2091
        my $arglist = GenerateInstallArgumentList();
2091
 
2092
 
2092
        my $package_installed;
2093
        my $package_installed;
2093
        $package_installed = 1
2094
        $package_installed = 1
2094
            if ( !$local &&
2095
            if ( !$local &&
2095
                 !$Cache &&
2096
                 !$Cache &&
2096
                 !FileIsNewer( $entry->GetBaseDir('descpkg'), $tag_file ) );
2097
                 !FileIsNewer( $entry->GetBaseDir('descpkg'), $tag_file ) &&
-
 
2098
                 TagFileMatch( $tag_file, $arglist)
-
 
2099
                  );
2097
 
2100
 
2098
        #
2101
        #
2099
        #   Determine the package format and use the appropriate installer
2102
        #   Determine the package format and use the appropriate installer
2100
        #   Supported formats
2103
        #   Supported formats
2101
        #       1) Package has a descpkg file (new style)
2104
        #       1) Package has a descpkg file (new style)
Line 2122... Line 2125...
2122
 
2125
 
2123
                #
2126
                #
2124
                #   Determine all the Platforms, Products and Targets
2127
                #   Determine all the Platforms, Products and Targets
2125
                #   that need to be installed
2128
                #   that need to be installed
2126
                #
2129
                #
2127
                my $arglist = GenerateInstallArgumentList();
2130
                
2128
                System( "cd $pkg; $::GBE_PERL $::GBE_TOOLS/installpkg.pl $Cwd/$BUILDINTERFACE $Cwd @opts $arglist");
2131
                System( "cd $pkg; $::GBE_PERL $::GBE_TOOLS/installpkg.pl $Cwd/$BUILDINTERFACE $Cwd @opts $arglist");
2129
                Error( "Package installation error" ) if ( $? != 0 );
2132
                Error( "Package installation error" ) if ( $? != 0 );
2130
            }
2133
            }
2131
            elsif ( -e "$pkg/InstallPkg.sh" )
2134
            elsif ( -e "$pkg/InstallPkg.sh" )
2132
            {
2135
            {
Line 2143... Line 2146...
2143
 
2146
 
2144
            #
2147
            #
2145
            #   Tag the package as installed - after it has been transferred
2148
            #   Tag the package as installed - after it has been transferred
2146
            #
2149
            #
2147
            mkdir ( $tag_dir );
2150
            mkdir ( $tag_dir );
2148
            TouchFile( $tag_file );
2151
            FileCreate( $tag_file, $arglist );
2149
        }
2152
        }
2150
 
2153
 
2151
        #
2154
        #
2152
        #   Process package
2155
        #   Process package
2153
        #
2156
        #
Line 2248... Line 2251...
2248
 
2251
 
2249
    return "@arglist";
2252
    return "@arglist";
2250
}
2253
}
2251
 
2254
 
2252
#-------------------------------------------------------------------------------
2255
#-------------------------------------------------------------------------------
-
 
2256
# Function        : TagFileMatch 
-
 
2257
#
-
 
2258
# Description     : Test the contents of a simple (one line) file against a string    
-
 
2259
#
-
 
2260
# Inputs          : $tfile      - Name of the tage file
-
 
2261
#                   $tag        - Tag to match 
-
 
2262
#
-
 
2263
# Returns         : True - is a match
-
 
2264
#
-
 
2265
sub TagFileMatch
-
 
2266
{
-
 
2267
    my ($tfile, $tag) = @_;
-
 
2268
    return 0 unless -f $tfile;
-
 
2269
 
-
 
2270
    open( my $file, '<', $tfile) || return 0;
-
 
2271
    my $text = <$file>;
-
 
2272
    close $file;
-
 
2273
 
-
 
2274
    # Remove trailing new line and white space
-
 
2275
    $text =~ s~\s*$~~;
-
 
2276
    #Debug0("TagFileMatch:'$text':'$tag'", $text eq $tag );
-
 
2277
 
-
 
2278
    return $text eq $tag;
-
 
2279
}
-
 
2280
 
-
 
2281
 
-
 
2282
#-------------------------------------------------------------------------------
2253
# Function        : GeneratePlatformList
2283
# Function        : GeneratePlatformList
2254
#
2284
#
2255
# Description     : Return a list of platforms that should particiate in this
2285
# Description     : Return a list of platforms that should particiate in this
2256
#                   build. This is a function of
2286
#                   build. This is a function of
2257
#                       1) Platforms defined in the build.pl file
2287
#                       1) Platforms defined in the build.pl file