Skip to content
Browse files

Tell the user to relogin after adding him to the mock group.

  • Loading branch information...
1 parent 06ef8b1 commit a32c42dc8273caeac5c1f9366583495297f665a1 @FooBarWidget FooBarWidget committed Dec 3, 2010
Showing with 14 additions and 2 deletions.
  1. +9 −2 build/rpm.rb
  2. +5 −0 rpm/release/mocksetup-first.sh
View
11 build/rpm.rb
@@ -55,8 +55,15 @@ def fetch(dir)
end
end
- abort "Mock setup failed, see above for details" unless
- noisy_system('./rpm/release/mocksetup-first.sh', *args)
+ result = noisy_system('./rpm/release/mocksetup-first.sh', *args)
+ if !result
+ # exit status 4 means that the user needs to relogin.
+ if $?.exitstatus == 4
+ exit
+ else
+ abort "Mock setup failed, see above for details"
+ end
+ end
nginx_fetch.new.fetch(sources_dir)
end
View
5 rpm/release/mocksetup-first.sh
@@ -76,5 +76,10 @@ if [[ "$run_setup" = "1" || ! $in_mock_group == 1 || ${#yum_pkgs[@]} != 0 ]] ; t
if [[ "$run_setup" == "1" ]] ; then
sudo `dirname $0`/mocksetup.sh $repo $etc
fi
+
+ if [[ ! "$in_mock_group" == "1" ]] ; then
+ echo "You have been added to the mock group. Please relogin for this to take effect, and re-run 'rake package:rpm'."
+ exit 4
+ fi
fi

0 comments on commit a32c42d

Please sign in to comment.
Something went wrong with that request. Please try again.