Subversion Repositories DevTools

Rev

Rev 1584 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1584 Rev 1586
Line 1376... Line 1376...
1376
#       If it has any problems it will log an error and stop processing.
1376
#       If it has any problems it will log an error and stop processing.
1377
#
1377
#
1378
# Inputs          : targetTag       - Target directory      [Mandatory]
1378
# Inputs          : targetTag       - Target directory      [Mandatory]
1379
#                   package         - Source Package        [Mandatory]
1379
#                   package         - Source Package        [Mandatory]
1380
#                   options         - Optional options
1380
#                   options         - Optional options
-
 
1381
#                                       --Subdir=path       [Default is pkg root]
1381
#                                       --NoRecurse
1382
#                                       --NoRecurse
1382
#                                       --Recurse           [default]
1383
#                                       --Recurse           [default]
1383
#                                       --Flatten
1384
#                                       --Flatten
1384
#                                       --NoFlatten         [default]
1385
#                                       --NoFlatten         [default]
1385
#                                       --FilterIn=xx
1386
#                                       --FilterIn=xx
Line 1416... Line 1417...
1416
    my $dstDir;
1417
    my $dstDir;
1417
    my @args;
1418
    my @args;
1418
    my $src_base_dir;
1419
    my $src_base_dir;
1419
    my $warning = 1;
1420
    my $warning = 1;
1420
    my $search =  LocateFiles->new(recurse => 1);
1421
    my $search =  LocateFiles->new(recurse => 1);
-
 
1422
    my $subdir;
1421
    
1423
    
1422
    #
1424
    #
1423
    #   Process the arguments and extract parameters and options
1425
    #   Process the arguments and extract parameters and options
1424
    #
1426
    #
1425
    foreach ( @_ )
1427
    foreach ( @_ )
Line 1452... Line 1454...
1452
            $warning = 0;
1454
            $warning = 0;
1453
 
1455
 
1454
        } elsif ( /^--Warn/ ) {
1456
        } elsif ( /^--Warn/ ) {
1455
            $warning = 1;
1457
            $warning = 1;
1456
 
1458
 
-
 
1459
        } elsif ( /^--Subdir=(.*)/ ) {
-
 
1460
            $subdir = $1;
-
 
1461
            
1457
        } elsif ( m/^--/ ) {
1462
        } elsif ( m/^--/ ) {
1458
            Error("installDpkgArchivePkgRaw: Unknown option: $_")
1463
            Error("installDpkgArchivePkgRaw: Unknown option: $_")
1459
 
1464
 
1460
        } else {
1465
        } else {
1461
            push @args, $_;
1466
            push @args, $_;
Line 1485... Line 1490...
1485
 
1490
 
1486
    #
1491
    #
1487
    #   Convert the package name into a real path name to the package as
1492
    #   Convert the package name into a real path name to the package as
1488
    #   held in dpkg_archive. Do not use the copy in the 'interface' directory
1493
    #   held in dpkg_archive. Do not use the copy in the 'interface' directory
1489
    #
1494
    #
1490
    $src_base_dir = LocatePackageBase ( "installDpkgArchivePkgRaw", $pkgName );
1495
    $src_base_dir = LocatePackageBase ( "installDpkgArchivePkgRaw", $pkgName, $subdir );
1491
 
1496
 
1492
    #
1497
    #
1493
    #   Build up a list of files to copy
1498
    #   Build up a list of files to copy
1494
    #   Creating a list allows:
1499
    #   Creating a list allows:
1495
    #       Simplified coding
1500
    #       Simplified coding
Line 7418... Line 7423...
7418
        #   Mainatin a cache of located packages
7423
        #   Mainatin a cache of located packages
7419
        #
7424
        #
7420
        $LocatePackageBase_cache{$PkgName} = $src_base_dir;
7425
        $LocatePackageBase_cache{$PkgName} = $src_base_dir;
7421
    }
7426
    }
7422
 
7427
 
7423
    if ( $PkgSubDir )
7428
    if ( defined $PkgSubDir )
7424
    {
7429
    {
7425
        $src_base_dir .= '/' . $PkgSubDir;
7430
        $src_base_dir .= '/' . $PkgSubDir;
7426
        Error ("$ufn: Package subdirectory not found: $PkgSubDir" )
7431
        Error ("$ufn: Package subdirectory not found: $PkgSubDir" )
7427
            unless ( -d $src_base_dir );
7432
            unless ( -d $src_base_dir );
7428
    }
7433
    }