lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1284355299.22185.65.camel@Joe-Laptop>
Date:	Sun, 12 Sep 2010 22:21:39 -0700
From:	Joe Perches <joe@...ches.com>
To:	Valdis.Kletnieks@...edu
Cc:	Florian Mickler <florian@...kler.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Stephen Hemminger (role:commit_signer)" <shemminger@...tta.com>,
	"Wolfram Sang (role:commit_signer)" <w.sang@...gutronix.de>,
	linux-kernel@...r.kernel.org
Subject: [PATCH] get_maintainer.pl: Look for .get_maintainer.conf in lk,
 then $HOME then scripts

On Mon, 2010-09-13 at 00:01 -0400, Valdis.Kletnieks@...edu wrote:
> Any chance of getting that to be ~/.get_maintainer.conf rather than
> ./.get_maintainer.conf? I've just gotten bit like the 3rd or 4th time by "oh but
> you didn't create that file in *this* tree" (I usually have a linus git tree, a linux-next
> tree, and 3-4 -mm trees lying around).

Sure.

Signed-off-by: Joe Perches <joe@...ches.com>
---
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index b228198..ea54561 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -107,10 +107,12 @@ my %VCS_cmds_hg = (
     "blame_commit_pattern" => "^([0-9a-f]+):"
 );
 
-if (-f "${lk_path}.get_maintainer.conf") {
+my $conf = which_conf(".get_maintainer.conf");
+if (-f $conf) {
     my @conf_args;
-    open(my $conffile, '<', "${lk_path}.get_maintainer.conf")
-	or warn "$P: Can't open .get_maintainer.conf: $!\n";
+    open(my $conffile, '<', "$conf")
+	or warn "$P: Can't find a readable .get_maintainer.conf file $!\n";
+
     while (<$conffile>) {
 	my $line = $_;
 
@@ -952,6 +954,18 @@ sub which {
     return "";
 }
 
+sub which_conf {
+    my ($conf) = @_;
+
+    foreach my $path (split(/:/, ".:$ENV{HOME}:.scripts")) {
+	if (-e "$path/$conf") {
+	    return "$path/$conf";
+	}
+    }
+
+    return "";
+}
+
 sub mailmap {
     my (@lines) = @_;
     my %hash;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ