From: agriffis Date: Thu, 27 Oct 2005 15:50:36 +0000 (-0000) Subject: Fix comment handling. Add ~ as a synonym for ~all (for SpanKY) X-Git-Tag: gentoolkit-0.2.4.3~262 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=749c34a0871eb63161ec2ae9f0c221f61053a329;p=gentoolkit.git Fix comment handling. Add ~ as a synonym for ~all (for SpanKY) svn path=/; revision=251 --- diff --git a/trunk/src/ekeyword/ChangeLog b/trunk/src/ekeyword/ChangeLog index 6be92a5..d0fa818 100644 --- a/trunk/src/ekeyword/ChangeLog +++ b/trunk/src/ekeyword/ChangeLog @@ -1,3 +1,7 @@ +27 Oct 2005 Aron Griffis + * Fix handling of comments + * Add support for bare ~ as a synonym for ~all + 23 Mar 2005 Aron Griffis * Only modify non-masked keywords with "all" diff --git a/trunk/src/ekeyword/ekeyword b/trunk/src/ekeyword/ekeyword index 738540b..e75ce93 100644 --- a/trunk/src/ekeyword/ekeyword +++ b/trunk/src/ekeyword/ekeyword @@ -21,8 +21,9 @@ unless (@ARGV > 0) { die "syntax: ekeyword { arch | ~[arch] | -[arch] } ebuild...\n" } for my $a (@ARGV) { - next if $a =~ /$kw_re/o; # keyword - next if $a =~ /^\S+\.ebuild$/; # ebuild + $a = '~all' if $a eq '~' or $a eq $ENV{'HOME'}; # for vapier + next if $a =~ /$kw_re/o; # keyword + next if $a =~ /^\S+\.ebuild$/; # ebuild die "I don't understand $a\n"; } @@ -42,7 +43,7 @@ for my $f (@ARGV) { /^KEYWORDS/ or print, next; # extract the quoted section from KEYWORDS - (my $quoted = $_) =~ s/^.*["'](.*?)["'].*/$1/s; + (my $quoted = $_) =~ s/^.*?["'](.*?)["'].*/$1/s; # replace -* with -STAR for our convenience below $quoted =~ s/-\*/-STAR/;