Package: gnustep-base-runtime
Version: 1.22.1-4.3
Followup-For: Bug #720190
Upstream fixed this with commit 34169 in their SVN repository.
The commit message is
"
deal with old FIXME about creating library path
"
and the added ChangeLog entry reads
"
* Source/NSPathUtilities.m: Deal with old FIXME saying that whether
we create the GNUstep/Library directory should be configurable.
Also, break long lines to confiorm to coding standards and for
consistency.
"
They fixed it by making the creation of the directory under $HOME conditional
depending on the GNUSTEP_CREATE_LIBRARY_PATH being set.
I have backported the relevant part of that commit so it applies against the
Debian package. Please dinf the patch attached to this message.
- Fabian
-- System Information:
Debian Release: jessie/sid
APT prefers testing
APT policy: (990, 'testing'), (900, 'unstable'), (800, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages gnustep-base-runtime depends on:
ii gnustep-base-common1.22.1-4.3
ii gnustep-common [gnustep-fslayout-fhs] 2.6.2-2.1
ii libc6 2.18-4
ii libgcc11:4.8.2-16
ii libgnustep-base1.221.22.1-4.3
ii libobjc4 4.8.2-16
ii lsb-base 4.1+Debian12
gnustep-base-runtime recommends no packages.
gnustep-base-runtime suggests no packages.
-- no debconf information
Description: deal with old FIXME about creating library path
* Source/NSPathUtilities.m: Deal with old FIXME saying that whether
we create the GNUstep/Library directory should be configurable.
Also, break long lines to confiorm to coding standards and for
consistency.
Author: Richard Frith-Macdonald
Origin: http://svn.gna.org/viewcvs/gnustep?view=revision&revision=34169
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720190
--- a/Source/NSPathUtilities.m
+++ b/Source/NSPathUtilities.m
@@ -418,6 +418,7 @@ getPathConfig(NSDictionary *dict, NSStri
static void ExtractValuesFromConfig(NSDictionary *config)
{
NSMutableDictionary *c = [config mutableCopy];
+ BOOL createLibraryPath;
id extra;
/*
@@ -514,6 +515,14 @@ static void ExtractValuesFromConfig(NSDi
}
[c removeObjectForKey: @"GNUSTEP_SYSTEM_DEFAULTS_FILE"];
+ /* If GNUSTEP_CREATE_DIRECTORIES is YES then we should ensure that the
+ * per-user directory and the Library subdirectory exist so resources
+ * can safely be stored in them.
+ */
+ createLibraryPath
+= [[c objectForKey: @"GNUSTEP_CREATE_LIBRARY_PATH"] boolValue];
+ [c removeObjectForKey: @"GNUSTEP_CREATE_LIBRARY_PATH"];
+
/*
* Remove any other dictionary entries we have used.
*/
@@ -596,10 +605,9 @@ static void ExtractValuesFromConfig(NSDi
ASSIGN_USER_PATH(gnustepUserDocumentationInfo, gnustepUserDocumentationInfo);
/*
- * Try to ensure that essential user directories exist.
- * FIXME ... Check/creation should perhaps be configurable.
+ * Try to ensure that essential user directories exist if we need to.
*/
- if (1)
+ if (YES == createLibraryPath)
{
NSFileManager *manager;
NSString *path;
--- a/Documentation/Base.gsdoc
+++ b/Documentation/Base.gsdoc
@@ -629,6 +629,16 @@ notice and this notice are preserved.
environment variable if the others can't be used).
+ NB. The presence of a path in the configuration (and therefore
+ its inclusion in the paths provided by the API at runtime) does
+ not guarantee that the directory at that path actually
+ exists in the local filesystem.
+ However the GNUSTEP_CREATE_LIBRARY_PATH configuration value may
+ be set to YES to tell the library to create the most commonly
+ used per-user directory (GNUSTEP_USER_LIBRARY) on startup if it
+ does not already exist.
+
+
All the above values from the configuration file are made
available in the NSUserDefaults system at runtime, in the
GSConfigDomain (along with any defaults provided in property
@@ -735,7 +745,7 @@ notice and this notice are preserved.
with './' as the config file path and relative paths in myConfig...
a user could then move the entire package around, but would not
be able to edit a configuration file to alter the paths within
- the pacakge.
+ the package.