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 3DD2813877A for ; Mon, 4 Aug 2014 23:45:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A889AE0980; Mon, 4 Aug 2014 23:45:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4782CE0980 for ; Mon, 4 Aug 2014 23:45:19 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 655703400E0 for ; Mon, 4 Aug 2014 23:45:13 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 2CF321881F for ; Mon, 4 Aug 2014 23:45:12 +0000 (UTC) From: "Pavlos Ratis" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Pavlos Ratis" Message-ID: <1306523502.134fe0cd18971096ea99665a9e259bfb75960a04.dastergon@gentoo> Subject: [gentoo-commits] proj/security:master commit in: bin/ X-VCS-Repository: proj/security X-VCS-Files: bin/target X-VCS-Directories: bin/ X-VCS-Committer: dastergon X-VCS-Committer-Name: Pavlos Ratis X-VCS-Revision: 134fe0cd18971096ea99665a9e259bfb75960a04 X-VCS-Branch: master Date: Mon, 4 Aug 2014 23:45:12 +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: 2c803e6a-3690-4567-9557-0458bd078110 X-Archives-Hash: 8580745d30c9e74b6af17a3958ed50f3 commit: 134fe0cd18971096ea99665a9e259bfb75960a04 Author: Alex Legler gentoo org> AuthorDate: Fri May 27 19:11:42 2011 +0000 Commit: Pavlos Ratis gentoo org> CommitDate: Fri May 27 19:11:42 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/security.git;a=commit;h=134fe0cd Add warning if target version was not found; misc other fixes. svn path=/; revision=2230 --- bin/target | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bin/target b/bin/target index 701886c..3142c9b 100755 --- a/bin/target +++ b/bin/target @@ -25,7 +25,7 @@ module GenSec def main(argv) $opts = { - :auth_cache => true, + :debug => false, :force => false, :liaisons => false, :username => nil, @@ -64,6 +64,10 @@ module GenSec $opts[:username] = username end + opts.on_tail('--debug', 'Print debug output.') do + $opts[:debug] = true + end + opts.on_tail('-f', '--force', 'Force the operation. Disables asking for confirmation and version checks.') do $opts[:force] = true end @@ -97,16 +101,20 @@ module GenSec e("No package found.") end - i("Using #{metadata[:package]}") unless $opts[:quiet] - #puts metadata.inspect + i("Package: #{$ui.color(metadata[:package], :green)}") unless $opts[:quiet] + if $opts[:debug] + require 'pp' + pp metadata + end best_version = find_best_version(metadata, slot, version) - i("Target version: #{best_version}") unless $opts[:quiet] + i("Target version: #{$ui.color(best_version, :green)}") unless $opts[:quiet] # Cover a custom version string that is not there in the local tree - if metadata[:keywords].include? best_version + if metadata[:versions].include? best_version already_stable = filter_unstable(metadata[:keywords][best_version]) - NOSTABLE_ARCHES else + w($ui.color("Warning: Target version not found. Proceed with care.", :yellow)) already_stable = [] end