Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-perl
Navigation:
Lists: gentoo-perl: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-perl@g.o
From: antoine.raillon@...
Subject: r30 - in trunk: bin extra-docs
Date: Sun, 15 May 2005 19:47:18 +0200 (CEST)
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

Navigation:
Lists: gentoo-perl: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
about r29
Next by thread:
r31 - trunk/bin
Previous by date:
about r29
Next by date:
r31 - trunk/bin


Updated Jun 17, 2009

Summary: Archive of the gentoo-perl mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.