From 4a71fc35b646eda7fc351ba6b0a8d7ee1daea540 Mon Sep 17 00:00:00 2001 From: Matt Madia Date: Wed, 28 Apr 2010 13:38:49 +0000 Subject: [PATCH] InstallSourceArchive now copies source archives to _sources_/, which in turn is ignored by Installer. Automatic whitespace cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36517 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- build/jam/ImageRules | 4 ++-- src/apps/installer/CopyEngine.cpp | 9 +++++++-- src/apps/installer/InstallerWindow.h | 1 + 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build/jam/ImageRules b/build/jam/ImageRules index d7a48a7bc6..e762725fac 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -814,7 +814,7 @@ rule InstallSourceArchive file : url local archiveFile = [ DownloadFile $(file) : $(url) ] ; # copy directly into image - AddFilesToHaikuImage develop sources : $(archiveFile) ; + AddFilesToHaikuImage _sources_ : $(archiveFile) ; } } @@ -837,7 +837,7 @@ rule InstallOptionalHaikuImagePackage package : url : dirTokens : isCDPackage #} } else { # extract onto image - ExtractArchiveToHaikuImage $(dirTokens) : $(archiveFile) : : + ExtractArchiveToHaikuImage $(dirTokens) : $(archiveFile) : : : $(isGCCAgnostic) ; } } diff --git a/src/apps/installer/CopyEngine.cpp b/src/apps/installer/CopyEngine.cpp index cf77354413..1fbd297422 100644 --- a/src/apps/installer/CopyEngine.cpp +++ b/src/apps/installer/CopyEngine.cpp @@ -98,7 +98,7 @@ CopyEngine::ResetTargets(const char* source) fCurrentTargetFolder = NULL; fCurrentItem = NULL; - + // init BEntry pointing to /var // There is no other way to retrieve the path to the var folder // on the source volume. Using find_directory() with @@ -107,7 +107,8 @@ CopyEngine::ResetTargets(const char* source) // makes sense, since passing a volume is meant to folders that are // volume specific, like "trash". BPath path(source); - if (path.Append("common/var") == B_OK) + if ((path.Append("common/var") == B_OK) + || (path.Append("_sources_") == B_OK)) fVarDirectory.SetTo(path.Path()); else fVarDirectory.Unset(); @@ -516,6 +517,10 @@ CopyEngine::_ShouldCopyEntry(const BEntry& entry, const char* name, printf("ignoring '%s'.\n", name); return false; } + if (strcmp(SOURCES_DIRECTORY, name) == 0) { + printf("ignoring '%s'.\n", name); + return false; + } if (strcmp("rr_moved", name) == 0) { printf("ignoring '%s'.\n", name); return false; diff --git a/src/apps/installer/InstallerWindow.h b/src/apps/installer/InstallerWindow.h index 12d01ec92b..3a0b0ba8ae 100644 --- a/src/apps/installer/InstallerWindow.h +++ b/src/apps/installer/InstallerWindow.h @@ -38,6 +38,7 @@ const uint32 MSG_RESET = 'iRSI'; const uint32 MSG_WRITE_BOOT_SECTOR = 'iWBS'; const char PACKAGES_DIRECTORY[] = "_packages_"; +const char SOURCES_DIRECTORY[] = "_sources_"; const char VAR_DIRECTORY[] = "var";