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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37465 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matt Madia 2010-07-10 22:38:47 +00:00
parent 0537120f12
commit 61fae90060
3 changed files with 12 additions and 5 deletions

View File

@ -318,8 +318,14 @@ AddFilesToHaikuImage system bin : installoptionalpackage ;
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 ;

View File

@ -934,7 +934,7 @@ rule AddInstalledPackagesFileToHaikuImage
Always $(file) ;
MakeLocate $(file) : $(HAIKU_COMMON_PLATFORM_OBJECT_DIR) ;
BuildHaikuImageInstalledPackagesFile $(file) ;
AddFilesToHaikuImage common data : $(file) ;
AddFilesToHaikuImage common data optional-packages : $(file) ;
}
actions BuildHaikuImageInstalledPackagesFile

View File

@ -43,7 +43,6 @@ declare alreadyInstalled=""
# 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 @@ function Init()
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 @@ function RemoveCachedFiles()
{
# 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.