From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 E08131382C5 for ; Thu, 25 Feb 2021 00:06:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2AB9AE0864; Thu, 25 Feb 2021 00:06:31 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 11EA4E0864 for ; Thu, 25 Feb 2021 00:06:31 +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 297A234092D for ; Thu, 25 Feb 2021 00:06:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D53D54F1 for ; Thu, 25 Feb 2021 00:06:28 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1614211556.6e85d8a770ebc9f00e53a61cdd098caefeb3cbbf.mattst88@gentoo> Subject: [gentoo-commits] proj/gentoolkit:master commit in: bin/ X-VCS-Repository: proj/gentoolkit X-VCS-Files: bin/merge-driver-ekeyword X-VCS-Directories: bin/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 6e85d8a770ebc9f00e53a61cdd098caefeb3cbbf X-VCS-Branch: master Date: Thu, 25 Feb 2021 00:06:28 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 58b514e7-5496-481e-ba3a-1f8b52e2990d X-Archives-Hash: c5bd7009298b81cecd402a5bc8f81507 commit: 6e85d8a770ebc9f00e53a61cdd098caefeb3cbbf Author: Matt Turner gentoo org> AuthorDate: Thu Feb 25 00:04:02 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Thu Feb 25 00:05:56 2021 +0000 URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=6e85d8a7 bin: Handle case of no KEYWORD removals Signed-off-by: Matt Turner gentoo.org> bin/merge-driver-ekeyword | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/merge-driver-ekeyword b/bin/merge-driver-ekeyword index 2df83fc..d24aaf9 100755 --- a/bin/merge-driver-ekeyword +++ b/bin/merge-driver-ekeyword @@ -93,10 +93,11 @@ def apply_keyword_changes(ebuild: str, pathname: str, for removals, additions in changes: args = [] - for rem in removals: - # Drop leading '~' and '-' characters and prepend '^' - i = 1 if rem[0] in ('~', '-') else 0 - args.append('^' + rem[i:]) + if removals: + for rem in removals: + # Drop leading '~' and '-' characters and prepend '^' + i = 1 if rem[0] in ('~', '-') else 0 + args.append('^' + rem[i:]) if additions: args.extend(additions) args.append(ebuild_symlink)