Subversion Repositories DevTools

Rev

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

Rev 1598 Rev 1600
Line 201... Line 201...
201
 
201
 
202
my ($m_UID)  = "";
202
my ($m_UID)  = "";
203
my ($m_GID)  = "";
203
my ($m_GID)  = "";
204
my ($m_MASK) = "";
204
my ($m_MASK) = "";
205
my ($m_KEEP_MASK) = "";
205
my ($m_KEEP_MASK) = "";
-
 
206
my ($m_KEEP_LINKS) = "";
206
 
207
 
207
 
208
 
208
#------------------------------------------------------------------------------
209
#------------------------------------------------------------------------------
209
# Variables global/local to this package
210
# Variables global/local to this package
210
#------------------------------------------------------------------------------
211
#------------------------------------------------------------------------------
Line 2814... Line 2815...
2814
    installDpkgArchiveFile("doc", $sfile, $targetTag);
2815
    installDpkgArchiveFile("doc", $sfile, $targetTag);
2815
 
2816
 
2816
    return 1;
2817
    return 1;
2817
}
2818
}
2818
 
2819
 
-
 
2820
 
2819
#------------------------------------------------------------------------------
2821
#------------------------------------------------------------------------------
2820
sub installDpkgArchiveBinFile
2822
sub installDpkgArchiveBinFile
2821
#
2823
#
2822
# Description:
2824
# Description:
2823
#       This sub-routine is used to install a binary file from the
2825
#       This sub-routine is used to install a binary file from the
Line 5996... Line 5998...
5996
#       This sub-routine is used to create the required package prototype file
5998
#       This sub-routine is used to create the required package prototype file
5997
#       fom a known directory struture using the a=b format.
5999
#       fom a known directory struture using the a=b format.
5998
#
6000
#
5999
#------------------------------------------------------------------------------
6001
#------------------------------------------------------------------------------
6000
{
6002
{
6001
    my ($opt_keep_mask, @args);
6003
    my ($opt_keep_mask, $opt_keep_links, @args);
6002
 
6004
 
6003
    #
6005
    #
6004
    #   Process the arguments and extract parameters and options
6006
    #   Process the arguments and extract parameters and options
6005
    #
6007
    #
6006
    foreach ( @_ )
6008
    foreach ( @_ )
6007
    {
6009
    {
6008
        if ( m/^--KeepMask/ ) {
6010
        if ( m/^--KeepMask/ ) {
6009
            $opt_keep_mask = 1;
6011
            $opt_keep_mask = 1;
6010
 
6012
 
-
 
6013
        } elsif ( m/^--KeepLinks/ ) {
-
 
6014
            $opt_keep_links = 1;
-
 
6015
 
6011
        } elsif ( m/^--/ ) {
6016
        } elsif ( m/^--/ ) {
6012
            Error("createPrototypeFile2: Unknown option: $_")
6017
            Error("createPrototypeFile2: Unknown option: $_")
6013
 
6018
 
6014
        } else {
6019
        } else {
6015
            push @args, $_;
6020
            push @args, $_;
Line 6078... Line 6083...
6078
    #
6083
    #
6079
    $m_UID  = $uid;
6084
    $m_UID  = $uid;
6080
    $m_GID  = $gid;
6085
    $m_GID  = $gid;
6081
    $m_MASK = $mask;
6086
    $m_MASK = $mask;
6082
    $m_KEEP_MASK = $opt_keep_mask;
6087
    $m_KEEP_MASK = $opt_keep_mask;
-
 
6088
    $m_KEEP_LINKS = $opt_keep_links;
6083
 
6089
 
6084
 
6090
 
6085
    # now we need to add entries for each directory we will 
6091
    # now we need to add entries for each directory we will 
6086
    # be installing 
6092
    # be installing 
6087
    File::Find::find(\&prototype2Find, "$targetBaseDir");
6093
    File::Find::find(\&prototype2Find, "$targetBaseDir");
Line 6256... Line 6262...
6256
            }
6262
            }
6257
 
6263
 
6258
            open ( FILE, ">> $pfile") or
6264
            open ( FILE, ">> $pfile") or
6259
                Error("Failed to open file [$pfile].");
6265
                Error("Failed to open file [$pfile].");
6260
 
6266
 
-
 
6267
            if ( $m_KEEP_LINKS && -l "$m_sfile" )
-
 
6268
            {
-
 
6269
                my $linkDest = readlink($m_sfile);
-
 
6270
                Warning("Link $m_sfile has an absolute path, may not be a problem but make sure its what you want") if ( $linkDest =~ /^\// );
-
 
6271
                printf FILE ("s none $file=$linkDest\n");
-
 
6272
            }
6261
            if ( -f "$m_sfile" )
6273
            elsif ( -f "$m_sfile" )
6262
            {
6274
            {
6263
                printf FILE ("f none $file=$file $fmask $m_UID $m_GID\n");
6275
                printf FILE ("f none $file=$file $fmask $m_UID $m_GID\n");
6264
            }
6276
            }
6265
 
-
 
6266
            if ( -d "$m_sfile" )
6277
            elsif ( -d "$m_sfile" )
6267
            {
6278
            {
6268
                printf FILE ("d none $file $fmask $m_UID $m_GID\n");
6279
                printf FILE ("d none $file $fmask $m_UID $m_GID\n");
6269
            }
6280
            }
6270
 
6281
 
6271
            close (FILE);
6282
            close (FILE);