From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 03B641381F3 for ; Thu, 25 Jul 2013 18:25:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9BF08E09F2; Thu, 25 Jul 2013 18:25:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 220B0E09F2 for ; Thu, 25 Jul 2013 18:25:52 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 81F8E33E3CC for ; Thu, 25 Jul 2013 18:25:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 08336E5458 for ; Thu, 25 Jul 2013 18:25:50 +0000 (UTC) From: "Arfrever Frehtes Taifersar Arahesis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Arfrever Frehtes Taifersar Arahesis" Message-ID: <1374776705.eb7bb7d4e08ed32502864a20c678c7fc4e1f1277.arfrever@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/repository/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/repository/config.py X-VCS-Directories: pym/portage/repository/ X-VCS-Committer: arfrever X-VCS-Committer-Name: Arfrever Frehtes Taifersar Arahesis X-VCS-Revision: eb7bb7d4e08ed32502864a20c678c7fc4e1f1277 X-VCS-Branch: master Date: Thu, 25 Jul 2013 18:25:50 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 6e8ea9e2-7945-49bc-ad84-2ca3a6132a63 X-Archives-Hash: 93b29564893ff475813f0139483cc800 commit: eb7bb7d4e08ed32502864a20c678c7fc4e1f1277 Author: Arfrever Frehtes Taifersar Arahesis Apache Org> AuthorDate: Thu Jul 25 18:25:05 2013 +0000 Commit: Arfrever Frehtes Taifersar Arahesis gmail com> CommitDate: Thu Jul 25 18:25:05 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=eb7bb7d4 Print more consistent error messages for entries in repos.conf. --- pym/portage/repository/config.py | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 8b9ed2c..a79de4a 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -623,23 +623,32 @@ class RepoConfigLoader(object): if repo_name != 'DEFAULT': # Skip this warning for repoman (bug #474578). if settings.local_config and paths: - writemsg_level(_("Location undefined for " \ - "repository '%s' referenced in '%s'\n") % \ - (repo.name, (paths if len(paths) > 1 else paths[0])), - level=logging.ERROR, noiselevel=-1) - del prepos[repo_name] - else: - if repo.name != repo_name and not portage._sync_disabled_warnings: - writemsg_level("!!! %s\n" % _("Section name '%s' set in repos.conf differs from name '%s' set inside repository") % - (repo_name, repo.name), level=logging.ERROR, noiselevel=-1) + writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf is missing location attribute") % + repo.name, level=logging.ERROR, noiselevel=-1) del prepos[repo_name] continue + else: + if not portage._sync_disabled_warnings: + if repo.location and not isdir_raise_eaccess(repo.location): + writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has location attribute set " + "to nonexistent directory: '%s'") % + (repo_name, repo.location), level=logging.ERROR, noiselevel=-1) + del prepos[repo_name] + continue - if repo.location and not exists_raise_eaccess(repo.location) and not portage._sync_disabled_warnings: - writemsg_level("!!! %s\n" % _("Repository '%s' has location attribute set to nonexistent directory: '%s'") % - (repo_name, repo.location), level=logging.ERROR, noiselevel=-1) - del prepos[repo_name] - continue + if repo.missing_repo_name: + writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf refers to repository " + "without repository name set in '%s'") % + (repo_name, os.path.join(repo.location, REPO_NAME_LOC)), level=logging.ERROR, noiselevel=-1) + del prepos[repo_name] + continue + + if repo.name != repo_name: + writemsg_level("!!! %s\n" % _("Section '%s' in repos.conf has name different " + "from repository name '%s' set inside repository") % + (repo_name, repo.name), level=logging.ERROR, noiselevel=-1) + del prepos[repo_name] + continue location_map[repo.location] = repo_name treemap[repo_name] = repo.location