Author: mcummings
Date: 2005-05-15 19:47:18 +0200 (Sun, 15 May 2005)
New Revision: 30
Modified:
trunk/bin/g-cpan.pl
trunk/extra-docs/Changes
Log:
Testing colors, fixing an annoying bug on an empty emerge list :)
Modified: trunk/bin/g-cpan.pl
===================================================================
--- trunk/bin/g-cpan.pl 2005-05-15 16:44:07 UTC (rev 29)
+++ trunk/bin/g-cpan.pl 2005-05-15 17:47:18 UTC (rev 30)
@@ -81,7 +81,7 @@
# Output error if more than one switch is activated
if ( $search + $list + $install + $upgrade > 1 ) {
print_err(
-"You can't combine search, list, install or upgrade with each other. Pick up one !\n");
+"You can't combine search, list, install or upgrade with each other. Please choose only one\n");
exit_usage();
}
@@ -615,7 +615,12 @@
print_info ("Calling: emerge --oneshot --digest @ebuild_list") if ($verbose);
# FIXME Sniper
# check return values
- system( "emerge", @flags, "--oneshot", "--digest", @ebuild_list );
+ if (@ebuild_list) {
+ system( "emerge", @flags, "--oneshot", "--digest", @ebuild_list )
+ or die "Emerge failed: $!";
+ } else {
+ print_err ("No ebuilds generated for emerge.");
+ }
}
sub get_globals {
Modified: trunk/extra-docs/Changes
===================================================================
--- trunk/extra-docs/Changes 2005-05-15 16:44:07 UTC (rev 29)
+++ trunk/extra-docs/Changes 2005-05-15 17:47:18 UTC (rev 30)
@@ -1,3 +1,8 @@
+15/05/2005 - mcummings
+
+- Added check to make sure @ebuild_list had contents before trying to run emerge - less chance of emerge just junking out on us.
+- Added "or die" to system call - at least its a start at handling an error return from the call to portage
+
15/05/2005 - cab in wonderland
- Lots of colours everywhere !
--
gentoo-perl@g.o mailing list
|