Subversion Repositories DevTools

Rev

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

Rev 7301 Rev 7302
Line 2000... Line 2000...
2000
    my $pkg;
2000
    my $pkg;
2001
    my $local = 1;
2001
    my $local = 1;
2002
    my $sandbox = 1;
2002
    my $sandbox = 1;
2003
    my $isa_cache = 0;
2003
    my $isa_cache = 0;
2004
    my $version;
2004
    my $version;
2005
    my $pkgSig = 'unknown';
2005
    my $pkgSig = 'Unknown';
2006
 
2006
 
2007
    Debug( "PackageLocate: ($name/$uversion)" );
2007
    Debug( "PackageLocate: ($name/$uversion)" );
2008
 
2008
 
2009
    #
2009
    #
2010
    #   If we are in a SandBox, then we use package signatures to locate pre-built
2010
    #   If we are in a SandBox, then we use package signatures to locate pre-built
Line 2180... Line 2180...
2180
    my $pkg;
2180
    my $pkg;
2181
    my $local = 1;
2181
    my $local = 1;
2182
    my $in_sandbox = 1;
2182
    my $in_sandbox = 1;
2183
    my $isa_cache = 0;
2183
    my $isa_cache = 0;
2184
    my $version;
2184
    my $version;
2185
    my $pkgSig = 'unknown';
2185
    my $pkgSig = 'Unknown';
2186
 
2186
 
2187
    Debug( "PackageLocateBySignature: ($name/$uversion)" );
2187
    Debug( "PackageLocateBySignature: ($name/$uversion)" );
2188
 
2188
 
2189
    # 
2189
    # 
2190
    #   We are in a sandbox and expect to find a interface/Package.sig file
2190
    #   We are in a sandbox and expect to find a interface/Package.sig file
Line 2215... Line 2215...
2215
 
2215
 
2216
    Error("Package signature not found for $name/$version", "You must 'build' the package before using it")
2216
    Error("Package signature not found for $name/$version", "You must 'build' the package before using it")
2217
        unless ( -f $pkgSigFile);
2217
        unless ( -f $pkgSigFile);
2218
    $pkgSig = TagFileRead($pkgSigFile);
2218
    $pkgSig = TagFileRead($pkgSigFile);
2219
    Error("Package signature invalid for $name/$version", "Signature: $pkgSig") 
2219
    Error("Package signature invalid for $name/$version", "Signature: $pkgSig") 
2220
        if(length($pkgSig) != 40);
2220
        if((length($pkgSig) != 40) && $pkgSig !~ m~^MSG:~) ;
2221
 
2221
 
2222
    #
2222
    #
2223
    #   Look in each package archive directory
2223
    #   Look in each package archive directory
2224
    #
2224
    #
2225
    foreach my $dpkg ( split( $::ScmPathSep, $::GBE_DPKG_SBOX),
2225
    foreach my $dpkg ( split( $::ScmPathSep, $::GBE_DPKG_SBOX),
Line 3939... Line 3939...
3939
#                           
3939
#                           
3940
#                   In a Non-GIT enabled sandbox the package signature will be set such that
3940
#                   In a Non-GIT enabled sandbox the package signature will be set such that
3941
#                   the package will never be found in the package store and the package MUST
3941
#                   the package will never be found in the package store and the package MUST
3942
#                   be built within the sandbox.
3942
#                   be built within the sandbox.
3943
#                   
3943
#                   
3944
#                   The hard part is determing the directory trees that contain this package
3944
#                   The hard part is determing the directory trees that contains this package
3945
#                   Ideally this is a single dir-tree, but this cannot be enforced.
3945
#                   Ideally this is a single dir-tree, but this cannot be enforced.
3946
#                   
3946
#                   
3947
#                   Source directories have been gathered during makefile generation
3947
#                   Source directories have been gathered during makefile generation
3948
#                   
3948
#                   
3949
#                   This suits most cases, but there are a few where the user needs
3949
#                   This suits most cases, but there are a few where the user needs
Line 4000... Line 4000...
4000
    #
4000
    #
4001
    foreach my $tag ( PackageEntry::GetPackageList() )
4001
    foreach my $tag ( PackageEntry::GetPackageList() )
4002
    {
4002
    {
4003
        my $pkgSig = PackageEntry::GetPackageSignature($tag);
4003
        my $pkgSig = PackageEntry::GetPackageSignature($tag);
4004
        $BuildSignatureSha1->add("PKGSIGNATURE: $pkgSig");
4004
        $BuildSignatureSha1->add("PKGSIGNATURE: $pkgSig");
4005
        push @sigList, "PKGSIGNATURE: $pkgSig: " . $BuildSignatureSha1->clone->hexdigest;
4005
        push @sigList, sprintf("PKGSIGNATURE: [%s] %s: %s", PackageEntry::GetNameVersion($tag), $pkgSig , $BuildSignatureSha1->clone->hexdigest);
4006
    }
4006
    }
4007
 
4007
 
4008
    #
4008
    #
4009
    #   Save the signature of the package header and the dependencies
4009
    #   Save the signature of the package header and the dependencies
4010
    #   This will be used for a simple test to see in we need to rebuild the build file 
4010
    #   This will be used for a simple test to see in we need to rebuild the build file 
Line 4036... Line 4036...
4036
        GitCmd('rev-parse', @cmdList, { process => $callback } );
4036
        GitCmd('rev-parse', @cmdList, { process => $callback } );
4037
        $BUILDSIGNATURE =  $BuildSignatureSha1->hexdigest;
4037
        $BUILDSIGNATURE =  $BuildSignatureSha1->hexdigest;
4038
    }
4038
    }
4039
    else
4039
    else
4040
    {
4040
    {
4041
        $BUILDSIGNATURE = 'Sandbox is not git enabled';
4041
        $BUILDSIGNATURE = 'MSG: Sandbox is not git enabled';
4042
    }
4042
    }
4043
       
4043
       
4044
    Message("Signature: $BUILDSIGNATURE");
4044
    Message("Signature: $BUILDSIGNATURE");
4045
    push @sigList, "Signature: $BUILDSIGNATURE";
4045
    push @sigList, "Signature: $BUILDSIGNATURE";
4046
    FileCreate( $signatureFile, $BUILDSIGNATURE );
4046
    FileCreate( $signatureFile, $BUILDSIGNATURE );