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 1Nlalc-0006KW-3y for garchives@archives.gentoo.org; Sun, 28 Feb 2010 04:28:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E196E081B; Sun, 28 Feb 2010 04:28:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E71AFE081B for ; Sun, 28 Feb 2010 04:28:29 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 8E8DF1B4135 for ; Sun, 28 Feb 2010 04:28:29 +0000 (UTC) Received: from zmedico by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NlalZ-0006il-1f for gentoo-commits@lists.gentoo.org; Sun, 28 Feb 2010 04:28:29 +0000 To: gentoo-commits@lists.gentoo.org From: "Zac Medico (zmedico)" Subject: [gentoo-commits] portage r15491 - in main/trunk/pym/portage: . package/ebuild X-VCS-Repository: portage X-VCS-Revision: 15491 X-VCS-Files: main/trunk/pym/portage/package/ebuild/deprecated_profile_check.py main/trunk/pym/portage/__init__.py X-VCS-Directories: . package/ebuild X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico Content-Type: text/plain; charset=UTF-8 Message-Id: Sender: Zac Medico Date: Sun, 28 Feb 2010 04:28:29 +0000 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: e55d5e0a-01d3-4967-aab5-596a40a975f8 X-Archives-Hash: 5ed7d33f833301fd1d5be5124c2f73e8 Author: zmedico Date: 2010-02-28 04:28:21 +0000 (Sun, 28 Feb 2010) New Revision: 15491 Added: main/trunk/pym/portage/package/ebuild/deprecated_profile_check.py Modified: main/trunk/pym/portage/__init__.py Log: Move deprecated_profile_check to portage.package.ebuild submodule. Modified: main/trunk/pym/portage/__init__.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/trunk/pym/portage/__init__.py 2010-02-28 04:09:59 UTC (rev 15490= ) +++ main/trunk/pym/portage/__init__.py 2010-02-28 04:28:21 UTC (rev 15491= ) @@ -107,6 +107,8 @@ 'doebuild_environment,spawn,spawnebuild', 'portage.package.ebuild.config:autouse,best_from_dict,' + \ 'check_config_instance,config', + 'portage.package.ebuild.deprecated_profile_check:' + \ + 'deprecated_profile_check', 'portage.package.ebuild.digestcheck:digestcheck', 'portage.package.ebuild.digestgen:digestgen', 'portage.package.ebuild.fetch:fetch', @@ -507,36 +509,6 @@ ) auxdbkeylen=3Dlen(auxdbkeys) =20 -def deprecated_profile_check(settings=3DNone): - config_root =3D "/" - if settings is not None: - config_root =3D settings["PORTAGE_CONFIGROOT"] - deprecated_profile_file =3D os.path.join(config_root, - DEPRECATED_PROFILE_FILE) - if not os.access(deprecated_profile_file, os.R_OK): - return False - dcontent =3D codecs.open(_unicode_encode(deprecated_profile_file, - encoding=3D_encodings['fs'], errors=3D'strict'),=20 - mode=3D'r', encoding=3D_encodings['content'], errors=3D'replace').read= lines() - writemsg(colorize("BAD", _("\n!!! Your current profile is " - "deprecated and not supported anymore.")) + "\n", noiselevel=3D-1) - writemsg(colorize("BAD", _("!!! Use eselect profile to update your " - "profile.")) + "\n", noiselevel=3D-1) - if not dcontent: - writemsg(colorize("BAD", _("!!! Please refer to the " - "Gentoo Upgrading Guide.")) + "\n", noiselevel=3D-1) - return True - newprofile =3D dcontent[0] - writemsg(colorize("BAD", _("!!! Please upgrade to the " - "following profile if possible:")) + "\n", noiselevel=3D-1) - writemsg(8*" " + colorize("GOOD", newprofile) + "\n", noiselevel=3D-1) - if len(dcontent) > 1: - writemsg(_("To upgrade do the following steps:\n"), noiselevel=3D-1) - for myline in dcontent[1:]: - writemsg(myline, noiselevel=3D-1) - writemsg("\n\n", noiselevel=3D-1) - return True - def portageexit(): if secpass > 1 and os.environ.get("SANDBOX_ON") !=3D "1": close_portdbapi_caches() Added: main/trunk/pym/portage/package/ebuild/deprecated_profile_check.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- main/trunk/pym/portage/package/ebuild/deprecated_profile_check.py = (rev 0) +++ main/trunk/pym/portage/package/ebuild/deprecated_profile_check.py 201= 0-02-28 04:28:21 UTC (rev 15491) @@ -0,0 +1,43 @@ +# Copyright 2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +__all__ =3D ['deprecated_profile_check'] + +import codecs + +from portage import os, _encodings, _unicode_encode +from portage.const import DEPRECATED_PROFILE_FILE +from portage.localization import _ +from portage.output import colorize +from portage.util import writemsg + +def deprecated_profile_check(settings=3DNone): + config_root =3D "/" + if settings is not None: + config_root =3D settings["PORTAGE_CONFIGROOT"] + deprecated_profile_file =3D os.path.join(config_root, + DEPRECATED_PROFILE_FILE) + if not os.access(deprecated_profile_file, os.R_OK): + return False + dcontent =3D codecs.open(_unicode_encode(deprecated_profile_file, + encoding=3D_encodings['fs'], errors=3D'strict'),=20 + mode=3D'r', encoding=3D_encodings['content'], errors=3D'replace').read= lines() + writemsg(colorize("BAD", _("\n!!! Your current profile is " + "deprecated and not supported anymore.")) + "\n", noiselevel=3D-1) + writemsg(colorize("BAD", _("!!! Use eselect profile to update your " + "profile.")) + "\n", noiselevel=3D-1) + if not dcontent: + writemsg(colorize("BAD", _("!!! Please refer to the " + "Gentoo Upgrading Guide.")) + "\n", noiselevel=3D-1) + return True + newprofile =3D dcontent[0] + writemsg(colorize("BAD", _("!!! Please upgrade to the " + "following profile if possible:")) + "\n", noiselevel=3D-1) + writemsg(8*" " + colorize("GOOD", newprofile) + "\n", noiselevel=3D-1) + if len(dcontent) > 1: + writemsg(_("To upgrade do the following steps:\n"), noiselevel=3D-1) + for myline in dcontent[1:]: + writemsg(myline, noiselevel=3D-1) + writemsg("\n\n", noiselevel=3D-1) + return True Property changes on: main/trunk/pym/portage/package/ebuild/deprecated_pro= file_check.py ___________________________________________________________________ Added: svn:keywords + Id