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 7A63C1381F3 for ; Tue, 18 Jun 2013 21:21:03 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C1B68E09A9; Tue, 18 Jun 2013 21:20:58 +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 542D9E09A9 for ; Tue, 18 Jun 2013 21:20:58 +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 6988E33E1C2 for ; Tue, 18 Jun 2013 21:20:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 1267CE468F for ; Tue, 18 Jun 2013 21:20:56 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1371590435.f9e7b12db80b10e509f07ef3bb7bac65a0a7573d.zmedico@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: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: f9e7b12db80b10e509f07ef3bb7bac65a0a7573d X-VCS-Branch: master Date: Tue, 18 Jun 2013 21:20:56 +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: b1d5422f-d638-4d16-8351-beb0b6a4c700 X-Archives-Hash: 4a3cf34a940f18c08ff124a28c6dbf14 commit: f9e7b12db80b10e509f07ef3bb7bac65a0a7573d Author: Zac Medico gentoo org> AuthorDate: Tue Jun 18 21:20:35 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Jun 18 21:20:35 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f9e7b12d RepoConfigLoader: main-repo priority before sort --- pym/portage/repository/config.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 56a9ea4..40fe2c9 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -554,14 +554,6 @@ class RepoConfigLoader(object): location_map[repo.location] = name treemap[name] = repo.location - # filter duplicates from aliases, by only including - # items where repo.name == key - - prepos_order = sorted(prepos.items(), key=lambda r:r[1].priority or 0) - - prepos_order = [repo.name for (key, repo) in prepos_order - if repo.name == key and repo.location is not None] - main_repo = prepos['DEFAULT'].main_repo if main_repo is None or main_repo not in prepos: #setting main_repo if it was not set in repos.conf @@ -577,6 +569,13 @@ class RepoConfigLoader(object): # This happens if main-repo has been set in repos.conf. prepos[main_repo].priority = -1000 + # filter duplicates from aliases, by only including + # items where repo.name == key + prepos_order = sorted(prepos.items(), key=lambda r:r[1].priority or 0) + prepos_order = [repo.name for (key, repo) in prepos_order + if repo.name == key and key != 'DEFAULT' and + repo.location is not None] + self.prepos = prepos self.prepos_order = prepos_order self.ignored_repos = ignored_repos