From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-996174-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 73F60138330
	for <garchives@archives.gentoo.org>; Sun,  7 Jan 2018 20:15:52 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 72929E0872;
	Sun,  7 Jan 2018 20:15:49 +0000 (UTC)
Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 4E9F5E0872
	for <gentoo-commits@lists.gentoo.org>; Sun,  7 Jan 2018 20:15:48 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 51E92340C80
	for <gentoo-commits@lists.gentoo.org>; Sun,  7 Jan 2018 20:15:47 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id E349E1D
	for <gentoo-commits@lists.gentoo.org>; Sun,  7 Jan 2018 20:15:45 +0000 (UTC)
From: "Sergei Trofimovich" <slyfox@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" <slyfox@gentoo.org>
Message-ID: <1515356007.c3f4cc048c2158f1ff6e6002c72381bbebe0678e.slyfox@gentoo>
Subject: [gentoo-commits] proj/crossdev:master commit in: /
X-VCS-Repository: proj/crossdev
X-VCS-Files: crossdev
X-VCS-Directories: /
X-VCS-Committer: slyfox
X-VCS-Committer-Name: Sergei Trofimovich
X-VCS-Revision: c3f4cc048c2158f1ff6e6002c72381bbebe0678e
X-VCS-Branch: master
Date: Sun,  7 Jan 2018 20:15:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 30cdbc77-3384-4fee-8163-dc6cb6aa09d9
X-Archives-Hash: d9af594e7c5b735adaab22c38137e114

commit:     c3f4cc048c2158f1ff6e6002c72381bbebe0678e
Author:     Dennis Schridde <devurandom <AT> gmx <DOT> net>
AuthorDate: Wed Jan  3 22:55:43 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Jan  7 20:13:27 2018 +0000
URL:        https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=c3f4cc04

Fix parse_repo_config with regards to repository priority

This is a multi-part message in MIME format.

I just noticed a typo in the commit message.  Please commit this patch
instead.
>From 0d0b4653e44f807802ef1fa9647c7395d6625609 Mon Sep 17 00:00:00 2001
From: Dennis Schridde <devurandom <AT> users.noreply.github.com>
Date: Wed, 3 Jan 2018 23:41:53 +0100
Subject: [PATCH] Fix parse_repo_config with regards to repository priority

Before this patch, the repository config would be inserted into a more or less
 place for the respective priority, resulting in a non-contiguous array, which
 would no longer be fully enumerated by an awk for loop.  Hence the config of
 repositories with the same priority would be omitted for all but the first
 few entries.

Signed-off-by: Dennis Schridde <devurandom <AT> gmx.net>

 crossdev | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crossdev b/crossdev
index 92b7acf..10097a0 100755
--- a/crossdev
+++ b/crossdev
@@ -393,7 +393,7 @@ parse_repo_config() {
 	local flat_config=$(echo "${repo_config}" | gawk '
 		function push(arr, idx, ele) {
 			if (idx in arr)
-				arr[idx][length(arr) + 1] = ele
+				arr[idx][length(arr[idx]) + 1] = ele
 			else
 				arr[idx][0] = ele
 		}