Subversion Repositories DevTools

Rev

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

Rev 5231 Rev 5233
Line 12... Line 12...
12
#       Delete files we don't want to index
12
#       Delete files we don't want to index
13
#           .DMP,.dmp,.so,.gz,.zip,.lib,.bz,.bz2,.tbz,.jar,.deb,.exe,.a,.msb
13
#           .DMP,.dmp,.so,.gz,.zip,.lib,.bz,.bz2,.tbz,.jar,.deb,.exe,.a,.msb
14
#
14
#
15
#       Merge ripples package versions
15
#       Merge ripples package versions
16
#           Just keep one
16
#           Just keep one
-
 
17
#           At the moment, simply ignore ripples in release comparisons.
17
#
18
#
18
#       Cots packages
19
#       Cots packages
19
#           Use contents from dpkg_archive instead of the package
20
#           Use contents from dpkg_archive instead of the package
20
#
21
#
21
#       Better Version-Aging algorithm
22
#       Better Version-Aging algorithm
Line 288... Line 289...
288
        {
289
        {
289
            #
290
            #
290
            #   Determinte last created view in this Release
291
            #   Determinte last created view in this Release
291
            #
292
            #
292
            my ($latestView, $latestAge) = getLatestVersion(catdir($ReleaseStore, $rtagid ));
293
            my ($latestView, $latestAge) = getLatestVersion(catdir($ReleaseStore, $rtagid ));
293
            if ( ! defined($latestView) || $latestAge > 1 || $opt_forceViews)
294
            if ( ! defined($latestView) || $latestAge > 1 || $opt_forceViews )
294
            {
295
            {
295
                #
296
                #
296
                #   If there is no latest view, then we need to create a new view
297
                #   If there is no latest view, then we need to create a new view
297
                #   If there is a recent view, but its older than a day then we may need
298
                #   If there is a recent view, but its older than a day then we may need
298
                #   to refresh it.
299
                #   to refresh it.
Line 332... Line 333...
332
}
333
}
333
 
334
 
334
#-------------------------------------------------------------------------------
335
#-------------------------------------------------------------------------------
335
# Function        : checkViewDiffs 
336
# Function        : checkViewDiffs 
336
#
337
#
337
# Description     : Check a view against the current package versions in the
338
# Description     : Check a view against package versions in the current Release. 
338
#                   Release 
339
#                   Ignore ripple built packages as these only have dependent changes
339
#
340
#
340
# Inputs          : $vdir       - View entry to process
341
# Inputs          : $vdir       - View entry to process
341
#                   $rtagid     - RtagId
342
#                   $rtagid     - RtagId
342
#
343
#
343
# Returns         : True, If we need to create a new view
344
# Returns         : True, If we need to create a new view
Line 359... Line 360...
359
    if (open (my $rf, '<', $releaseListFile ))
360
    if (open (my $rf, '<', $releaseListFile ))
360
    {
361
    {
361
        while (my $data = <$rf>)
362
        while (my $data = <$rf>)
362
        {
363
        {
363
            $data =~ s~\s+$~~;
364
            $data =~ s~\s+$~~;
-
 
365
            $data = baseVersionNumber ($data );
364
            $pkgsUsed{$data} = 2;
366
            $pkgsUsed{$data} = 2;
365
        }
367
        }
366
    }
368
    }
367
    else
369
    else
368
    {
370
    {
Line 375... Line 377...
375
    #
377
    #
376
    foreach my $pvid (keys %{$ReleaseData{$rtagid}{data}})
378
    foreach my $pvid (keys %{$ReleaseData{$rtagid}{data}})
377
    {
379
    {
378
        my $entry = $Packages{$pvid};
380
        my $entry = $Packages{$pvid};
379
        my $fullName = join('_', $entry->{name}, $entry->{ver});
381
        my $fullName = join('_', $entry->{name}, $entry->{ver});
-
 
382
        $fullName = baseVersionNumber ($fullName );
380
        $pkgsUsed{$fullName}++;
383
        $pkgsUsed{$fullName}++;
381
    }
384
    }
382
 
385
 
383
    my $needNewView = 0;
386
    my $needNewView = 0;
384
    #
387
    #
Line 1266... Line 1269...
1266
    #
1269
    #
1267
    my $markerfile = catfile($tdir, '.lxrAge');
1270
    my $markerfile = catfile($tdir, '.lxrAge');
1268
    unlink $markerfile;
1271
    unlink $markerfile;
1269
}
1272
}
1270
 
1273
 
-
 
1274
#-------------------------------------------------------------------------------
-
 
1275
# Function        : baseVersionNumber 
-
 
1276
#
-
 
1277
# Description     : Remove the build number from a package-version string 
-
 
1278
#
-
 
1279
# Inputs          : Package-Version string 
-
 
1280
#
-
 
1281
# Returns         : Version String with a build # of 0
-
 
1282
#                   Will return a non-standard string, but one that can be used for comparisons
-
 
1283
#
-
 
1284
sub baseVersionNumber
-
 
1285
{
-
 
1286
    my ($version) = @_;
-
 
1287
    my $iversion = $version;
-
 
1288
 
-
 
1289
    #
-
 
1290
    #   Look for a patchRipple.suffix
-
 
1291
    #
-
 
1292
    if ( $version =~ m~(.*?)\.([0-9]{4,6})(\.\w+)$~ )
-
 
1293
    {
-
 
1294
        my $part1 = $1;
-
 
1295
        my $patch = $2;
-
 
1296
        my $suffix = $3;
-
 
1297
        my $build;
-
 
1298
 
-
 
1299
        if ( length( $patch) >= 4 )
-
 
1300
        {
-
 
1301
            $build = substr( $patch, -3 ,3);
-
 
1302
            $patch = substr( $patch,  0 ,length($patch)-3);
-
 
1303
 
-
 
1304
            $version = $part1 . sprintf (".%3.3d.%3.3d", $patch, 0) . $suffix;
-
 
1305
        }
-
 
1306
    }
-
 
1307
    else
-
 
1308
    {
-
 
1309
        Verbose("baseVersionNumber. Could not massge: $iversion");
-
 
1310
    }
-
 
1311
    return $version;
-
 
1312
}
-
 
1313
 
1271
 
1314
 
1272
#-------------------------------------------------------------------------------
1315
#-------------------------------------------------------------------------------
1273
#   Documentation
1316
#   Documentation
1274
#
1317
#
1275
 
1318