[haiku-commits] r37465 - in haiku/trunk: build/jam data/bin

  • From: mattmadia@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 11 Jul 2010 00:38:47 +0200 (CEST)

Author: mmadia
Date: 2010-07-11 00:38:47 +0200 (Sun, 11 Jul 2010)
New Revision: 37465
Changeset: http://dev.haiku-os.org/changeset/37465/haiku

Modified:
   haiku/trunk/build/jam/HaikuImage
   haiku/trunk/build/jam/ImageRules
   haiku/trunk/data/bin/installoptionalpackage
Log:
Some improvements for installoptionalpackage
 * copy the needed jam files during compile time. This ensures the correct data
 files are used, for example in non-trunk builds
 * -f now only removes the generated at runtime listing of available packages


Modified: haiku/trunk/build/jam/HaikuImage
===================================================================
--- haiku/trunk/build/jam/HaikuImage    2010-07-10 21:37:29 UTC (rev 37464)
+++ haiku/trunk/build/jam/HaikuImage    2010-07-10 22:38:47 UTC (rev 37465)
@@ -318,8 +318,14 @@
 SEARCH on install-wifi-firmwares.sh = [ FDirName $(HAIKU_TOP) data bin ] ;
 AddFilesToHaikuImage system bin                        : 
install-wifi-firmwares.sh ;
 
-# Record the installed optional packages. To be used by installoptionalpackage.
+# Add the files to be used by installoptionalpackage.
 AddDirectoryToHaikuImage common data optional-packages ;
+local optional-pkg-files = OptionalBuildFeatures OptionalPackageDependencies
+       OptionalPackages ;
+for name in $(optional-pkg-files) {
+       local file = [ FDirName $(HAIKU_TOP) build jam $(name) ] ;
+       AddFilesToHaikuImage common data optional-packages : $(file) ;
+}
 AddInstalledPackagesFileToHaikuImage ;
 
 AddSymlinkToHaikuImage system bin : bash : sh ;

Modified: haiku/trunk/build/jam/ImageRules
===================================================================
--- haiku/trunk/build/jam/ImageRules    2010-07-10 21:37:29 UTC (rev 37464)
+++ haiku/trunk/build/jam/ImageRules    2010-07-10 22:38:47 UTC (rev 37465)
@@ -934,7 +934,7 @@
        Always $(file) ;
        MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
        BuildHaikuImageInstalledPackagesFile $(file) ;
-       AddFilesToHaikuImage common data : $(file) ;
+       AddFilesToHaikuImage common data optional-packages : $(file) ;
 }
 
 actions BuildHaikuImageInstalledPackagesFile

Modified: haiku/trunk/data/bin/installoptionalpackage
===================================================================
--- haiku/trunk/data/bin/installoptionalpackage 2010-07-10 21:37:29 UTC (rev 
37464)
+++ haiku/trunk/data/bin/installoptionalpackage 2010-07-10 22:38:47 UTC (rev 
37465)
@@ -43,7 +43,6 @@
 # as they require either the source code or compiled binaries
 declare packageIgnoreList="Bluetooth Development DevelopmentMin \
 DevelopmentBase MandatoryPackages UserlandFS Welcome WifiFirmwareScriptData "
-installedPackagesFile="`finddir B_COMMON_DATA_DIRECTORY`/InstalledPackages"
 
 
 function CreateInstallerScript()
@@ -337,6 +336,8 @@
        tmpDir=`finddir B_COMMON_TEMP_DIRECTORY`
        libDir=`finddir B_SYSTEM_LIB_DIRECTORY`
 
+       installedPackagesFile="${baseDir}/InstalledPackages"
+
        # Make sure these files are empty.
        echo "" > ${tmpDir}/optpkg.jam
        echo "" > ${tmpDir}/optpkg.stage1
@@ -783,8 +784,8 @@
 {
        # RemoveCachedFiles
        echo "Removing cached files ..."
-       if [ -d ${baseDir} ]; then
-               rm -rf ${baseDir}
+       if [ -e ${baseDir}/OptionalPackageNames ]; then
+               rm ${baseDir}/OptionalPackageNames
        fi
 
        # Unset variables, which prevents duplicate entries.


Other related posts:

  • » [haiku-commits] r37465 - in haiku/trunk: build/jam data/bin - mattmadia