From ecf119cc17eea533676a28643bc2a3a30ce40f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Wed, 28 May 2014 22:38:13 +0200 Subject: [PATCH] PackageInstaller: Fix Paladin installation ... and perhaps more packages build for pre-PM Haiku. * Restore the original path rewriting of "/boot/system" alongside rewriting "/boot/beos/system". * Rewrite "/boot/apps" in install scripts. This one fits the existing TODO that the rewriting should not use hard-coded replacement paths. * Fixes ticket #10875 --- src/apps/packageinstaller/PackageItem.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/apps/packageinstaller/PackageItem.cpp b/src/apps/packageinstaller/PackageItem.cpp index f05baacbde..eec65655c4 100644 --- a/src/apps/packageinstaller/PackageItem.cpp +++ b/src/apps/packageinstaller/PackageItem.cpp @@ -221,6 +221,13 @@ PackageItem::InitPath(const char* path, BPath* destination) pathString.ReplaceFirst("/boot/beos/system", systemNonPackagedDir.Path()); wasRewritten = true; + } else if (pathString.StartsWith("/boot/system")) { + BPath systemNonPackagedDir; + find_directory(B_SYSTEM_NONPACKAGED_DIRECTORY, + &systemNonPackagedDir); + pathString.ReplaceFirst("/boot/system", + systemNonPackagedDir.Path()); + wasRewritten = true; } else if (pathString.StartsWith("/boot/home/config")) { BPath userNonPackagedDir; find_directory(B_USER_NONPACKAGED_DIRECTORY, &userNonPackagedDir); @@ -596,6 +603,9 @@ PackageScript::DoInstall(const char* path, ItemState* state) script.ReplaceAll( "/boot/preferences", "/boot/system/preferences"); + script.ReplaceAll( + "/boot/apps", + "/boot/system/non-packaged/apps"); script.ReplaceAll( "~/config/add-ons/Screen\\ Savers", "~/config/non-packaged/add-ons/Screen\\ Savers");