Changeset 537 in ProjectBuilder
- Timestamp:
- Sep 10, 2008, 11:47:49 AM (16 years ago)
- Location:
- devel/pb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb/bin/pb
r529 r537 496 496 pb_log(2,"def:".Dumper($defpkgdir)." ext: ".Dumper($extpkgdir)." \n"); 497 497 498 # Exporting from CMS499 pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest);498 # Exporting content from CMS 499 my $preserve = pb_cms_export($uri,"$ENV{'PBDIR'}/$dir",$dest); 500 500 501 501 # Generated fake content for test versions to speed up stuff … … 679 679 # Archive dest dir 680 680 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 } 683 691 pb_log(0,"Under $ENV{'PBDESTDIR'}/$pbpkg-$pbver.tar.gz\n"); 684 692 pb_system("tar cfz $pbpkg-$pbver.pbconf.tar.gz $pbpkg-$pbver/pbconf","Creating pbconf tar files compressed"); -
devel/pb/lib/ProjectBuilder/CMS.pm
r527 r537 112 112 The second parameter is the directory in which it is locally exposed (result of a checkout). If undef, then use the original CMS content. 113 113 The third parameter is the directory where we want to deliver it (result of export). 114 It returns the original tar file if we need to preserve it and undef if we use the produced one. 114 115 115 116 =cut … … 150 151 die "Unable to download $uri.\nNo wget/curl available, please install one of those"; 151 152 } 153 # We want to preserve the original tar file 152 154 pb_cms_export("file://$ENV{'PBTMP'}/$f",$source,$destdir); 155 return("$ENV{'PBTMP'}/$f"); 153 156 } elsif ($scheme eq "file") { 154 157 use File::MimeInfo; 155 158 my $mm = mimetype($path); 156 159 pb_log(2,"mimetype: $mm\n"); 157 pb_mkdir_p($destdir);158 160 159 161 if (defined $source) { 160 162 # Check whether the file is well formed 161 163 # (containing already a directory with the project-version name) 164 # 165 # If it's not the case, we try to adapt, but distro needing 166 # to verify the checksum will have issues (Fedora) 167 # Then upstream should be notified that they need to change their rules 162 168 my ($pbwf) = pb_conf_get_if("pbwf"); 163 169 if ((defined $pbwf) && (defined $pbwf->{$ENV{'PBPROJ'}})) { … … 165 171 } 166 172 } 173 pb_mkdir_p($destdir); 167 174 168 175 if ($mm =~ /\/x-bzip-compressed-tar$/) { … … 210 217 die "cms $scheme unknown"; 211 218 } 219 return(undef); 212 220 } 213 221
Note:
See TracChangeset
for help on using the changeset viewer.