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 <gentoo-commits+bounces-364896-garchives=archives.gentoo.org@lists.gentoo.org>) id 1QkVxp-0004aB-Kj for garchives@archives.gentoo.org; Sat, 23 Jul 2011 06:45:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BE01421C090; Sat, 23 Jul 2011 06:45:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 941BD21C0B7 for <gentoo-commits@lists.gentoo.org>; Sat, 23 Jul 2011 06:45:07 +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 B513E1BC00A for <gentoo-commits@lists.gentoo.org>; Sat, 23 Jul 2011 06:45:06 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E323A80051 for <gentoo-commits@lists.gentoo.org>; Sat, 23 Jul 2011 06:45:05 +0000 (UTC) From: "Brian Dolbec" <brian.dolbec@gmail.com> To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" <brian.dolbec@gmail.com> Message-ID: <0fde69e7ef993c3e5cca925cef35c8c895cfd834.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/overlays/ X-VCS-Repository: proj/layman X-VCS-Files: layman/overlays/cvs.py layman/overlays/tar.py X-VCS-Directories: layman/overlays/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 0fde69e7ef993c3e5cca925cef35c8c895cfd834 Date: Sat, 23 Jul 2011 06:45:05 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 403741c5eba44f478ab6fa1e077336e4 commit: 0fde69e7ef993c3e5cca925cef35c8c895cfd834 Author: dol-sen <brian.dolbec <AT> gmail <DOT> com> AuthorDate: Sat Jul 23 06:44:26 2011 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Sat Jul 23 06:44:26 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D0fde69e7 fix undefined 'subpath', update tests --- layman/overlays/cvs.py | 1 + layman/overlays/tar.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/layman/overlays/cvs.py b/layman/overlays/cvs.py index c6660d0..83981e5 100644 --- a/layman/overlays/cvs.py +++ b/layman/overlays/cvs.py @@ -44,6 +44,7 @@ class CvsOverlay(OverlaySource): def __init__(self, parent, config, _location, ignore =3D 0, quiet =3D= False): =20 super(CvsOverlay, self).__init__(parent, config, _location, igno= re, quiet) + self.subpath =3D None =20 =20 def __eq__(self, other): diff --git a/layman/overlays/tar.py b/layman/overlays/tar.py index e6c0d45..dc2234a 100644 --- a/layman/overlays/tar.py +++ b/layman/overlays/tar.py @@ -57,15 +57,18 @@ class TarOverlay(OverlaySource): >>> subpath =3D ET.Element('subpath') >>> subpath.text =3D 'layman-test' >>> repo[:] =3D [repo_name, desc, owner, source, subpath] - >>> config =3D {'tar_command':'/bin/tar', 'output': Message()} + >>> from layman.config import BareConfig + >>> config =3D BareConfig() >>> testdir =3D os.tmpnam() >>> os.mkdir(testdir) >>> from layman.overlays.overlay import Overlay >>> a =3D Overlay(config, repo, quiet=3DFalse) >>> config['output'].set_colorize(False) - >>> a.add(testdir) #doctest: +ELLIPSIS - * Running... # /bin/tar -v -x -f... - >>> sorted(os.listdir(testdir + '/dummy')) + >>> a.add(testdir) + 0 + >>> os.listdir(testdir + '/dummy/') + ['layman-test'] + >>> sorted(os.listdir(testdir + '/dummy/layman-test/')) ['app-admin', 'app-portage'] >>> shutil.rmtree(testdir) ''' @@ -79,6 +82,7 @@ class TarOverlay(OverlaySource): config, _location, ignore, quiet) =20 self.output =3D config['output'] + self.subpath =3D None =20 def __eq__(self, other): res =3D super(TarOverlay, self).__eq__(other) \