From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <45C0A785.4030306@altlinux.org> Date: Wed, 31 Jan 2007 17:28:21 +0300 From: Mikhail Yakshin User-Agent: Thunderbird 1.5.0.5 (X11/20060822) MIME-Version: 1.0 To: ALT Devel discussion list References: <45B90C15.8020708@altlinux.org> <45C08B0B.7060508@altlinux.org> <20070131124311.GG6627@mw.local.seiros.ru> <200701311459.32102.led@altlinux.ru> <20070131140831.GA12755@mw.local.seiros.ru> In-Reply-To: <20070131140831.GA12755@mw.local.seiros.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [devel] ~/.config/ (was gear-tarimport) X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jan 2007 14:29:24 -0000 Archived-At: List-Archive: List-Post: Денис Смирнов пишет: > Либа ищет _путь_ конфига. Находит. Только можно в качестве конфига её > просить не путь к файлу, а путь к _каталогу_. Тогда отрабатывает все > нормально. > > Концепт ушел в git под именем libxdgconfig. Если смотреть в эти стандарты, то есть еще: There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME. There is a set of preference ordered base directories relative to which configuration files should be searched. This set of directories is defined by the environment variable $XDG_CONFIG_DIRS. $XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'. If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used. The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent. The base directory defined by $XDG_DATA_HOME is considered more important than any of the base directories defined by $XDG_DATA_DIRS. The base directory defined by $XDG_CONFIG_HOME is considered more important than any of the base directories defined by $XDG_CONFIG_DIRS. Т.е. надо еще проходить по списку XDG_CONFIG_DIRS и анализировать его. XDG_CONFIG_HOME - это только первый его элемент. И искать, видимо, нужно будет все-таки конкретный файл, а не только путь... P.S. А зачем в новой библиотеке autotools использовать? -- WBR, Mikhail Yakshin