[haiku-commits] r40690 - in haiku/branches/features/package-management: build/jam build/scripts data/system/boot src/kits/package src/servers/input ...

  • From: zooey@xxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 26 Feb 2011 00:25:56 +0100 (CET)

Author: zooey
Date: 2011-02-26 00:25:55 +0100 (Sat, 26 Feb 2011)
New Revision: 40690
Changeset: http://dev.haiku-os.org/changeset/40690

Modified:
   haiku/branches/features/package-management/build/jam/HaikuImage
   haiku/branches/features/package-management/build/jam/ImageRules
   haiku/branches/features/package-management/build/jam/OptionalPackages
   haiku/branches/features/package-management/build/scripts/build_haiku_image
   haiku/branches/features/package-management/data/system/boot/SetupEnvironment
   haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp
   haiku/branches/features/package-management/src/servers/input/AddOnManager.cpp
   haiku/branches/features/package-management/src/system/kernel/fs/vfs_boot.cpp
Log:
* several adjustments in order to get the gcc2 package onto the image
  and into a working state
The compiler (and the rest of the system) seems to be working ok, just the 
input server hangs consistently during shutdown - will investigate tomorrow

Modified: haiku/branches/features/package-management/build/jam/HaikuImage
===================================================================
--- haiku/branches/features/package-management/build/jam/HaikuImage     
2011-02-25 23:05:54 UTC (rev 40689)
+++ haiku/branches/features/package-management/build/jam/HaikuImage     
2011-02-25 23:25:55 UTC (rev 40690)
@@ -89,7 +89,7 @@
        libmail.so libmedia.so libmidi.so libmidi2.so
        libnetwork.so
        libpng.so
-       <revisioned>libroot.so libroot-addon-icu.so
+       <revisioned>libroot.so
        libscreensaver.so
        libtextencoding.so libtiff.so libtracker.so libtranslation.so
        libz.so
@@ -100,6 +100,7 @@
        libfluidsynth.so
        libilmimf.so
        liblpsolve55.so
+       libroot-addon-icu.so
 ;
 SYSTEM_SERVERS = app_server cddb_daemon debug_server input_server mail_daemon
        media_addon_server media_server midi_server mount_server net_server
@@ -357,7 +358,7 @@
 local linkTarget ;
 for linkTarget in $(DESKBAR_APPLICATIONS) {
        AddSymlinkToHaikuImage home config be Applications
-               : /boot/system/apps/$(linkTarget) : $(linkTarget) ;
+               : /boot/system/tree/apps/$(linkTarget) : $(linkTarget) ;
 }
 
 # Deskbar Desktop applets links
@@ -367,7 +368,7 @@
 ;
 for linkTarget in $(DESKBAR_DESKTOP_APPLETS) {
        AddSymlinkToHaikuImage home config be Desktop\ applets
-               : /boot/system/apps/$(linkTarget) : $(linkTarget) ;
+               : /boot/system/tree/apps/$(linkTarget) : $(linkTarget) ;
 }
 
 # Deskbar Preferences links
@@ -375,14 +376,14 @@
 DESKBAR_PREFERENCES = $(SYSTEM_PREFERENCES:B) ;
 for linkTarget in $(DESKBAR_PREFERENCES) {
        AddSymlinkToHaikuImage home config be Preferences
-               : /boot/system/preferences/$(linkTarget) : $(linkTarget) ;
+               : /boot/system/tree/preferences/$(linkTarget) : $(linkTarget) ;
 }
 
 # Deskbar Demo links
 AddDirectoryToHaikuImage home config be Demos ;
 for linkTarget in $(SYSTEM_DEMOS) {
        AddSymlinkToHaikuImage home config be Demos
-               : /boot/system/demos/$(linkTarget) : $(linkTarget) ;
+               : /boot/system/tree/demos/$(linkTarget) : $(linkTarget) ;
 }
 
 AddSymlinkToHaikuImage system tree bin : bzip2 : bunzip2 ;
@@ -538,11 +539,11 @@
        : FileType-F Mark\ as… Mark\ as\ Read-R Open\ Target\ Folder-O
        Open\ Terminal-T ZipOMatic-Z ;
 AddSymlinkToHaikuImage system tree add-ons Tracker
-       : /boot/system/preferences/Backgrounds : Background-B ;
+       : /boot/system/tree/preferences/Backgrounds : Background-B ;
 AddSymlinkToHaikuImage system tree add-ons Tracker
-       : /boot/system/apps/TextSearch : TextSearch-G ;
+       : /boot/system/tree/apps/TextSearch : TextSearch-G ;
 AddSymlinkToHaikuImage system tree add-ons Tracker
-       : /boot/system/apps/DiskUsage : DiskUsage-I ;
+       : /boot/system/tree/apps/DiskUsage : DiskUsage-I ;
 AddFilesToHaikuImage system tree add-ons input_server devices
        : <input>keyboard <input>mouse <input>wacom ;
 AddFilesToHaikuImage system tree add-ons input_server filters

Modified: haiku/branches/features/package-management/build/jam/ImageRules
===================================================================
--- haiku/branches/features/package-management/build/jam/ImageRules     
2011-02-25 23:05:54 UTC (rev 40689)
+++ haiku/branches/features/package-management/build/jam/ImageRules     
2011-02-25 23:25:55 UTC (rev 40690)
@@ -679,6 +679,8 @@
 {
        # AddSymlinkToHaikuImage <directory> : <link target> [ : <link name> ] ;
 
+       linkTarget = $(linkTarget:J=/) ;
+
        AddSymlinkToContainer $(HAIKU_IMAGE_CONTAINER_NAME) : $(directoryTokens)
                : $(linkTarget) : $(linkName) ;
 }
@@ -829,6 +831,15 @@
        }
 }
 
+rule InstallCommonPackage package : url
+{
+       # download archive file
+       local archiveFile = [ DownloadFile $(package) : $(url) ] ;
+
+       # copy onto image
+       ExtractArchiveToHaikuImage common packages : $(archiveFile) ;
+}
+
 rule InstallOptionalHaikuImagePackage package : url : dirTokens : isCDPackage
        : isGCCAgnostic
 {

Modified: haiku/branches/features/package-management/build/jam/OptionalPackages
===================================================================
--- haiku/branches/features/package-management/build/jam/OptionalPackages       
2011-02-25 23:05:54 UTC (rev 40689)
+++ haiku/branches/features/package-management/build/jam/OptionalPackages       
2011-02-25 23:25:55 UTC (rev 40690)
@@ -223,7 +223,7 @@
                : system tree documentation
        ;
        AddSymlinkToHaikuImage home Desktop
-               : /boot/system/documentation/bebook/index.html : BeBook ;
+               : /boot/system/tree/documentation/bebook/index.html : BeBook ;
 }
 
 
@@ -252,12 +252,12 @@
                Echo "No optional package BeOSCompatibility available for gcc4" 
;
        } else {
                Echo "Warning: Adding BeOS compatibility symlinks. This will go 
away. Please fix your apps!" ;
-               AddSymlinkToHaikuImage beos : ../system/apps ;
-               AddSymlinkToHaikuImage beos : ../system/bin ;
-               AddSymlinkToHaikuImage beos : ../system/documentation ;
-               AddSymlinkToHaikuImage beos : ../common/etc ;
-               AddSymlinkToHaikuImage beos : ../system/preferences ;
-               AddSymlinkToHaikuImage beos : ../system ;
+               AddSymlinkToHaikuImage beos : ../system/tree/apps ;
+               AddSymlinkToHaikuImage beos : ../system/tree/bin ;
+               AddSymlinkToHaikuImage beos : ../system/tree/documentation ;
+               AddSymlinkToHaikuImage beos : ../common/settings/etc ;
+               AddSymlinkToHaikuImage beos : ../system/tree/preferences ;
+               AddSymlinkToHaikuImage beos : ../system/tree ;
                AddDirectoryToHaikuImage var ;
                AddSymlinkToHaikuImage var : /boot/common/var/log ;
                AddSymlinkToHaikuImage var : /boot/common/cache/tmp ;
@@ -335,8 +335,8 @@
                && $(HAIKU_GCC_VERSION[1]) in 2 4 {
                local arch = $(TARGET_ARCH) ;
                local abi = gcc$(HAIKU_GCC_VERSION[1]) ;
-               AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
-                       : /system/lib libbluetooth.so : : true ;
+               AddSymlinkToHaikuHybridImage system tree develop lib
+                       : /system/tree/lib libbluetooth.so : : true ;
        }
 }
 
@@ -571,9 +571,13 @@
                && $(TARGET_ARCH) = x86 {
        # gcc and binutils
        if $(HAIKU_GCC_VERSION[1]) = 2 || $(isHybridBuild) {
-               InstallOptionalHaikuImagePackage
-                       gcc-2.95.3-x86-2011-02-24.zip
-                       : $(myBaseURL)/gcc-2.95.3-x86-2011-02-24.zip ;
+               InstallCommonPackage
+                       gcc-2.95.3_110225-1.hpkg
+                       : $(baseURL)/gcc-2.95.3_110225.hpkg ;
+
+               # TODO: remove this when we have a mechanism to switch gcc via 
PATH
+               AddSymlinkToHaikuImage common settings develop tools
+                       : /boot/common/tree/develop/tools/gcc-2.95.3-110225 : 
current ;
        }
 
        if $(HAIKU_GCC_VERSION[1]) = 4 || $(isHybridBuild) {
@@ -635,7 +639,7 @@
        local developDirTokens = system tree develop ;
 
        # glue code
-       AddFilesToHaikuImage ($developDirTokens) lib :
+       AddFilesToHaikuImage $(developDirTokens) lib :
                <src!system!glue!arch!$(arch)>crti.o
                <src!system!glue!arch!$(arch)>crtn.o
                <src!system!glue>init_term_dyn.o
@@ -653,12 +657,13 @@
        # library symlinks
        local lib ;
        for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) 
$(developmentLibs) {
-               AddSymlinkToHaikuImage $(developDirTokens) lib : /system/lib 
$(lib:BS) ;
+               AddSymlinkToHaikuImage $(developDirTokens) lib
+                       : /system/tree/lib $(lib:BS) ;
                local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) 
] ;
                if $(abiVersion) {
                        local abiVersionedLib = $(lib:BS).$(abiVersion) ;
                        AddSymlinkToHaikuImage $(developDirTokens) lib
-                               : /system/lib $(abiVersionedLib) ;
+                               : /system/tree/lib $(abiVersionedLib) ;
                }
        }
 
@@ -710,8 +715,8 @@
        # cpp headers
        if $(HAIKU_GCC_VERSION[1]) = 2 {
                # GCC 2 only -- for GCC 4 they come with the DevelopmentBase 
package
-               CopyDirectoryToHaikuImage $(developDirTokens) headers
-                       : [ FDirName $(HAIKU_TOP) headers cpp ] : : -x .svn ;
+               CopyDirectoryToHaikuImage $(developDirTokens) headers c++
+                       : [ FDirName $(HAIKU_TOP) headers cpp ] : 2.95.3 : -x 
.svn ;
        }
 }
 
@@ -923,7 +928,7 @@
                abiVersionedLib = $(abiVersionedLib:G=) ;
                local lib = $(abiVersionedLib:B) ;
                AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
-                       : /system/lib $(abiVersionedLib) : : true ;
+                       : /system/tree/lib $(abiVersionedLib) : : true ;
                AddSymlinkToHaikuHybridImage develop abi $(arch) $(abi) lib
                        : $(abiVersionedLib) : $(lib) ;
        }
@@ -1656,9 +1661,9 @@
                local lib ;
                for lib in $(userlandfsLibs) {
                        AddSymlinkToHaikuImage develop abi $(arch) $(abi) lib
-                               : /system/lib/$(lib:BS) ;
+                               : /system/tree/lib/$(lib:BS) ;
                        AddSymlinkToAlternativeGCCArchive develop abi $(arch) 
$(abi) lib
-                               : /system/lib/$(arch)/$(lib:BS) ;
+                               : /system/tree/lib/$(arch)/$(lib:BS) ;
                }
 
                # FUSE headers
@@ -1750,9 +1755,10 @@
                : [ FDirName $(HAIKU_TOP) docs userguide ]
                : userguide : -x .svn ;
        AddSymlinkToHaikuImage home Desktop
-               : /boot/system/documentation/welcome/welcome_en.html : Welcome ;
+               : /boot/system/tree/documentation/welcome/welcome_en.html : 
Welcome ;
        AddSymlinkToHaikuImage home Desktop
-               : /boot/system/documentation/userguide/en/contents.html : User\ 
Guide ;
+               : /boot/system/tree/documentation/userguide/en/contents.html
+               : User\ Guide ;
 }
 
 

Modified: 
haiku/branches/features/package-management/build/scripts/build_haiku_image
===================================================================
--- haiku/branches/features/package-management/build/scripts/build_haiku_image  
2011-02-25 23:05:54 UTC (rev 40689)
+++ haiku/branches/features/package-management/build/scripts/build_haiku_image  
2011-02-25 23:25:55 UTC (rev 40690)
@@ -151,19 +151,23 @@
        extractedSubDir=$3
        isGCCAgnostic=$4
 
-       echo "Extracting $archiveFile ..."
-
        extractDir=$tmpDir/extract
        $rmAttrs -rf "$extractDir"
        mkdir -p "$extractDir"
 
        case "$archiveFile" in
                *.zip)
+                       echo "Extracting $archiveFile ..."
                        $unzip -q -d "$extractDir" "$archiveFile"
                        ;;
                *.tgz|*.tar.gz)
+                       echo "Extracting $archiveFile ..."
                        tar -C "$extractDir" -xf "$archiveFile"
                        ;;
+               *.hpkg)
+                       echo "Adding package $archiveFile ..."
+                       cp "$archiveFile" "$extractDir"
+                       ;;
                *)
                        echo "Unhandled archive extension in build_haiku_image 
extractFile()"
                        exit 1

Modified: 
haiku/branches/features/package-management/data/system/boot/SetupEnvironment
===================================================================
--- 
haiku/branches/features/package-management/data/system/boot/SetupEnvironment    
    2011-02-25 23:05:54 UTC (rev 40689)
+++ 
haiku/branches/features/package-management/data/system/boot/SetupEnvironment    
    2011-02-25 23:25:55 UTC (rev 40690)
@@ -5,11 +5,10 @@
 
 export HOME=/boot/home
 
-BUILDHOME_COMMON=/boot/common/tree/develop
-BUILDHOME_SYSTEM=/boot/system/tree/develop
+BUILDHOME=/boot/system/tree/develop
 
 #TODO: fix this or drop it!
-BETOOLS="$BUILDHOME_COMMON/tools/gnupro/bin"
+BETOOLS="/boot/common/settings/develop/tools/current/bin"
 
 case `uname -m` in
 BePC|Intel|unknown)
@@ -22,10 +21,10 @@
        BE_HOST_CPU=unknown
 esac
 
-BELIBRARIES="/boot/common/tree/lib:$BUILDHOME_SYSTEM/lib"
+BELIBRARIES="/boot/common/tree/lib:$BUILDHOME/lib"
 
 # TODO: do we need these at all?
-BH=$BUILDHOME_SYSTEM/headers
+BH=$BUILDHOME/headers
 
BEINCLUDES="$BH;$BH/be;$BH/posix;$BH/glibc;$BH/cpp;$BH/be/app;$BH/be/device;$BH/be/interface;$BH/be/locale;$BH/be/media;$BH/be/midi;$BH/be/midi2;$BH/be/net;$BH/be/kernel;$BH/be/storage;$BH/be/support;$BH/be/game;$BH/be/opengl;$BH/be/drivers;$BH/gnu;$BH/be/mail;$BH/be/translation;$BH/be/devel;$BH/be/add-ons/graphics;$BH/be/be_apps/Deskbar;$BH/be/be_apps/NetPositive;$BH/be/be_apps/Tracker"
 
 export BUILDHOME

Modified: 
haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp
===================================================================
--- haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp 
2011-02-25 23:05:54 UTC (rev 40689)
+++ haiku/branches/features/package-management/src/kits/package/PackageInfo.cpp 
2011-02-25 23:25:55 UTC (rev 40690)
@@ -277,7 +277,7 @@
                {
                        const char* start = fPos;
                        while (isalnum(*fPos) || *fPos == '.' || *fPos == '-'
-                               || *fPos == '_' || *fPos == ':') {
+                               || *fPos == '_' || *fPos == ':' || *fPos == 
'+') {
                                fPos++;
                        }
                        if (fPos == start)

Modified: 
haiku/branches/features/package-management/src/servers/input/AddOnManager.cpp
===================================================================
--- 
haiku/branches/features/package-management/src/servers/input/AddOnManager.cpp   
    2011-02-25 23:05:54 UTC (rev 40689)
+++ 
haiku/branches/features/package-management/src/servers/input/AddOnManager.cpp   
    2011-02-25 23:25:55 UTC (rev 40690)
@@ -263,7 +263,7 @@
        const directory_which directories[] = {
                B_USER_ADDONS_DIRECTORY,
                B_COMMON_ADDONS_DIRECTORY,
-               B_BEOS_ADDONS_DIRECTORY
+               B_SYSTEM_ADDONS_DIRECTORY
        };
        const char* subDirectories[] = {
                "input_server/devices",

Modified: 
haiku/branches/features/package-management/src/system/kernel/fs/vfs_boot.cpp
===================================================================
--- 
haiku/branches/features/package-management/src/system/kernel/fs/vfs_boot.cpp    
    2011-02-25 23:05:54 UTC (rev 40689)
+++ 
haiku/branches/features/package-management/src/system/kernel/fs/vfs_boot.cpp    
    2011-02-25 23:25:55 UTC (rev 40690)
@@ -45,7 +45,7 @@
        const char *path;
        const char *target;
 } sPredefinedLinks[] = {
-       {"/system", "/boot/system/tree"},
+       {"/system", "/boot/system"},
        {"/bin", "/boot/system/tree/bin"},
        {"/etc", "/boot/common/settings/etc"},
        {"/var", "/boot/common/var"},


Other related posts: