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 1RaeBe-0001f6-5g for garchives@archives.gentoo.org; Wed, 14 Dec 2011 02:03:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7336721C0F4; Wed, 14 Dec 2011 02:03:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 44B1A21C0F4 for ; Wed, 14 Dec 2011 02:03:05 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B88881B401A for ; Wed, 14 Dec 2011 02:03:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0CBFC8004A for ; Wed, 14 Dec 2011 02:03:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/locks.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: c11b7c487c518f9a2aceaddbe119a70877053cf5 Date: Wed, 14 Dec 2011 02:03:04 +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: 4f368b9c-743d-4dec-adf5-c1c7a63464f6 X-Archives-Hash: 543134b85e10e971cfb1f32d7db121ce commit: c11b7c487c518f9a2aceaddbe119a70877053cf5 Author: Zac Medico gentoo org> AuthorDate: Wed Dec 14 02:02:23 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed Dec 14 02:02:23 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Dc11b7c48 locks.py: make hardlink lock files hidden This is for consistency with the behavior for normal lock files, since commit ce44ea3e914098a52bc0d1d995e71661659e77ca (bug #142369). --- pym/portage/locks.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 9cfb87e..41539ba 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -1,5 +1,5 @@ # portage: Lock management code -# Copyright 2004-2010 Gentoo Foundation +# Copyright 2004-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 =20 __all__ =3D ["lockdir", "unlockdir", "lockfile", "unlockfile", \ @@ -267,7 +267,9 @@ def unlockfile(mytuple): =20 =20 def hardlock_name(path): - return path+".hardlock-"+os.uname()[1]+"-"+str(os.getpid()) + base, tail =3D os.path.split(path) + return os.path.join(base, ".%s.hardlock-%s-%s" % + (tail, os.uname()[1], os.getpid())) =20 def hardlink_is_mine(link,lock): try: @@ -349,7 +351,7 @@ def hardlock_cleanup(path, remove_all_locks=3DFalse): if os.path.isfile(path+"/"+x): parts =3D x.split(".hardlock-") if len(parts) =3D=3D 2: - filename =3D parts[0] + filename =3D parts[0][1:] hostpid =3D parts[1].split("-") host =3D "-".join(hostpid[:-1]) pid =3D hostpid[-1] @@ -373,7 +375,7 @@ def hardlock_cleanup(path, remove_all_locks=3DFalse): remove_all_locks: for y in mylist[x]: for z in mylist[x][y]: - filename =3D path+"/"+x+".hardlock-"+y+"-"+z + filename =3D path+"/."+x+".hardlock-"+y+"-"+z if filename =3D=3D mylockname: continue try: