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 9DB341382C5 for ; Wed, 20 May 2020 03:42:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E257BE08BF; Wed, 20 May 2020 03:42:46 +0000 (UTC) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (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 D920BE08BF for ; Wed, 20 May 2020 03:42:46 +0000 (UTC) Received: by mail-pj1-f43.google.com with SMTP id q9so636972pjm.2 for ; Tue, 19 May 2020 20:42:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GA1HjXchWtA5ptf73HajjdjeyqubpFSc33M85HAJ62c=; b=Zwkn+F9e0C1CrpOu/3uhaKzP3jge7byt3GX3D9xMxTwdbup75u6qStDb6/ECZipYvh TSlGDdZK6KsOHHQkCsIfUu06FlhTlNfB1ukABJyZc9MJm1QQUChHc9++0z9mkS00Fanz o56mECj/Dxnnq7nYJHpZT+wEf9TOydxS1IS6JXKJlRBU0CXykD8PuoH+8U8Gjcdd/0Ok fqDTPXHYJT6hdyKsD+/Si6nkFX46YVscJkYY+/Dygvn1CaVGhuAhN+bzi+h/LJReZ7Ef o4q6Du2Bo3+Y/SCqnDXt70VMh3QPrLjTwK1C9Vg3ujtz9V+oU7mpe1B2DO4l99fTWJod ofKg== X-Gm-Message-State: AOAM533Wog3O+tbGayau+A7g2QyftBeX5fKlKmbQyXhFn1+/WSHzjsP7 8JYABpxKRsZISOPBxhtt+oaTEZkM X-Google-Smtp-Source: ABdhPJwzmOdLDQ/89s4ariHjVSAqCg/FDvy0wONc69XGMuKt4qOq2pYfKR8vwXfmnUjPAX80ESenUg== X-Received: by 2002:a17:90a:e28c:: with SMTP id d12mr3024267pjz.19.1589946165500; Tue, 19 May 2020 20:42:45 -0700 (PDT) Received: from localhost ([134.134.137.77]) by smtp.gmail.com with ESMTPSA id z18sm676892pgi.68.2020.05.19.20.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 20:42:44 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 05/21] catalyst: Switch internal snapshot option parsing to SpecParser Date: Tue, 19 May 2020 20:42:10 -0700 Message-Id: <20200520034226.2870937-5-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200520034226.2870937-1-mattst88@gentoo.org> References: <20200520034226.2870937-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: cd2fd927-ca9e-44bc-86b9-e3b795fe92e6 X-Archives-Hash: 8ace6baf856debbdf155d3e0ed52a9d0 The --snapshot/-s option internally creates a .spec file but uses the ConfigParser (nominally used for parsing catalyst.conf) rather than SpecParser (used for parsing .spec files) and as a result has to use '=' rather than ':' as the key/value delimiter. Signed-off-by: Matt Turner --- catalyst/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/main.py b/catalyst/main.py index b01d7a6a..be06ccd7 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -291,8 +291,8 @@ def _main(parser, opts): mycmdline = list() if opts.snapshot: - mycmdline.append('target=snapshot') - mycmdline.append('snapshot_treeish=' + opts.snapshot) + mycmdline.append('target: snapshot') + mycmdline.append('snapshot_treeish: ' + opts.snapshot) conf_values['DEBUG'] = opts.debug conf_values['VERBOSE'] = opts.debug or opts.verbose @@ -354,7 +354,7 @@ def _main(parser, opts): if mycmdline: try: - cmdline = catalyst.config.ConfigParser() + cmdline = catalyst.config.SpecParser() cmdline.parse_lines(mycmdline) addlargs.update(cmdline.get_values()) except CatalystError: -- 2.26.2