Changeset 537 in ProjectBuilder for devel/pb/bin/pb


Ignore:
Timestamp:
Sep 10, 2008, 11:47:49 AM (16 years ago)
Author:
Bruno Cornec
Message:

Fix #31: pb now preserves by default original tar files got by http or ftp to allow for checksum consistency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel/pb/bin/pb

    r529 r537  
    496496        pb_log(2,"def:".Dumper($defpkgdir)." ext: ".Dumper($extpkgdir)." \n");
    497497
    498         # Exporting from CMS
    499         pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest);
     498        # Exporting content from CMS
     499        my $preserve = pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest);
    500500
    501501        # Generated fake content for test versions to speed up stuff
     
    679679        # Archive dest dir
    680680        chdir "$ENV{'PBDESTDIR'}" || die "Unable to change dir to $ENV{'PBDESTDIR'}";
    681         # Possibility to look at PBSRC to guess more the filename
    682         pb_system("tar cfz $pbpkg-$pbver.tar.gz --exclude=$pbpkg-$pbver/pbconf $pbpkg-$pbver","Creating $pbpkg tar files compressed");
     681        if (defined $preserve) {
     682            # In that case we want to preserve the original tar file for checksum purposes
     683            # The one created is btw equivalent in that case to this one
     684            # Maybe check basename of both to be sure they are the same ?
     685            pb_log(0,"Preserving original tar file ");
     686            move("$preserve","$pbpkg-$pbver.tar.gz");
     687        } else {
     688            # Possibility to look at PBSRC to guess more the filename
     689            pb_system("tar cfz $pbpkg-$pbver.tar.gz --exclude=$pbpkg-$pbver/pbconf $pbpkg-$pbver","Creating $pbpkg tar files compressed");
     690        }
    683691        pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n");
    684692        pb_system("tar cfz $pbpkg-$pbver.pbconf.tar.gz $pbpkg-$pbver/pbconf","Creating pbconf tar files compressed");
Note: See TracChangeset for help on using the changeset viewer.