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 1Qz12z-0000EV-Te for garchives@archives.gentoo.org; Thu, 01 Sep 2011 06:46:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0337A21C093; Thu, 1 Sep 2011 06:46:35 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id C8D3321C093 for ; Thu, 1 Sep 2011 06:46:35 +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 53F471B402A for ; Thu, 1 Sep 2011 06:46:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5FD5080042 for ; Thu, 1 Sep 2011 06:46:34 +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: <0d79d130c27af4ba9676c9297639e064d18d9528.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/dbapi/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/dbapi/vartree.py X-VCS-Directories: pym/portage/dbapi/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0d79d130c27af4ba9676c9297639e064d18d9528 Date: Thu, 1 Sep 2011 06:46:34 +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: bdaa620bdea5aec86f821678a6740880 commit: 0d79d130c27af4ba9676c9297639e064d18d9528 Author: Zac Medico gentoo org> AuthorDate: Thu Sep 1 06:45:01 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Sep 1 06:45:01 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D0d79d130 unmerge: never unmerge outside of EROOT --- pym/portage/dbapi/vartree.py | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 1a38d42..0c0ed6a 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1980,10 +1980,11 @@ class dblink(object): unmerge_desc["!mtime"] =3D _("!mtime") unmerge_desc["!obj"] =3D _("!obj") unmerge_desc["!sym"] =3D _("!sym") + unmerge_desc["!prefix"] =3D _("!prefix") =20 real_root =3D self.settings['ROOT'] real_root_len =3D len(real_root) - 1 - eroot_split_len =3D len(self.settings["EROOT"].split(os.sep)) - 1 + eroot =3D self.settings["EROOT"] =20 # These files are generated by emerge, so we need to remove # them when they are the only thing left in a directory. @@ -2023,6 +2024,12 @@ class dblink(object): =20 file_data =3D pkgfiles[objkey] file_type =3D file_data[0] + + # don't try to unmerge the prefix offset itself + if len(obj) <=3D len(eroot) or not obj.startswith(eroot): + show_unmerge("---", unmerge_desc["!prefix"], file_type, obj) + continue + statobj =3D None try: statobj =3D os.stat(obj)