Remove /boot/common for good
* Remove support for the "common" installation location from packagefs, package kit, package daemon, package managers. * Rename the B_COMMON_*_DIRECTORY constants referring to writable directories to B_SYSTEM_*_DIRECTORY. * Remove/adjust the use of various B_COMMON_*_DIRECTORY constants. I'm sure some occurrence still remain. They can be adjusted when the remaining B_COMMON_*_DIRECTORY constants are removed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011, Haiku, Inc.
|
* Copyright 2011-2013, Haiku, Inc.
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef _PACKAGE__PACKAGE_DEFS_H_
|
#ifndef _PACKAGE__PACKAGE_DEFS_H_
|
||||||
@@ -11,7 +11,6 @@ namespace BPackageKit {
|
|||||||
|
|
||||||
enum BPackageInstallationLocation {
|
enum BPackageInstallationLocation {
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM,
|
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM,
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_COMMON,
|
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_HOME,
|
B_PACKAGE_INSTALLATION_LOCATION_HOME,
|
||||||
|
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_ENUM_COUNT
|
B_PACKAGE_INSTALLATION_LOCATION_ENUM_COUNT
|
||||||
|
|||||||
@@ -42,33 +42,34 @@ typedef enum {
|
|||||||
B_COMMON_LIB_DIRECTORY,
|
B_COMMON_LIB_DIRECTORY,
|
||||||
B_COMMON_SERVERS_DIRECTORY,
|
B_COMMON_SERVERS_DIRECTORY,
|
||||||
B_COMMON_BIN_DIRECTORY,
|
B_COMMON_BIN_DIRECTORY,
|
||||||
B_COMMON_ETC_DIRECTORY,
|
B_SYSTEM_ETC_DIRECTORY,
|
||||||
B_COMMON_DOCUMENTATION_DIRECTORY,
|
B_COMMON_DOCUMENTATION_DIRECTORY,
|
||||||
B_COMMON_SETTINGS_DIRECTORY,
|
B_SYSTEM_SETTINGS_DIRECTORY,
|
||||||
B_COMMON_DEVELOP_DIRECTORY,
|
B_COMMON_DEVELOP_DIRECTORY,
|
||||||
B_COMMON_LOG_DIRECTORY,
|
B_SYSTEM_LOG_DIRECTORY,
|
||||||
B_COMMON_SPOOL_DIRECTORY,
|
B_SYSTEM_SPOOL_DIRECTORY,
|
||||||
B_COMMON_TEMP_DIRECTORY,
|
B_SYSTEM_TEMP_DIRECTORY,
|
||||||
B_COMMON_VAR_DIRECTORY,
|
B_SYSTEM_VAR_DIRECTORY,
|
||||||
B_COMMON_TRANSLATORS_DIRECTORY,
|
B_COMMON_TRANSLATORS_DIRECTORY,
|
||||||
B_COMMON_MEDIA_NODES_DIRECTORY,
|
B_COMMON_MEDIA_NODES_DIRECTORY,
|
||||||
B_COMMON_SOUNDS_DIRECTORY,
|
B_COMMON_SOUNDS_DIRECTORY,
|
||||||
B_COMMON_DATA_DIRECTORY,
|
B_COMMON_DATA_DIRECTORY,
|
||||||
B_COMMON_CACHE_DIRECTORY,
|
B_SYSTEM_CACHE_DIRECTORY,
|
||||||
B_COMMON_PACKAGES_DIRECTORY,
|
B_COMMON_PACKAGES_DIRECTORY,
|
||||||
B_COMMON_HEADERS_DIRECTORY,
|
B_COMMON_HEADERS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DIRECTORY,
|
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_BIN_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_BIN_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_FONTS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_LIB_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_HEADERS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_LIB_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY,
|
||||||
|
B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY,
|
||||||
|
|
||||||
/* User directories. These are interpreted in the context
|
/* User directories. These are interpreted in the context
|
||||||
of the user making the find_directory call. */
|
of the user making the find_directory call. */
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ public:
|
|||||||
|
|
||||||
const InstalledRepository* SystemRepository() const
|
const InstalledRepository* SystemRepository() const
|
||||||
{ return fSystemRepository; }
|
{ return fSystemRepository; }
|
||||||
const InstalledRepository* CommonRepository() const
|
|
||||||
{ return fCommonRepository; }
|
|
||||||
const InstalledRepository* HomeRepository() const
|
const InstalledRepository* HomeRepository() const
|
||||||
{ return fHomeRepository; }
|
{ return fHomeRepository; }
|
||||||
const InstalledRepositoryList& InstalledRepositories() const
|
const InstalledRepositoryList& InstalledRepositories() const
|
||||||
@@ -139,7 +137,6 @@ protected:
|
|||||||
BPackageInstallationLocation fLocation;
|
BPackageInstallationLocation fLocation;
|
||||||
BSolver* fSolver;
|
BSolver* fSolver;
|
||||||
InstalledRepository* fSystemRepository;
|
InstalledRepository* fSystemRepository;
|
||||||
InstalledRepository* fCommonRepository;
|
|
||||||
InstalledRepository* fHomeRepository;
|
InstalledRepository* fHomeRepository;
|
||||||
InstalledRepositoryList fInstalledRepositories;
|
InstalledRepositoryList fInstalledRepositories;
|
||||||
RemoteRepositoryList fOtherRepositories;
|
RemoteRepositoryList fOtherRepositories;
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
enum PackageFSMountType {
|
enum PackageFSMountType {
|
||||||
PACKAGE_FS_MOUNT_TYPE_SYSTEM,
|
PACKAGE_FS_MOUNT_TYPE_SYSTEM,
|
||||||
PACKAGE_FS_MOUNT_TYPE_COMMON,
|
|
||||||
PACKAGE_FS_MOUNT_TYPE_HOME,
|
PACKAGE_FS_MOUNT_TYPE_HOME,
|
||||||
PACKAGE_FS_MOUNT_TYPE_CUSTOM,
|
PACKAGE_FS_MOUNT_TYPE_CUSTOM,
|
||||||
|
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ status_t
|
|||||||
ReadSettings()
|
ReadSettings()
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
status_t result = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
|
status_t result = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
|
||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
result = path.Append("nfs4_idmapper.conf");
|
result = path.Append("nfs4_idmapper.conf");
|
||||||
|
|||||||
@@ -21,12 +21,10 @@ static const char* const kLinkPaths[PackageLinkSymlink::TYPE_ENUM_COUNT]
|
|||||||
[PACKAGE_FS_MOUNT_TYPE_ENUM_COUNT] = {
|
[PACKAGE_FS_MOUNT_TYPE_ENUM_COUNT] = {
|
||||||
{
|
{
|
||||||
"../..",
|
"../..",
|
||||||
"../../../common",
|
|
||||||
"../../../home/config"
|
"../../../home/config"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"../../../system/settings",
|
"../../../system/settings",
|
||||||
"../../../common/settings",
|
|
||||||
"../../../home/config/settings/global"
|
"../../../home/config/settings/global"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -95,7 +95,6 @@ PackageFSRoot::RegisterVolume(Volume* volume)
|
|||||||
|
|
||||||
switch (volume->MountType()) {
|
switch (volume->MountType()) {
|
||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
relativeRootPath = "..";
|
relativeRootPath = "..";
|
||||||
break;
|
break;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
|
|||||||
@@ -467,9 +467,6 @@ Volume::Mount(const char* parameterString)
|
|||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
volumeName = "system";
|
volumeName = "system";
|
||||||
break;
|
break;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
volumeName = "common";
|
|
||||||
break;
|
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
volumeName = "config";
|
volumeName = "config";
|
||||||
break;
|
break;
|
||||||
@@ -1611,8 +1608,6 @@ Volume::_InitMountType(const char* mountType)
|
|||||||
fMountType = PACKAGE_FS_MOUNT_TYPE_CUSTOM;
|
fMountType = PACKAGE_FS_MOUNT_TYPE_CUSTOM;
|
||||||
else if (strcmp(mountType, "system") == 0)
|
else if (strcmp(mountType, "system") == 0)
|
||||||
fMountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
|
fMountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
|
||||||
else if (strcmp(mountType, "common") == 0)
|
|
||||||
fMountType = PACKAGE_FS_MOUNT_TYPE_COMMON;
|
|
||||||
else if (strcmp(mountType, "home") == 0)
|
else if (strcmp(mountType, "home") == 0)
|
||||||
fMountType = PACKAGE_FS_MOUNT_TYPE_HOME;
|
fMountType = PACKAGE_FS_MOUNT_TYPE_HOME;
|
||||||
else if (strcmp(mountType, "custom") == 0)
|
else if (strcmp(mountType, "custom") == 0)
|
||||||
@@ -1663,7 +1658,6 @@ Volume::_CreateShineThroughDirectories(const char* shineThroughSetting)
|
|||||||
// nothing specified -- derive from mount type
|
// nothing specified -- derive from mount type
|
||||||
switch (fMountType) {
|
switch (fMountType) {
|
||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
directories = kShineThroughDirectories;
|
directories = kShineThroughDirectories;
|
||||||
break;
|
break;
|
||||||
@@ -1674,8 +1668,6 @@ Volume::_CreateShineThroughDirectories(const char* shineThroughSetting)
|
|||||||
}
|
}
|
||||||
} else if (strcmp(shineThroughSetting, "system") == 0)
|
} else if (strcmp(shineThroughSetting, "system") == 0)
|
||||||
directories = kShineThroughDirectories;
|
directories = kShineThroughDirectories;
|
||||||
else if (strcmp(shineThroughSetting, "common") == 0)
|
|
||||||
directories = kShineThroughDirectories;
|
|
||||||
else if (strcmp(shineThroughSetting, "home") == 0)
|
else if (strcmp(shineThroughSetting, "home") == 0)
|
||||||
directories = kShineThroughDirectories;
|
directories = kShineThroughDirectories;
|
||||||
else if (strcmp(shineThroughSetting, "none") == 0)
|
else if (strcmp(shineThroughSetting, "none") == 0)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ PlainTextCatalog::PlainTextCatalog(const char *signature, const char *language,
|
|||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
// look in common-etc folder (/boot/home/config/etc):
|
// look in common-etc folder (/boot/home/config/etc):
|
||||||
BPath commonEtcPath;
|
BPath commonEtcPath;
|
||||||
find_directory(B_COMMON_ETC_DIRECTORY, &commonEtcPath);
|
find_directory(B_SYSTEM_ETC_DIRECTORY, &commonEtcPath);
|
||||||
if (commonEtcPath.InitCheck() == B_OK) {
|
if (commonEtcPath.InitCheck() == B_OK) {
|
||||||
catalogName = BString(commonEtcPath.Path())
|
catalogName = BString(commonEtcPath.Path())
|
||||||
<< "/locale/" << kCatFolder
|
<< "/locale/" << kCatFolder
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ PrinterPrefs::LoadSettings(BMessage *settings)
|
|||||||
status_t status;
|
status_t status;
|
||||||
BFile file;
|
BFile file;
|
||||||
|
|
||||||
status = find_directory(B_COMMON_SETTINGS_DIRECTORY, &fSettingsPath);
|
status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &fSettingsPath);
|
||||||
if (status != B_OK) {
|
if (status != B_OK) {
|
||||||
// Could not find settings folder.
|
// Could not find settings folder.
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
@@ -118,8 +118,7 @@ ExpanderRules::_LoadRulesFiles()
|
|||||||
const directory_which kDirectories[] = {
|
const directory_which kDirectories[] = {
|
||||||
B_USER_NONPACKAGED_DATA_DIRECTORY,
|
B_USER_NONPACKAGED_DATA_DIRECTORY,
|
||||||
B_USER_DATA_DIRECTORY,
|
B_USER_DATA_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
|
||||||
B_COMMON_DATA_DIRECTORY,
|
|
||||||
B_SYSTEM_DATA_DIRECTORY
|
B_SYSTEM_DATA_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -462,9 +462,6 @@ MainWindow::_RefreshPackageList()
|
|||||||
if (repository == static_cast<const BSolverRepository*>(
|
if (repository == static_cast<const BSolverRepository*>(
|
||||||
manager.SystemRepository())) {
|
manager.SystemRepository())) {
|
||||||
installationLocation = "system";
|
installationLocation = "system";
|
||||||
} else if (repository == static_cast<const BSolverRepository*>(
|
|
||||||
manager.CommonRepository())) {
|
|
||||||
installationLocation = "common";
|
|
||||||
} else if (repository == static_cast<const BSolverRepository*>(
|
} else if (repository == static_cast<const BSolverRepository*>(
|
||||||
manager.HomeRepository())) {
|
manager.HomeRepository())) {
|
||||||
installationLocation = "home";
|
installationLocation = "home";
|
||||||
|
|||||||
@@ -240,10 +240,8 @@ PackageManager::GetPackageActions(PackageInfoRef package, Model* model)
|
|||||||
if (repository == static_cast<const BSolverRepository*>(
|
if (repository == static_cast<const BSolverRepository*>(
|
||||||
SystemRepository())) {
|
SystemRepository())) {
|
||||||
installed = true;
|
installed = true;
|
||||||
systemPackage = true;
|
// systemPackage = true;
|
||||||
} else if (repository == static_cast<const BSolverRepository*>(
|
// TODO: Being installed in system doesn't make it a system package.
|
||||||
CommonRepository())) {
|
|
||||||
installed = true;
|
|
||||||
} else if (repository == static_cast<const BSolverRepository*>(
|
} else if (repository == static_cast<const BSolverRepository*>(
|
||||||
HomeRepository())) {
|
HomeRepository())) {
|
||||||
installed = true;
|
installed = true;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ DesktopWindow::DesktopWindow(BRect frame, bool editMode)
|
|||||||
BPath path;
|
BPath path;
|
||||||
status_t err;
|
status_t err;
|
||||||
entry_ref ref;
|
entry_ref ref;
|
||||||
err = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true);
|
err = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true);
|
||||||
if (err >= B_OK) {
|
if (err >= B_OK) {
|
||||||
BDirectory dir(path.Path());
|
BDirectory dir(path.Path());
|
||||||
if (!dir.Contains("x-vnd.Haiku-Login", B_DIRECTORY_NODE))
|
if (!dir.Contains("x-vnd.Haiku-Login", B_DIRECTORY_NODE))
|
||||||
|
|||||||
@@ -1909,7 +1909,7 @@ TTextView::Open(hyper_text *enclosure)
|
|||||||
case TYPE_BE_ENCLOSURE:
|
case TYPE_BE_ENCLOSURE:
|
||||||
if (!enclosure->have_ref) {
|
if (!enclosure->have_ref) {
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_COMMON_TEMP_DIRECTORY, &path) == B_NO_ERROR) {
|
if (find_directory(B_SYSTEM_TEMP_DIRECTORY, &path) == B_NO_ERROR) {
|
||||||
BDirectory dir(path.Path());
|
BDirectory dir(path.Path());
|
||||||
if (dir.InitCheck() == B_NO_ERROR) {
|
if (dir.InitCheck() == B_NO_ERROR) {
|
||||||
char name[B_FILE_NAME_LENGTH];
|
char name[B_FILE_NAME_LENGTH];
|
||||||
|
|||||||
@@ -214,7 +214,7 @@ RecorderWindow::InitWindow()
|
|||||||
try {
|
try {
|
||||||
// Find temp directory for recorded sounds.
|
// Find temp directory for recorded sounds.
|
||||||
BPath path;
|
BPath path;
|
||||||
if (!(error = find_directory(B_COMMON_TEMP_DIRECTORY, &path)))
|
if (!(error = find_directory(B_SYSTEM_TEMP_DIRECTORY, &path)))
|
||||||
error = fTempDir.SetTo(path.Path());
|
error = fTempDir.SetTo(path.Path());
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto bad_mojo;
|
goto bad_mojo;
|
||||||
|
|||||||
@@ -2364,7 +2364,7 @@ BrowserWindow::_HandlePageSourceResult(const BMessage* message)
|
|||||||
ret = message->FindString("source", &source);
|
ret = message->FindString("source", &source);
|
||||||
|
|
||||||
if (ret == B_OK)
|
if (ret == B_OK)
|
||||||
ret = find_directory(B_COMMON_TEMP_DIRECTORY, &pathToPageSource);
|
ret = find_directory(B_SYSTEM_TEMP_DIRECTORY, &pathToPageSource);
|
||||||
|
|
||||||
BString tmpFileName("PageSource_");
|
BString tmpFileName("PageSource_");
|
||||||
tmpFileName << system_time() << ".html";
|
tmpFileName << system_time() << ".html";
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ WorkspacesSettings::_Open(BFile& file, int mode)
|
|||||||
BPath path;
|
BPath path;
|
||||||
status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
status = find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
|
status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ WorkspacesSettings::_Open(BFile& file, int mode)
|
|||||||
|
|
||||||
status = file.SetTo(path.Path(), mode);
|
status = file.SetTo(path.Path(), mode);
|
||||||
if (mode == B_READ_ONLY && status == B_ENTRY_NOT_FOUND) {
|
if (mode == B_READ_ONLY && status == B_ENTRY_NOT_FOUND) {
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) == B_OK) {
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) == B_OK) {
|
||||||
path.Append(kSettingsFile);
|
path.Append(kSettingsFile);
|
||||||
status = file.SetTo(path.Path(), mode);
|
status = file.SetTo(path.Path(), mode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -643,7 +643,7 @@ initialize_hostname_list ()
|
|||||||
temp = get_string_value ("HOSTFILE");
|
temp = get_string_value ("HOSTFILE");
|
||||||
if (temp == 0)
|
if (temp == 0)
|
||||||
temp = get_string_value ("hostname_completion_file");
|
temp = get_string_value ("hostname_completion_file");
|
||||||
if (temp == 0 && find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
|
if (temp == 0 && find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
sizeof(path)) == B_OK) {
|
sizeof(path)) == B_OK) {
|
||||||
strlcat(path, "/network/hosts", sizeof(path));
|
strlcat(path, "/network/hosts", sizeof(path));
|
||||||
temp = path;
|
temp = path;
|
||||||
|
|||||||
+19
-19
@@ -60,33 +60,33 @@ directoryType directoryTypes[] = {
|
|||||||
KEYVALUE_PAIR(B_COMMON_LIB_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_LIB_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_SERVERS_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_SERVERS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_BIN_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_BIN_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_ETC_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_ETC_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_DOCUMENTATION_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_DOCUMENTATION_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_SETTINGS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_SETTINGS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_DEVELOP_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_DEVELOP_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_LOG_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_LOG_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_SPOOL_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_SPOOL_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_TEMP_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_TEMP_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_VAR_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_VAR_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_TRANSLATORS_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_TRANSLATORS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_MEDIA_NODES_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_MEDIA_NODES_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_SOUNDS_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_SOUNDS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_DATA_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_DATA_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_CACHE_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_CACHE_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_PACKAGES_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_PACKAGES_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_HEADERS_DIRECTORY),
|
KEYVALUE_PAIR(B_COMMON_HEADERS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_BIN_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_BIN_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DATA_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DATA_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_FONTS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_LIB_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_LIB_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_HEADERS_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY),
|
||||||
KEYVALUE_PAIR(B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY),
|
KEYVALUE_PAIR(B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY),
|
||||||
|
|
||||||
// User directories
|
// User directories
|
||||||
KEYVALUE_PAIR(B_USER_DIRECTORY),
|
KEYVALUE_PAIR(B_USER_DIRECTORY),
|
||||||
|
|||||||
@@ -34,10 +34,7 @@ static const char* const kLongUsage =
|
|||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -H, --home\n"
|
" -H, --home\n"
|
||||||
" Install the packages in the user's home directory. Default is to\n"
|
" Install the packages in the user's home directory. Default is to\n"
|
||||||
" install in the common directory.\n"
|
" install in the system directory.\n"
|
||||||
" -S, --system\n"
|
|
||||||
" Install the packages in the system directory. Default is to\n"
|
|
||||||
" install in the common directory.\n"
|
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -49,18 +46,17 @@ int
|
|||||||
InstallCommand::Execute(int argc, const char* const* argv)
|
InstallCommand::Execute(int argc, const char* const* argv)
|
||||||
{
|
{
|
||||||
BPackageInstallationLocation location
|
BPackageInstallationLocation location
|
||||||
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
|
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
static struct option sLongOptions[] = {
|
static struct option sLongOptions[] = {
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "home", no_argument, 0, 'H' },
|
{ "home", no_argument, 0, 'H' },
|
||||||
{ "system", no_argument, 0, 'S' },
|
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
opterr = 0; // don't print errors
|
opterr = 0; // don't print errors
|
||||||
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
|
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -73,10 +69,6 @@ InstallCommand::Execute(int argc, const char* const* argv)
|
|||||||
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S':
|
|
||||||
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PrintUsageAndExit(true);
|
PrintUsageAndExit(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -189,9 +189,6 @@ SearchCommand::Execute(int argc, const char* const* argv)
|
|||||||
if (package->Repository() == static_cast<const BSolverRepository*>(
|
if (package->Repository() == static_cast<const BSolverRepository*>(
|
||||||
packageManager.SystemRepository()))
|
packageManager.SystemRepository()))
|
||||||
installed = "system";
|
installed = "system";
|
||||||
else if (package->Repository() == static_cast<const BSolverRepository*>(
|
|
||||||
packageManager.CommonRepository()))
|
|
||||||
installed = "common";
|
|
||||||
else if (package->Repository() == static_cast<const BSolverRepository*>(
|
else if (package->Repository() == static_cast<const BSolverRepository*>(
|
||||||
packageManager.HomeRepository()))
|
packageManager.HomeRepository()))
|
||||||
installed = "home";
|
installed = "home";
|
||||||
|
|||||||
@@ -34,10 +34,7 @@ static const char* const kLongUsage =
|
|||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -H, --home\n"
|
" -H, --home\n"
|
||||||
" Uninstall the packages from the user's home directory. Default is to\n"
|
" Uninstall the packages from the user's home directory. Default is to\n"
|
||||||
" uninstall from the common directory.\n"
|
" uninstall from the system directory.\n"
|
||||||
" -S, --system\n"
|
|
||||||
" Uninstall the packages from the system directory. Default is to\n"
|
|
||||||
" uninstall from the common directory.\n"
|
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -49,18 +46,17 @@ int
|
|||||||
UninstallCommand::Execute(int argc, const char* const* argv)
|
UninstallCommand::Execute(int argc, const char* const* argv)
|
||||||
{
|
{
|
||||||
BPackageInstallationLocation location
|
BPackageInstallationLocation location
|
||||||
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
|
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
static struct option sLongOptions[] = {
|
static struct option sLongOptions[] = {
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "home", no_argument, 0, 'H' },
|
{ "home", no_argument, 0, 'H' },
|
||||||
{ "system", no_argument, 0, 'S' },
|
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
opterr = 0; // don't print errors
|
opterr = 0; // don't print errors
|
||||||
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
|
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -73,10 +69,6 @@ UninstallCommand::Execute(int argc, const char* const* argv)
|
|||||||
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S':
|
|
||||||
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PrintUsageAndExit(true);
|
PrintUsageAndExit(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -35,10 +35,7 @@ static const char* const kLongUsage =
|
|||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -H, --home\n"
|
" -H, --home\n"
|
||||||
" Update the packages in the user's home directory. Default is to\n"
|
" Update the packages in the user's home directory. Default is to\n"
|
||||||
" update in the common directory.\n"
|
" update in the system directory.\n"
|
||||||
" -S, --system\n"
|
|
||||||
" Update the packages in the system directory. Default is to\n"
|
|
||||||
" update in the common directory.\n"
|
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
|
|
||||||
@@ -50,18 +47,17 @@ int
|
|||||||
UpdateCommand::Execute(int argc, const char* const* argv)
|
UpdateCommand::Execute(int argc, const char* const* argv)
|
||||||
{
|
{
|
||||||
BPackageInstallationLocation location
|
BPackageInstallationLocation location
|
||||||
= B_PACKAGE_INSTALLATION_LOCATION_COMMON;
|
= B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
static struct option sLongOptions[] = {
|
static struct option sLongOptions[] = {
|
||||||
{ "help", no_argument, 0, 'h' },
|
{ "help", no_argument, 0, 'h' },
|
||||||
{ "home", no_argument, 0, 'H' },
|
{ "home", no_argument, 0, 'H' },
|
||||||
{ "system", no_argument, 0, 'S' },
|
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
opterr = 0; // don't print errors
|
opterr = 0; // don't print errors
|
||||||
int c = getopt_long(argc, (char**)argv, "hHS", sLongOptions, NULL);
|
int c = getopt_long(argc, (char**)argv, "hH", sLongOptions, NULL);
|
||||||
if (c == -1)
|
if (c == -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -74,10 +70,6 @@ UpdateCommand::Execute(int argc, const char* const* argv)
|
|||||||
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
location = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'S':
|
|
||||||
location = B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
PrintUsageAndExit(true);
|
PrintUsageAndExit(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -64,13 +64,13 @@ find_directory(directory_which which, dev_t device, bool createIt,
|
|||||||
// we support only the handful of paths we need
|
// we support only the handful of paths we need
|
||||||
const char* path;
|
const char* path;
|
||||||
switch (which) {
|
switch (which) {
|
||||||
case B_COMMON_TEMP_DIRECTORY:
|
case B_SYSTEM_TEMP_DIRECTORY:
|
||||||
path = HAIKU_BUILD_GENERATED_DIRECTORY "/tmp";
|
path = HAIKU_BUILD_GENERATED_DIRECTORY "/tmp";
|
||||||
break;
|
break;
|
||||||
case B_COMMON_SETTINGS_DIRECTORY:
|
case B_SYSTEM_SETTINGS_DIRECTORY:
|
||||||
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/settings";
|
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/settings";
|
||||||
break;
|
break;
|
||||||
case B_COMMON_CACHE_DIRECTORY:
|
case B_SYSTEM_CACHE_DIRECTORY:
|
||||||
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/cache";
|
path = HAIKU_BUILD_GENERATED_DIRECTORY "/system/cache";
|
||||||
break;
|
break;
|
||||||
case B_USER_SETTINGS_DIRECTORY:
|
case B_USER_SETTINGS_DIRECTORY:
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ init_map_rules(struct gen_p *irs, const char *conf_file) {
|
|||||||
FILE *conf;
|
FILE *conf;
|
||||||
|
|
||||||
if (conf_file == NULL) {
|
if (conf_file == NULL) {
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
sizeof(path)) == B_OK) {
|
sizeof(path)) == B_OK) {
|
||||||
strlcat(path, "/network/irs.conf", sizeof(path));
|
strlcat(path, "/network/irs.conf", sizeof(path));
|
||||||
conf_file = path;
|
conf_file = path;
|
||||||
|
|||||||
@@ -449,7 +449,7 @@ ho_rewind(struct irs_ho *this) {
|
|||||||
(void)fclose(pvt->fp);
|
(void)fclose(pvt->fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
sizeof(path)) == B_OK) {
|
sizeof(path)) == B_OK) {
|
||||||
strlcat(path, "/network/hosts", sizeof(path));
|
strlcat(path, "/network/hosts", sizeof(path));
|
||||||
|
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ __res_vinit(res_state statp, int preinit) {
|
|||||||
(line[sizeof(name) - 1] == ' ' || \
|
(line[sizeof(name) - 1] == ' ' || \
|
||||||
line[sizeof(name) - 1] == '\t'))
|
line[sizeof(name) - 1] == '\t'))
|
||||||
|
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, false, path,
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
sizeof(path)) == B_OK)
|
sizeof(path)) == B_OK)
|
||||||
strlcat(path, "/network/resolv.conf", sizeof(path));
|
strlcat(path, "/network/resolv.conf", sizeof(path));
|
||||||
|
|
||||||
|
|||||||
@@ -99,8 +99,7 @@ GLRendererRoster::AddDefaultPaths()
|
|||||||
const directory_which paths[] = {
|
const directory_which paths[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ BContext::_Initialize()
|
|||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
BPath tempPath;
|
BPath tempPath;
|
||||||
status_t result = find_directory(B_COMMON_TEMP_DIRECTORY, &tempPath, true);
|
status_t result = find_directory(B_SYSTEM_TEMP_DIRECTORY, &tempPath, true);
|
||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
BDirectory tempDirectory(tempPath.Path());
|
BDirectory tempDirectory(tempPath.Path());
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ BPackageRoster::~BPackageRoster()
|
|||||||
status_t
|
status_t
|
||||||
BPackageRoster::GetCommonRepositoryConfigPath(BPath* path, bool create) const
|
BPackageRoster::GetCommonRepositoryConfigPath(BPath* path, bool create) const
|
||||||
{
|
{
|
||||||
return _GetRepositoryPath(path, create, B_COMMON_SETTINGS_DIRECTORY);
|
return _GetRepositoryPath(path, create, B_SYSTEM_SETTINGS_DIRECTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ BPackageRoster::GetUserRepositoryConfigPath(BPath* path, bool create) const
|
|||||||
status_t
|
status_t
|
||||||
BPackageRoster::GetCommonRepositoryCachePath(BPath* path, bool create) const
|
BPackageRoster::GetCommonRepositoryCachePath(BPath* path, bool create) const
|
||||||
{
|
{
|
||||||
return _GetRepositoryPath(path, create, B_COMMON_CACHE_DIRECTORY);
|
return _GetRepositoryPath(path, create, B_SYSTEM_CACHE_DIRECTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ BPackageManager::BPackageManager(BPackageInstallationLocation location)
|
|||||||
fSolver(NULL),
|
fSolver(NULL),
|
||||||
fSystemRepository(new (std::nothrow) InstalledRepository("system",
|
fSystemRepository(new (std::nothrow) InstalledRepository("system",
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM, -1)),
|
B_PACKAGE_INSTALLATION_LOCATION_SYSTEM, -1)),
|
||||||
fCommonRepository(new (std::nothrow) InstalledRepository("common",
|
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_COMMON, -2)),
|
|
||||||
fHomeRepository(new (std::nothrow) InstalledRepository("home",
|
fHomeRepository(new (std::nothrow) InstalledRepository("home",
|
||||||
B_PACKAGE_INSTALLATION_LOCATION_HOME, -3)),
|
B_PACKAGE_INSTALLATION_LOCATION_HOME, -3)),
|
||||||
fInstalledRepositories(10),
|
fInstalledRepositories(10),
|
||||||
@@ -69,7 +67,6 @@ BPackageManager::~BPackageManager()
|
|||||||
{
|
{
|
||||||
delete fSolver;
|
delete fSolver;
|
||||||
delete fSystemRepository;
|
delete fSystemRepository;
|
||||||
delete fCommonRepository;
|
|
||||||
delete fHomeRepository;
|
delete fHomeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,10 +82,8 @@ BPackageManager::Init(uint32 flags)
|
|||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
DIE(error, "failed to create solver");
|
DIE(error, "failed to create solver");
|
||||||
|
|
||||||
if (fSystemRepository == NULL || fCommonRepository == NULL
|
if (fSystemRepository == NULL || fHomeRepository == NULL)
|
||||||
|| fHomeRepository == NULL) {
|
|
||||||
throw std::bad_alloc();
|
throw std::bad_alloc();
|
||||||
}
|
|
||||||
|
|
||||||
// add installation location repositories
|
// add installation location repositories
|
||||||
if ((flags & B_ADD_INSTALLED_REPOSITORIES) != 0) {
|
if ((flags & B_ADD_INSTALLED_REPOSITORIES) != 0) {
|
||||||
@@ -103,12 +98,8 @@ BPackageManager::Init(uint32 flags)
|
|||||||
// well. But we can easily filter those out.
|
// well. But we can easily filter those out.
|
||||||
_AddInstalledRepository(fSystemRepository);
|
_AddInstalledRepository(fSystemRepository);
|
||||||
|
|
||||||
if (!fSystemRepository->IsInstalled()) {
|
if (!fSystemRepository->IsInstalled())
|
||||||
_AddInstalledRepository(fCommonRepository);
|
_AddInstalledRepository(fHomeRepository);
|
||||||
|
|
||||||
if (!fCommonRepository->IsInstalled())
|
|
||||||
_AddInstalledRepository(fHomeRepository);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// add other repositories
|
// add other repositories
|
||||||
@@ -597,8 +588,6 @@ BPackageManager::_ClonePackageFile(InstalledRepository* repository,
|
|||||||
directory_which packagesWhich;
|
directory_which packagesWhich;
|
||||||
if (repository == fSystemRepository) {
|
if (repository == fSystemRepository) {
|
||||||
packagesWhich = B_SYSTEM_PACKAGES_DIRECTORY;
|
packagesWhich = B_SYSTEM_PACKAGES_DIRECTORY;
|
||||||
} else if (repository == fCommonRepository) {
|
|
||||||
packagesWhich = B_COMMON_PACKAGES_DIRECTORY;
|
|
||||||
} else {
|
} else {
|
||||||
DIE("don't know packages directory path for installation location "
|
DIE("don't know packages directory path for installation location "
|
||||||
"\"%s\"", repository->Name().String());
|
"\"%s\"", repository->Name().String());
|
||||||
@@ -732,15 +721,8 @@ bool
|
|||||||
BPackageManager::_NextSpecificInstallationLocation()
|
BPackageManager::_NextSpecificInstallationLocation()
|
||||||
{
|
{
|
||||||
if (fLocation == B_PACKAGE_INSTALLATION_LOCATION_SYSTEM) {
|
if (fLocation == B_PACKAGE_INSTALLATION_LOCATION_SYSTEM) {
|
||||||
fLocation = B_PACKAGE_INSTALLATION_LOCATION_COMMON;
|
|
||||||
fSystemRepository->SetInstalled(false);
|
|
||||||
_AddInstalledRepository(fCommonRepository);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fLocation == B_PACKAGE_INSTALLATION_LOCATION_COMMON) {
|
|
||||||
fLocation = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
fLocation = B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
||||||
fCommonRepository->SetInstalled(false);
|
fSystemRepository->SetInstalled(false);
|
||||||
_AddInstalledRepository(fHomeRepository);
|
_AddInstalledRepository(fHomeRepository);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,12 +121,6 @@ BSolverRepository::SetTo(BAllInstallationLocations)
|
|||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
error = AddPackages(B_PACKAGE_INSTALLATION_LOCATION_COMMON);
|
|
||||||
if (error != B_OK) {
|
|
||||||
Unset();
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
error = AddPackages(B_PACKAGE_INSTALLATION_LOCATION_HOME);
|
error = AddPackages(B_PACKAGE_INSTALLATION_LOCATION_HOME);
|
||||||
if (error != B_OK) {
|
if (error != B_OK) {
|
||||||
Unset();
|
Unset();
|
||||||
|
|||||||
@@ -73,8 +73,7 @@ status_t PrintTransport::Open(BNode* printerFolder)
|
|||||||
const directory_which paths[] = {
|
const directory_which paths[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
BPath path;
|
BPath path;
|
||||||
|
|||||||
@@ -406,8 +406,7 @@ BPrinter::_DriverPath() const
|
|||||||
directory_which directories[] = {
|
directory_which directories[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -170,12 +170,7 @@ PrinterDriverAddOn::FindPathToDriver(const char* driver, BPath* path)
|
|||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
result = ::TestForAddonExistence(driver,
|
result = ::TestForAddonExistence(driver,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY, kPrinterDriverFolderName, *path);
|
||||||
if (result == B_OK)
|
|
||||||
return B_OK;
|
|
||||||
|
|
||||||
result = ::TestForAddonExistence(driver, B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
kPrinterDriverFolderName, *path);
|
|
||||||
if (result == B_OK)
|
if (result == B_OK)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|
||||||
|
|||||||
@@ -123,8 +123,7 @@ ScreenSaverRunner::_LoadAddOn()
|
|||||||
directory_which which[] = {
|
directory_which which[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
BPath path;
|
BPath path;
|
||||||
|
|||||||
@@ -38,8 +38,7 @@
|
|||||||
static const directory_which kAddOnDirs[] = {
|
static const directory_which kAddOnDirs[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
/*! \brief Size of the kAddOnDirs array. */
|
/*! \brief Size of the kAddOnDirs array. */
|
||||||
|
|||||||
@@ -118,12 +118,9 @@ DiskSystemAddOnManager::LoadDiskSystems()
|
|||||||
|
|
||||||
if (error == B_OK) {
|
if (error == B_OK) {
|
||||||
error
|
error
|
||||||
= _LoadAddOns(alreadyLoaded, B_COMMON_NONPACKAGED_ADDONS_DIRECTORY);
|
= _LoadAddOns(alreadyLoaded, B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (error == B_OK)
|
|
||||||
error = _LoadAddOns(alreadyLoaded, B_COMMON_ADDONS_DIRECTORY);
|
|
||||||
|
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = _LoadAddOns(alreadyLoaded, B_SYSTEM_ADDONS_DIRECTORY);
|
error = _LoadAddOns(alreadyLoaded, B_SYSTEM_ADDONS_DIRECTORY);
|
||||||
|
|
||||||
|
|||||||
@@ -91,8 +91,7 @@ static const directory_which kBaseDirectoryConstants[] = {
|
|||||||
B_USER_SETTINGS_DIRECTORY,
|
B_USER_SETTINGS_DIRECTORY,
|
||||||
B_USER_NONPACKAGED_DATA_DIRECTORY,
|
B_USER_NONPACKAGED_DATA_DIRECTORY,
|
||||||
B_USER_DATA_DIRECTORY,
|
B_USER_DATA_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_DATA_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DATA_DIRECTORY,
|
||||||
B_COMMON_DATA_DIRECTORY,
|
|
||||||
B_SYSTEM_DATA_DIRECTORY
|
B_SYSTEM_DATA_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -274,8 +274,7 @@ BDeskWindow::InitAddonsList(bool update)
|
|||||||
|
|
||||||
LoadAddOnDir(B_USER_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
|
LoadAddOnDir(B_USER_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
|
||||||
LoadAddOnDir(B_USER_ADDONS_DIRECTORY, this, fAddonsList);
|
LoadAddOnDir(B_USER_ADDONS_DIRECTORY, this, fAddonsList);
|
||||||
LoadAddOnDir(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
|
LoadAddOnDir(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY, this, fAddonsList);
|
||||||
LoadAddOnDir(B_COMMON_ADDONS_DIRECTORY, this, fAddonsList);
|
|
||||||
LoadAddOnDir(B_SYSTEM_ADDONS_DIRECTORY, this, fAddonsList);
|
LoadAddOnDir(B_SYSTEM_ADDONS_DIRECTORY, this, fAddonsList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -325,13 +324,7 @@ BDeskWindow::ApplyShortcutPreferences(bool update)
|
|||||||
isInAddons = command.FindFirst(path.Path()) == 0;
|
isInAddons = command.FindFirst(path.Path()) == 0;
|
||||||
}
|
}
|
||||||
if (!isInAddons
|
if (!isInAddons
|
||||||
&& (find_directory(B_COMMON_ADDONS_DIRECTORY, &path)
|
&& (find_directory(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
== B_OK)) {
|
|
||||||
path.Append("Tracker/");
|
|
||||||
isInAddons = command.FindFirst(path.Path()) == 0;
|
|
||||||
}
|
|
||||||
if (!isInAddons
|
|
||||||
&& (find_directory(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
|
||||||
&path) == B_OK)) {
|
&path) == B_OK)) {
|
||||||
path.Append("Tracker/");
|
path.Append("Tracker/");
|
||||||
isInAddons = command.FindFirst(path.Path()) == 0;
|
isInAddons = command.FindFirst(path.Path()) == 0;
|
||||||
|
|||||||
@@ -658,12 +658,12 @@ ConfirmChangeIfWellKnownDirectory(const BEntry* entry,
|
|||||||
"\n\nTo %toDoAction the home folder anyway, hold down the "
|
"\n\nTo %toDoAction the home folder anyway, hold down the "
|
||||||
"Shift key and click \"%toConfirmAction\"."));
|
"Shift key and click \"%toConfirmAction\"."));
|
||||||
} else if (DirectoryMatchesOrContains(entry, B_USER_CONFIG_DIRECTORY)
|
} else if (DirectoryMatchesOrContains(entry, B_USER_CONFIG_DIRECTORY)
|
||||||
|| DirectoryMatchesOrContains(entry, B_COMMON_SETTINGS_DIRECTORY)) {
|
|| DirectoryMatchesOrContains(entry, B_SYSTEM_SETTINGS_DIRECTORY)) {
|
||||||
|
|
||||||
if (DirectoryMatchesOrContains(entry, "beos_mime",
|
if (DirectoryMatchesOrContains(entry, "beos_mime",
|
||||||
B_USER_SETTINGS_DIRECTORY)
|
B_USER_SETTINGS_DIRECTORY)
|
||||||
|| DirectoryMatchesOrContains(entry, "beos_mime",
|
|| DirectoryMatchesOrContains(entry, "beos_mime",
|
||||||
B_COMMON_SETTINGS_DIRECTORY)) {
|
B_SYSTEM_SETTINGS_DIRECTORY)) {
|
||||||
warning.SetTo(
|
warning.SetTo(
|
||||||
B_TRANSLATE("If you %ifYouDoAction the mime settings, "
|
B_TRANSLATE("If you %ifYouDoAction the mime settings, "
|
||||||
"%osName may not behave properly!\n\nAre you sure you want "
|
"%osName may not behave properly!\n\nAre you sure you want "
|
||||||
@@ -676,7 +676,7 @@ ConfirmChangeIfWellKnownDirectory(const BEntry* entry,
|
|||||||
"to do this?"));
|
"to do this?"));
|
||||||
requireOverride = false;
|
requireOverride = false;
|
||||||
} else if (DirectoryMatches(entry, B_USER_SETTINGS_DIRECTORY)
|
} else if (DirectoryMatches(entry, B_USER_SETTINGS_DIRECTORY)
|
||||||
|| DirectoryMatches(entry, B_COMMON_SETTINGS_DIRECTORY)) {
|
|| DirectoryMatches(entry, B_SYSTEM_SETTINGS_DIRECTORY)) {
|
||||||
warning.SetTo(
|
warning.SetTo(
|
||||||
B_TRANSLATE("If you %ifYouDoAction the settings folder, "
|
B_TRANSLATE("If you %ifYouDoAction the settings folder, "
|
||||||
"%osName may not behave properly!\n\nAre you sure you want "
|
"%osName may not behave properly!\n\nAre you sure you want "
|
||||||
|
|||||||
@@ -332,8 +332,7 @@ BTranslatorRoster::Private::AddDefaultPaths()
|
|||||||
const directory_which paths[] = {
|
const directory_which paths[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ Transport::Transport(const PrinterData *printerData)
|
|||||||
const directory_which paths[] = {
|
const directory_which paths[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_BEOS_ADDONS_DIRECTORY,
|
B_BEOS_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
BPath path;
|
BPath path;
|
||||||
|
|||||||
@@ -558,7 +558,7 @@ JoyWin::_FindSettingString(const char* name, const char* strPath)
|
|||||||
path.Append(name);
|
path.Append(name);
|
||||||
fFileTempProbeJoystick = new BFile(path.Path(), B_READ_ONLY);
|
fFileTempProbeJoystick = new BFile(path.Path(), B_READ_ONLY);
|
||||||
|
|
||||||
//status_t err = find_directory(B_COMMON_ETC_DIRECTORY, &path);
|
//status_t err = find_directory(B_SYSTEM_ETC_DIRECTORY, &path);
|
||||||
// if (err == B_OK) {
|
// if (err == B_OK) {
|
||||||
//BString str(path.Path());
|
//BString str(path.Path());
|
||||||
//str << "/joysticks/" << name;
|
//str << "/joysticks/" << name;
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ DNSTools::GetDNSServers(BObjectList<BString>* serverList)
|
|||||||
line[sizeof(name) - 1] == '\t'))
|
line[sizeof(name) - 1] == '\t'))
|
||||||
|
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK)
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK)
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
path.Append("network/resolv.conf");
|
path.Append("network/resolv.conf");
|
||||||
|
|||||||
@@ -489,7 +489,7 @@ void
|
|||||||
EthernetSettingsView::_SaveDNSConfiguration()
|
EthernetSettingsView::_SaveDNSConfiguration()
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK)
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
path.Append("network/resolv.conf");
|
path.Append("network/resolv.conf");
|
||||||
@@ -610,7 +610,7 @@ EthernetSettingsView::_TriggerAutoConfig(const char* device)
|
|||||||
status_t
|
status_t
|
||||||
EthernetSettingsView::_GetPath(const char* name, BPath& path)
|
EthernetSettingsView::_GetPath(const char* name, BPath& path)
|
||||||
{
|
{
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true) != B_OK)
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
path.Append("network");
|
path.Append("network");
|
||||||
|
|||||||
@@ -287,8 +287,7 @@ AddPrinterDialog::_BuildGUI(int stage)
|
|||||||
static directory_which gAddonDirs[] = {
|
static directory_which gAddonDirs[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -712,8 +712,7 @@ ModulesView::PopulateScreenSaverList()
|
|||||||
directory_which which[] = {
|
directory_which which[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY,
|
B_SYSTEM_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
ScreenSaverItem* selectedItem = NULL;
|
ScreenSaverItem* selectedItem = NULL;
|
||||||
|
|||||||
@@ -467,8 +467,7 @@ DWindowHWInterface::_OpenAccelerant(int device)
|
|||||||
const static directory_which dirs[] = {
|
const static directory_which dirs[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -275,8 +275,7 @@ AccelerantHWInterface::_OpenAccelerant(int device)
|
|||||||
const static directory_which dirs[] = {
|
const static directory_which dirs[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -334,8 +334,7 @@ IndexServer::_StartWatchingAddOns()
|
|||||||
const directory_which directories[] = {
|
const directory_which directories[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -262,8 +262,7 @@ AddOnManager::_RegisterAddOns()
|
|||||||
const directory_which directories[] = {
|
const directory_which directories[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
const char* subDirectories[] = {
|
const char* subDirectories[] = {
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ private:
|
|||||||
static const directory_which sDirectories[] = {
|
static const directory_which sDirectories[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -296,8 +296,7 @@ MediaAddonServer::ReadyToRun()
|
|||||||
const directory_which directories[] = {
|
const directory_which directories[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -705,7 +705,7 @@ NetServer::_ConfigureResolver(BMessage& resolverConfiguration)
|
|||||||
// the auto-generated parts of course.
|
// the auto-generated parts of course.
|
||||||
|
|
||||||
BPath path;
|
BPath path;
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path) != B_OK
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path) != B_OK
|
||||||
|| path.Append("network/resolv.conf") != B_OK)
|
|| path.Append("network/resolv.conf") != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ Settings::_Path(BPath& parent, const char* leaf)
|
|||||||
status_t
|
status_t
|
||||||
Settings::_GetPath(const char* name, BPath& path)
|
Settings::_GetPath(const char* name, BPath& path)
|
||||||
{
|
{
|
||||||
if (find_directory(B_COMMON_SETTINGS_DIRECTORY, &path, true) != B_OK)
|
if (find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path, true) != B_OK)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
|
||||||
path.Append("network");
|
path.Append("network");
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ Root::Root()
|
|||||||
fIsSystemRoot(false),
|
fIsSystemRoot(false),
|
||||||
fPath(),
|
fPath(),
|
||||||
fSystemVolume(NULL),
|
fSystemVolume(NULL),
|
||||||
fCommonVolume(NULL),
|
|
||||||
fHomeVolume(NULL),
|
fHomeVolume(NULL),
|
||||||
fJobQueue(),
|
fJobQueue(),
|
||||||
fJobRunner(-1)
|
fJobRunner(-1)
|
||||||
@@ -209,7 +208,7 @@ Root::FindVolume(dev_t deviceID) const
|
|||||||
{
|
{
|
||||||
AutoLocker<BLocker> locker(fLock);
|
AutoLocker<BLocker> locker(fLock);
|
||||||
|
|
||||||
Volume* volumes[] = { fSystemVolume, fCommonVolume, fHomeVolume };
|
Volume* volumes[] = { fSystemVolume, fHomeVolume };
|
||||||
for (size_t i = 0; i < sizeof(volumes) / sizeof(volumes[0]); i++) {
|
for (size_t i = 0; i < sizeof(volumes) / sizeof(volumes[0]); i++) {
|
||||||
Volume* volume = volumes[i];
|
Volume* volume = volumes[i];
|
||||||
if (volume != NULL && volume->DeviceID() == deviceID)
|
if (volume != NULL && volume->DeviceID() == deviceID)
|
||||||
@@ -226,8 +225,6 @@ Root::GetVolume(BPackageInstallationLocation location)
|
|||||||
switch ((BPackageInstallationLocation)location) {
|
switch ((BPackageInstallationLocation)location) {
|
||||||
case B_PACKAGE_INSTALLATION_LOCATION_SYSTEM:
|
case B_PACKAGE_INSTALLATION_LOCATION_SYSTEM:
|
||||||
return fSystemVolume;
|
return fSystemVolume;
|
||||||
case B_PACKAGE_INSTALLATION_LOCATION_COMMON:
|
|
||||||
return fCommonVolume;
|
|
||||||
case B_PACKAGE_INSTALLATION_LOCATION_HOME:
|
case B_PACKAGE_INSTALLATION_LOCATION_HOME:
|
||||||
return fHomeVolume;
|
return fHomeVolume;
|
||||||
default:
|
default:
|
||||||
@@ -269,8 +266,6 @@ Root::_GetVolume(PackageFSMountType mountType)
|
|||||||
switch (mountType) {
|
switch (mountType) {
|
||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
return &fSystemVolume;
|
return &fSystemVolume;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
return &fCommonVolume;
|
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
return &fHomeVolume;
|
return &fHomeVolume;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:
|
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:
|
||||||
@@ -291,9 +286,6 @@ Root::_NextVolumeFor(Volume* volume)
|
|||||||
do {
|
do {
|
||||||
switch (mountType) {
|
switch (mountType) {
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
mountType = PACKAGE_FS_MOUNT_TYPE_COMMON;
|
|
||||||
break;
|
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
mountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
|
mountType = PACKAGE_FS_MOUNT_TYPE_SYSTEM;
|
||||||
break;
|
break;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ private:
|
|||||||
bool fIsSystemRoot;
|
bool fIsSystemRoot;
|
||||||
BString fPath;
|
BString fPath;
|
||||||
Volume* fSystemVolume;
|
Volume* fSystemVolume;
|
||||||
Volume* fCommonVolume;
|
|
||||||
Volume* fHomeVolume;
|
Volume* fHomeVolume;
|
||||||
JobQueue fJobQueue;
|
JobQueue fJobQueue;
|
||||||
thread_id fJobRunner;
|
thread_id fJobRunner;
|
||||||
|
|||||||
@@ -1691,8 +1691,6 @@ Volume::Location() const
|
|||||||
switch (fMountType) {
|
switch (fMountType) {
|
||||||
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
case PACKAGE_FS_MOUNT_TYPE_SYSTEM:
|
||||||
return B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
return B_PACKAGE_INSTALLATION_LOCATION_SYSTEM;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_COMMON:
|
|
||||||
return B_PACKAGE_INSTALLATION_LOCATION_COMMON;
|
|
||||||
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
case PACKAGE_FS_MOUNT_TYPE_HOME:
|
||||||
return B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
return B_PACKAGE_INSTALLATION_LOCATION_HOME;
|
||||||
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:
|
case PACKAGE_FS_MOUNT_TYPE_CUSTOM:
|
||||||
|
|||||||
@@ -109,8 +109,7 @@ PrintServerApp::PrintServerApp(status_t* err)
|
|||||||
// Build list of transport addons
|
// Build list of transport addons
|
||||||
Transport::Scan(B_USER_NONPACKAGED_ADDONS_DIRECTORY);
|
Transport::Scan(B_USER_NONPACKAGED_ADDONS_DIRECTORY);
|
||||||
Transport::Scan(B_USER_ADDONS_DIRECTORY);
|
Transport::Scan(B_USER_ADDONS_DIRECTORY);
|
||||||
Transport::Scan(B_COMMON_NONPACKAGED_ADDONS_DIRECTORY);
|
Transport::Scan(B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY);
|
||||||
Transport::Scan(B_COMMON_ADDONS_DIRECTORY);
|
|
||||||
Transport::Scan(B_SYSTEM_ADDONS_DIRECTORY);
|
Transport::Scan(B_SYSTEM_ADDONS_DIRECTORY);
|
||||||
|
|
||||||
SetupPrinterList();
|
SetupPrinterList();
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ void
|
|||||||
SyslogDaemon::AboutRequested()
|
SyslogDaemon::AboutRequested()
|
||||||
{
|
{
|
||||||
BPath path;
|
BPath path;
|
||||||
find_directory(B_COMMON_LOG_DIRECTORY, &path);
|
find_directory(B_SYSTEM_LOG_DIRECTORY, &path);
|
||||||
path.Append("syslog");
|
path.Append("syslog");
|
||||||
|
|
||||||
BString name(B_TRANSLATE("Syslog Daemon"));
|
BString name(B_TRANSLATE("Syslog Daemon"));
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ prepare_output()
|
|||||||
|
|
||||||
// get path (and create it if necessary)
|
// get path (and create it if necessary)
|
||||||
BPath base;
|
BPath base;
|
||||||
find_directory(B_COMMON_LOG_DIRECTORY, &base, true);
|
find_directory(B_SYSTEM_LOG_DIRECTORY, &base, true);
|
||||||
|
|
||||||
BPath syslog(base);
|
BPath syslog(base);
|
||||||
syslog.Append("syslog");
|
syslog.Append("syslog");
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ get_priority(const char* path)
|
|||||||
// using find_directory()?
|
// using find_directory()?
|
||||||
const directory_which whichPath[] = {
|
const directory_which whichPath[] = {
|
||||||
B_BEOS_DIRECTORY,
|
B_BEOS_DIRECTORY,
|
||||||
B_COMMON_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_DIRECTORY,
|
||||||
B_USER_DIRECTORY
|
B_USER_DIRECTORY
|
||||||
};
|
};
|
||||||
KPath pathBuffer;
|
KPath pathBuffer;
|
||||||
@@ -940,8 +940,9 @@ DirectoryIterator::SetTo(const char* path, const char* subPath, bool recursive)
|
|||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
// add default paths
|
// add default paths
|
||||||
const directory_which whichPath[] = {
|
const directory_which whichPath[] = {
|
||||||
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_BEOS_ADDONS_DIRECTORY
|
B_BEOS_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
KPath pathBuffer;
|
KPath pathBuffer;
|
||||||
@@ -1479,8 +1480,9 @@ legacy_driver_probe(const char* subPath)
|
|||||||
// We're probing the actual boot volume for the first time,
|
// We're probing the actual boot volume for the first time,
|
||||||
// let's watch its driver directories for changes
|
// let's watch its driver directories for changes
|
||||||
const directory_which whichPath[] = {
|
const directory_which whichPath[] = {
|
||||||
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_BEOS_ADDONS_DIRECTORY
|
B_BEOS_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
KPath path;
|
KPath path;
|
||||||
|
|||||||
@@ -285,8 +285,9 @@ using namespace Module;
|
|||||||
*/
|
*/
|
||||||
static const directory_which kModulePaths[] = {
|
static const directory_which kModulePaths[] = {
|
||||||
B_BEOS_ADDONS_DIRECTORY,
|
B_BEOS_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const uint32 kNumModulePaths = sizeof(kModulePaths)
|
static const uint32 kNumModulePaths = sizeof(kModulePaths)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
static status_t
|
static status_t
|
||||||
get_path(char *path, bool create)
|
get_path(char *path, bool create)
|
||||||
{
|
{
|
||||||
status_t status = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, create,
|
status_t status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, create,
|
||||||
path, B_PATH_NAME_LENGTH);
|
path, B_PATH_NAME_LENGTH);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ load_driver_settings(const char *driverName)
|
|||||||
#ifdef _BOOT_MODE
|
#ifdef _BOOT_MODE
|
||||||
strcpy(path, kUserSettingsDirectory);
|
strcpy(path, kUserSettingsDirectory);
|
||||||
#else
|
#else
|
||||||
// TODO: use B_COMMON_SETTINGS_DIRECTORY instead!
|
// TODO: use B_SYSTEM_SETTINGS_DIRECTORY instead!
|
||||||
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path,
|
if (find_directory(B_USER_SETTINGS_DIRECTORY, -1, false, path,
|
||||||
sizeof(path)) == B_OK)
|
sizeof(path)) == B_OK)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -82,15 +82,15 @@ static const char *kCommonDirectories[] = {
|
|||||||
COMMON "/documentation",
|
COMMON "/documentation",
|
||||||
COMMON "/settings",
|
COMMON "/settings",
|
||||||
COMMON "/develop", // B_COMMON_DEVELOP_DIRECTORY
|
COMMON "/develop", // B_COMMON_DEVELOP_DIRECTORY
|
||||||
COMMON "/var/log", // B_COMMON_LOG_DIRECTORY
|
COMMON "/var/log", // B_SYSTEM_LOG_DIRECTORY
|
||||||
COMMON "/var/spool", // B_COMMON_SPOOL_DIRECTORY
|
COMMON "/var/spool", // B_SYSTEM_SPOOL_DIRECTORY
|
||||||
COMMON "/cache/tmp", // B_COMMON_TEMP_DIRECTORY
|
COMMON "/cache/tmp", // B_SYSTEM_TEMP_DIRECTORY
|
||||||
COMMON "/var", // B_COMMON_VAR_DIRECTORY
|
COMMON "/var", // B_SYSTEM_VAR_DIRECTORY
|
||||||
COMMON "/add-ons/Translators",
|
COMMON "/add-ons/Translators",
|
||||||
COMMON "/add-ons/media",
|
COMMON "/add-ons/media",
|
||||||
COMMON "/data/sounds",
|
COMMON "/data/sounds",
|
||||||
COMMON "/data",
|
COMMON "/data",
|
||||||
COMMON "/cache", // B_COMMON_CACHE_DIRECTORY
|
COMMON "/cache", // B_SYSTEM_CACHE_DIRECTORY
|
||||||
COMMON "/packages",
|
COMMON "/packages",
|
||||||
COMMON "/develop/headers",
|
COMMON "/develop/headers",
|
||||||
COMMON NON_PACKAGED,
|
COMMON NON_PACKAGED,
|
||||||
@@ -283,33 +283,33 @@ find_directory(directory_which which, dev_t device, bool createIt,
|
|||||||
case B_COMMON_LIB_DIRECTORY:
|
case B_COMMON_LIB_DIRECTORY:
|
||||||
case B_COMMON_SERVERS_DIRECTORY:
|
case B_COMMON_SERVERS_DIRECTORY:
|
||||||
case B_COMMON_BIN_DIRECTORY:
|
case B_COMMON_BIN_DIRECTORY:
|
||||||
case B_COMMON_ETC_DIRECTORY:
|
case B_SYSTEM_ETC_DIRECTORY:
|
||||||
case B_COMMON_DOCUMENTATION_DIRECTORY:
|
case B_COMMON_DOCUMENTATION_DIRECTORY:
|
||||||
case B_COMMON_SETTINGS_DIRECTORY:
|
case B_SYSTEM_SETTINGS_DIRECTORY:
|
||||||
case B_COMMON_DEVELOP_DIRECTORY:
|
case B_COMMON_DEVELOP_DIRECTORY:
|
||||||
case B_COMMON_LOG_DIRECTORY:
|
case B_SYSTEM_LOG_DIRECTORY:
|
||||||
case B_COMMON_SPOOL_DIRECTORY:
|
case B_SYSTEM_SPOOL_DIRECTORY:
|
||||||
case B_COMMON_TEMP_DIRECTORY:
|
case B_SYSTEM_TEMP_DIRECTORY:
|
||||||
case B_COMMON_VAR_DIRECTORY:
|
case B_SYSTEM_VAR_DIRECTORY:
|
||||||
case B_COMMON_TRANSLATORS_DIRECTORY:
|
case B_COMMON_TRANSLATORS_DIRECTORY:
|
||||||
case B_COMMON_MEDIA_NODES_DIRECTORY:
|
case B_COMMON_MEDIA_NODES_DIRECTORY:
|
||||||
case B_COMMON_SOUNDS_DIRECTORY:
|
case B_COMMON_SOUNDS_DIRECTORY:
|
||||||
case B_COMMON_DATA_DIRECTORY:
|
case B_COMMON_DATA_DIRECTORY:
|
||||||
case B_COMMON_CACHE_DIRECTORY:
|
case B_SYSTEM_CACHE_DIRECTORY:
|
||||||
case B_COMMON_PACKAGES_DIRECTORY:
|
case B_COMMON_PACKAGES_DIRECTORY:
|
||||||
case B_COMMON_HEADERS_DIRECTORY:
|
case B_COMMON_HEADERS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_ADDONS_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_TRANSLATORS_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_TRANSLATORS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_MEDIA_NODES_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_MEDIA_NODES_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_BIN_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_BIN_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_DATA_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_DATA_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_FONTS_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_SOUNDS_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_SOUNDS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_DOCUMENTATION_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_DOCUMENTATION_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_LIB_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_LIB_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_HEADERS_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_HEADERS_DIRECTORY:
|
||||||
case B_COMMON_NONPACKAGED_DEVELOP_DIRECTORY:
|
case B_SYSTEM_NONPACKAGED_DEVELOP_DIRECTORY:
|
||||||
templatePath = kCommonDirectories[which - B_COMMON_DIRECTORY];
|
templatePath = kCommonDirectories[which - B_COMMON_DIRECTORY];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
static status_t
|
static status_t
|
||||||
get_path(char *path, bool create)
|
get_path(char *path, bool create)
|
||||||
{
|
{
|
||||||
status_t status = find_directory(B_COMMON_SETTINGS_DIRECTORY, -1, create,
|
status_t status = find_directory(B_SYSTEM_SETTINGS_DIRECTORY, -1, create,
|
||||||
path, B_PATH_NAME_LENGTH);
|
path, B_PATH_NAME_LENGTH);
|
||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|||||||
@@ -808,7 +808,7 @@ void recordLogin(char *server, char *share, char *client, bool authenticated)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// Obtain the filename for the log file.
|
// Obtain the filename for the log file.
|
||||||
find_directory(B_COMMON_LOG_DIRECTORY, 0, false, path, sizeof(path));
|
find_directory(B_SYSTEM_LOG_DIRECTORY, 0, false, path, sizeof(path));
|
||||||
strcat(path, "/BeServed-Logins.log");
|
strcat(path, "/BeServed-Logins.log");
|
||||||
|
|
||||||
// Build the time stamp.
|
// Build the time stamp.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define WSTAT_MTIME 0x0020
|
#define WSTAT_MTIME 0x0020
|
||||||
#define WSTAT_CRTIME 0x0040
|
#define WSTAT_CRTIME 0x0040
|
||||||
|
|
||||||
#define B_COMMON_SETTINGS_DIRECTORY ".\\"
|
#define B_SYSTEM_SETTINGS_DIRECTORY ".\\"
|
||||||
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
|
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
|
||||||
|
|
||||||
#define ENOTSUP 1
|
#define ENOTSUP 1
|
||||||
|
|||||||
@@ -1604,7 +1604,7 @@ class FileSharingWindow : public BWindow
|
|||||||
fileShares[i].next = NULL;
|
fileShares[i].next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
||||||
strcat(path, "/BeServed-Settings");
|
strcat(path, "/BeServed-Settings");
|
||||||
|
|
||||||
fp = fopen(path, "r");
|
fp = fopen(path, "r");
|
||||||
@@ -1884,7 +1884,7 @@ class FileSharingWindow : public BWindow
|
|||||||
char path[B_PATH_NAME_LENGTH + 1];
|
char path[B_PATH_NAME_LENGTH + 1];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
||||||
strcat(path, "/BeServed-Settings");
|
strcat(path, "/BeServed-Settings");
|
||||||
|
|
||||||
fp = fopen(path, "w");
|
fp = fopen(path, "w");
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ void initShares()
|
|||||||
fileShares[i].next = NULL;
|
fileShares[i].next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
||||||
strcat(path, "/BeServed-Settings");
|
strcat(path, "/BeServed-Settings");
|
||||||
|
|
||||||
fp = fopen(path, "r");
|
fp = fopen(path, "r");
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
#define WSTAT_MTIME 0x0020
|
#define WSTAT_MTIME 0x0020
|
||||||
#define WSTAT_CRTIME 0x0040
|
#define WSTAT_CRTIME 0x0040
|
||||||
|
|
||||||
#define B_COMMON_SETTINGS_DIRECTORY ".\\"
|
#define B_SYSTEM_SETTINGS_DIRECTORY ".\\"
|
||||||
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
|
#define B_COMMON_SYSTEM_DIRECTORY ".\\"
|
||||||
|
|
||||||
#define ENOTSUP 1
|
#define ENOTSUP 1
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ void initShares()
|
|||||||
fileShares[i].next = NULL;
|
fileShares[i].next = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
find_directory(B_COMMON_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, 0, false, path, sizeof(path));
|
||||||
strcat(path, "/BeServed-Settings");
|
strcat(path, "/BeServed-Settings");
|
||||||
|
|
||||||
fp = fopen(path, "r");
|
fp = fopen(path, "r");
|
||||||
|
|||||||
@@ -71,8 +71,7 @@ int main (int argc, char *argv[])
|
|||||||
directory_which which[] = {
|
directory_which which[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
BPath path;
|
BPath path;
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ NetworkSettings::ReadConfiguration()
|
|||||||
fWirelessNetwork.SetTo(NULL);
|
fWirelessNetwork.SetTo(NULL);
|
||||||
|
|
||||||
BPath path;
|
BPath path;
|
||||||
find_directory(B_COMMON_SETTINGS_DIRECTORY, &path);
|
find_directory(B_SYSTEM_SETTINGS_DIRECTORY, &path);
|
||||||
path.Append("network");
|
path.Append("network");
|
||||||
path.Append("interfaces");
|
path.Append("interfaces");
|
||||||
|
|
||||||
|
|||||||
@@ -43,14 +43,14 @@ const directory_which directories[] = {
|
|||||||
B_COMMON_LIB_DIRECTORY,
|
B_COMMON_LIB_DIRECTORY,
|
||||||
B_COMMON_SERVERS_DIRECTORY,
|
B_COMMON_SERVERS_DIRECTORY,
|
||||||
B_COMMON_BIN_DIRECTORY,
|
B_COMMON_BIN_DIRECTORY,
|
||||||
B_COMMON_ETC_DIRECTORY,
|
B_SYSTEM_ETC_DIRECTORY,
|
||||||
B_COMMON_DOCUMENTATION_DIRECTORY,
|
B_COMMON_DOCUMENTATION_DIRECTORY,
|
||||||
B_COMMON_SETTINGS_DIRECTORY,
|
B_SYSTEM_SETTINGS_DIRECTORY,
|
||||||
B_COMMON_DEVELOP_DIRECTORY,
|
B_COMMON_DEVELOP_DIRECTORY,
|
||||||
B_COMMON_LOG_DIRECTORY,
|
B_SYSTEM_LOG_DIRECTORY,
|
||||||
B_COMMON_SPOOL_DIRECTORY,
|
B_SYSTEM_SPOOL_DIRECTORY,
|
||||||
B_COMMON_TEMP_DIRECTORY,
|
B_SYSTEM_TEMP_DIRECTORY,
|
||||||
B_COMMON_VAR_DIRECTORY,
|
B_SYSTEM_VAR_DIRECTORY,
|
||||||
B_COMMON_TRANSLATORS_DIRECTORY,
|
B_COMMON_TRANSLATORS_DIRECTORY,
|
||||||
B_COMMON_MEDIA_NODES_DIRECTORY,
|
B_COMMON_MEDIA_NODES_DIRECTORY,
|
||||||
B_COMMON_SOUNDS_DIRECTORY,
|
B_COMMON_SOUNDS_DIRECTORY,
|
||||||
@@ -249,28 +249,28 @@ test_find_directory(directory_which dir, BPath &path, dev_t device)
|
|||||||
case B_COMMON_BIN_DIRECTORY:
|
case B_COMMON_BIN_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/bin");
|
error = path.SetTo("/boot/home/config/bin");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_ETC_DIRECTORY:
|
case B_SYSTEM_ETC_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/etc");
|
error = path.SetTo("/boot/home/config/etc");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_DOCUMENTATION_DIRECTORY:
|
case B_COMMON_DOCUMENTATION_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/documentation");
|
error = path.SetTo("/boot/home/config/documentation");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_SETTINGS_DIRECTORY:
|
case B_SYSTEM_SETTINGS_DIRECTORY:
|
||||||
error = path.SetTo("/boot/home/config/settings");
|
error = path.SetTo("/boot/home/config/settings");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_DEVELOP_DIRECTORY:
|
case B_COMMON_DEVELOP_DIRECTORY:
|
||||||
error = path.SetTo("/boot/develop");
|
error = path.SetTo("/boot/develop");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_LOG_DIRECTORY:
|
case B_SYSTEM_LOG_DIRECTORY:
|
||||||
error = path.SetTo("/boot/var/log");
|
error = path.SetTo("/boot/var/log");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_SPOOL_DIRECTORY:
|
case B_SYSTEM_SPOOL_DIRECTORY:
|
||||||
error = path.SetTo("/boot/var/spool");
|
error = path.SetTo("/boot/var/spool");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_TEMP_DIRECTORY:
|
case B_SYSTEM_TEMP_DIRECTORY:
|
||||||
error = path.SetTo("/boot/var/tmp");
|
error = path.SetTo("/boot/var/tmp");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_VAR_DIRECTORY:
|
case B_SYSTEM_VAR_DIRECTORY:
|
||||||
error = path.SetTo("/boot/var");
|
error = path.SetTo("/boot/var");
|
||||||
break;
|
break;
|
||||||
case B_COMMON_TRANSLATORS_DIRECTORY:
|
case B_COMMON_TRANSLATORS_DIRECTORY:
|
||||||
|
|||||||
@@ -201,8 +201,7 @@ AccelerantHWInterface::_OpenAccelerant(int device)
|
|||||||
const static directory_which dirs[] = {
|
const static directory_which dirs[] = {
|
||||||
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
B_USER_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_USER_ADDONS_DIRECTORY,
|
B_USER_ADDONS_DIRECTORY,
|
||||||
B_COMMON_NONPACKAGED_ADDONS_DIRECTORY,
|
B_SYSTEM_NONPACKAGED_ADDONS_DIRECTORY,
|
||||||
B_COMMON_ADDONS_DIRECTORY,
|
|
||||||
B_SYSTEM_ADDONS_DIRECTORY
|
B_SYSTEM_ADDONS_DIRECTORY
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# e.g.,
|
# e.g.,
|
||||||
# haiku/trunk/docs> sh ../src/tools/propset-files.sh
|
# haiku/trunk/docs> sh ../src/tools/propset-files.sh
|
||||||
|
|
||||||
tmpDir="`finddir B_COMMON_TEMP_DIRECTORY`"
|
tmpDir="`finddir B_SYSTEM_TEMP_DIRECTORY`"
|
||||||
tmpFile="${tmpDir}/propset-html"
|
tmpFile="${tmpDir}/propset-html"
|
||||||
find . -type d -name .svn -prune -o -print > "$tmpFile"
|
find . -type d -name .svn -prune -o -print > "$tmpFile"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user