From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QqcLT-0002US-0y for garchives@archives.gentoo.org; Tue, 09 Aug 2011 02:47:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE35421C039; Tue, 9 Aug 2011 02:46:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A916521C039 for ; Tue, 9 Aug 2011 02:46:54 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 026271B403C for ; Tue, 9 Aug 2011 02:46:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 56DB980040 for ; Tue, 9 Aug 2011 02:46:53 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <0a03f32c1257af352bf9ffa2be324c53f2656aa3.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/, etc/ X-VCS-Repository: proj/layman X-VCS-Files: etc/layman.cfg layman/config.py X-VCS-Directories: layman/ etc/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 0a03f32c1257af352bf9ffa2be324c53f2656aa3 Date: Tue, 9 Aug 2011 02:46:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: d352a3fd1fb32322ede4694ba07fa05f commit: 0a03f32c1257af352bf9ffa2be324c53f2656aa3 Author: dol-sen gmail com> AuthorDate: Tue Aug 9 01:14:18 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Tue Aug 9 01:14:18 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D0a03f32c 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 =20 -storage : /var/lib/layman +storage : @GENTOO_PORTAGE_EPREFIX@/var/lib/layman =20 #----------------------------------------------------------- # 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__ =3D "0.2" =20 =20 + import sys import os import ConfigParser @@ -55,6 +56,14 @@ def read_layman_config(config=3DNone, defaults=3DNone)= : config.set('MAIN', 'overlays', '\n'.join(overlays)) =20 =20 +# establish the eprefix, initially set so eprefixify can +# set it on install +EPREFIX =3D "@GENTOO_PORTAGE_EPREFIX@" + +# check and set it if it wasn't +if EPREFIX =3D=3D "@GENTOO_PORTAGE_EPREFIX@": + EPREFIX =3D '' + =20 class BareConfig(object): '''Handles the configuration only.''' @@ -76,9 +85,9 @@ class BareConfig(object): ''' =20 self._defaults =3D { - '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' : '',