public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Christian Ruppert" <idl0r@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoolkit:gentoolkit-dev commit in: /, src/echangelog/
Date: Mon,  9 Apr 2012 01:40:19 +0000 (UTC)	[thread overview]
Message-ID: <1333935010.c384ecf52202737f06e3f7294d4251b2a39bdcf7.idl0r@gentoo> (raw)

commit:     c384ecf52202737f06e3f7294d4251b2a39bdcf7
Author:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
AuthorDate: Mon Apr  9 01:30:10 2012 +0000
Commit:     Christian Ruppert <idl0r <AT> gentoo <DOT> org>
CommitDate: Mon Apr  9 01:30:10 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=c384ecf5

Improve the VCS check by adding a fallback/default PATH in case $PATH is empty

---
 ChangeLog                 |    2 ++
 src/echangelog/echangelog |   14 ++++++--------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 647f060..23418c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2011-03-24: Christian Ruppert <idl0r@gentoo.org>
 	* echangelog: Remove duplicate sort calls.
+		Improve the VCS check by adding a fallback/default PATH in case $PATH is
+		empty
 
 2011-03-23: Christian Ruppert <idl0r@gentoo.org>
 	* echangelog: Fix update_copyright loop to check/update ebuilds again.

diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog
index 098e235..cf0659b 100755
--- a/src/echangelog/echangelog
+++ b/src/echangelog/echangelog
@@ -239,16 +239,14 @@ if($opt_strict) {
 # Figure out what kind of repo we are in.
 # Respect $PATH while looking for the VCS
 if(! defined($opt_force_vcs)) {
-	if (getenv("PATH")) {
-		foreach my $path ( split(":", getenv("PATH")) ) {
-			foreach my $_vcs (sort(keys(%vcs))) {
-				if ( -X "${path}/${_vcs}" ) {
-					$vcs = $_vcs if check_vcs_dir($vcs{$_vcs}{directory});
-					last if $vcs;
-				}
+	foreach my $path ( split(":", (getenv("PATH") || "/bin:/usr/bin:/usr/local/bin")) ) {
+		foreach my $_vcs (sort(keys(%vcs))) {
+			if ( -X "${path}/${_vcs}" ) {
+				$vcs = $_vcs if check_vcs_dir($vcs{$_vcs}{directory});
+				last if $vcs;
 			}
-			last if $vcs;
 		}
+		last if $vcs;
 	}
 }
 else {



             reply	other threads:[~2012-04-09  1:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09  1:40 Christian Ruppert [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-15 18:37 [gentoo-commits] proj/gentoolkit:gentoolkit-dev commit in: /, src/echangelog/ Christian Ruppert
2012-04-09  1:40 Christian Ruppert
2011-03-24 20:09 Christian Ruppert
2011-03-23 16:30 Christian Ruppert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1333935010.c384ecf52202737f06e3f7294d4251b2a39bdcf7.idl0r@gentoo \
    --to=idl0r@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox