From: "Brian Dolbec" <brian.dolbec@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/layman:master commit in: layman/, etc/
Date: Tue, 9 Aug 2011 02:46:53 +0000 (UTC) [thread overview]
Message-ID: <0a03f32c1257af352bf9ffa2be324c53f2656aa3.dol-sen@gentoo> (raw)
commit: 0a03f32c1257af352bf9ffa2be324c53f2656aa3
Author: dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Tue Aug 9 01:14:18 2011 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Tue Aug 9 01:14:18 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=0a03f32c
make it EPREFIX ready
---
etc/layman.cfg | 3 +--
layman/config.py | 31 ++++++++++++++++++++-----------
2 files changed, 21 insertions(+), 13 deletions(-)
diff --git a/etc/layman.cfg b/etc/layman.cfg
index a3bce58..7b8128f 100644
--- a/etc/layman.cfg
+++ b/etc/layman.cfg
@@ -1,9 +1,8 @@
[MAIN]
-
#-----------------------------------------------------------
# Defines the directory where overlays should be installed
-storage : /var/lib/layman
+storage : @GENTOO_PORTAGE_EPREFIX@/var/lib/layman
#-----------------------------------------------------------
# Remote overlay lists will be stored here
diff --git a/layman/config.py b/layman/config.py
index 3873eef..1187f78 100644
--- a/layman/config.py
+++ b/layman/config.py
@@ -25,6 +25,7 @@
__version__ = "0.2"
+
import sys
import os
import ConfigParser
@@ -55,6 +56,14 @@ def read_layman_config(config=None, defaults=None):
config.set('MAIN', 'overlays', '\n'.join(overlays))
+# establish the eprefix, initially set so eprefixify can
+# set it on install
+EPREFIX = "@GENTOO_PORTAGE_EPREFIX@"
+
+# check and set it if it wasn't
+if EPREFIX == "@GENTOO_PORTAGE_EPREFIX@":
+ EPREFIX = ''
+
class BareConfig(object):
'''Handles the configuration only.'''
@@ -76,9 +85,9 @@ class BareConfig(object):
'''
self._defaults = {
- 'configdir': '/etc/layman',
+ 'configdir': EPREFIX + '/etc/layman',
'config' : '%(configdir)s/layman.cfg',
- 'storage' : '/var/lib/layman',
+ 'storage' : EPREFIX + '/var/lib/layman',
'cache' : '%(storage)s/cache',
'local_list': '%(storage)s/overlays.xml',
'make_conf' : '%(storage)s/make.conf',
@@ -88,15 +97,15 @@ class BareConfig(object):
'overlays' :
'http://www.gentoo.org/proj/en/overlays/repositories.xml',
'overlay_defs': '%(configdir)s/overlays',
- 'bzr_command': '/usr/bin/bzr',
- 'cvs_command': '/usr/bin/cvs',
- 'darcs_command': '/usr/bin/darcs',
- 'git_command': '/usr/bin/git',
- 'g-common_command': '/usr/bin/g-common',
- 'mercurial_command': '/usr/bin/hg',
- 'rsync_command': '/usr/bin/rsync',
- 'svn_command': '/usr/bin/svn',
- 'tar_command': '/bin/tar',
+ 'bzr_command': EPREFIX +'/usr/bin/bzr',
+ 'cvs_command': EPREFIX +'/usr/bin/cvs',
+ 'darcs_command': EPREFIX +'/usr/bin/darcs',
+ 'git_command': EPREFIX +'/usr/bin/git',
+ 'g-common_command': EPREFIX +'/usr/bin/g-common',
+ 'mercurial_command': EPREFIX +'/usr/bin/hg',
+ 'rsync_command': EPREFIX +'/usr/bin/rsync',
+ 'svn_command': EPREFIX +'/usr/bin/svn',
+ 'tar_command': EPREFIX +'/bin/tar',
't/f_options': ['nocheck'],
'bzr_addopts' : '',
'bzr_syncopts' : '',
next reply other threads:[~2011-08-09 2:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-09 2:46 Brian Dolbec [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-24 14:02 [gentoo-commits] proj/layman:master commit in: layman/, etc/ Brian Dolbec
2012-03-26 3:43 Brian Dolbec
2012-11-18 22:15 Brian Dolbec
2013-07-29 1:46 Brian Dolbec
2013-08-10 17:17 Brian Dolbec
2014-07-24 2:03 Devan Franchini
2014-08-17 1:33 Devan Franchini
2014-08-19 1:49 ` Devan Franchini
2015-03-07 21:55 Devan Franchini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0a03f32c1257af352bf9ffa2be324c53f2656aa3.dol-sen@gentoo \
--to=brian.dolbec@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox