From 0af02e57b6fbfd559a48ba0061245e6148d12814 Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Wed, 3 Oct 2012 03:55:38 -0500 Subject: when circular reqs are found, advise the user of the situation and ask whether or not proceed, default no --- sboupgrade | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sboupgrade b/sboupgrade index 544ae92..406ac4a 100755 --- a/sboupgrade +++ b/sboupgrade @@ -133,7 +133,12 @@ sub get_requires ($$) { FIRST: for my $req (@$requires) { my $req_req = get_from_info (LOCATION => get_sbo_location $req, GET => 'REQUIRES'); - return if $sbo ~~ @$req_req; + if ($sbo ~~ @$req_req) { + say "I am seeing circular requirements between $sbo and $req."; + say "Therefore, I am not going to handle requirements for $sbo."; + print 'Do you still wish to proceed? [n] '; + ~ /^[Yy\n]/ ? return : exit 0; + } } return $requires; } -- cgit v1.2.3