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 A9A291382CD for ; Sat, 25 Jun 2016 15:46:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1573014145; Sat, 25 Jun 2016 15:46:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 83D5D14145 for ; Sat, 25 Jun 2016 15:46:51 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EA7ED340A35 for ; Sat, 25 Jun 2016 15:46:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9E4DC2407 for ; Sat, 25 Jun 2016 15:46:47 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1466866760.8cf9e10774576c75777633e79bd2173c291e95cc.dolsen@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 8cf9e10774576c75777633e79bd2173c291e95cc X-VCS-Branch: master Date: Sat, 25 Jun 2016 15:46:47 +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: 877fdaeb-4911-4913-9921-f87bf91c6a78 X-Archives-Hash: 1cde9dac6b43df41c677f761e6688f97 commit: 8cf9e10774576c75777633e79bd2173c291e95cc Author: Brian Dolbec gentoo org> AuthorDate: Sat Jun 25 14:59:20 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Jun 25 14:59:20 2016 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8cf9e107 stagebase.py: Add support for a single pkg to be listed in the specs stage?/packages The code previously only supported packages as a list, but teh spec parser always makes a single item into a string, only multiple entries were a list. This allows the packages list to be either a single string or a list of strings. catalyst/base/stagebase.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 6695ac4..904103f 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -1473,14 +1473,18 @@ class StageBase(TargetBase, ClearBase, GenBase): log.notice('Resume point detected, skipping build_packages operation...') else: if self.settings["spec_prefix"]+"/packages" in self.settings: + target_pkgs = self.settings["spec_prefix"] + '/packages' if "autoresume" in self.settings["options"] \ and self.resume.is_enabled("build_packages"): log.notice('Resume point detected, skipping build_packages operation...') else: + command = [self.settings['controller_file'], 'build_packages'] + if isinstance(self.settings[target_pkgs], str): + command.append(self.settings[target_pkgs]) + else: + command.extend(self.settings[target_pkgs]) try: - cmd([self.settings['controller_file'], 'build_packages'] + - self.settings[self.settings["spec_prefix"] + '/packages'], - env=self.env) + cmd(command, env=self.env) fileutils.touch(build_packages_resume) self.resume.enable("build_packages") except CatalystError: