summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragriffis <agriffis@gentoo.org>2005-10-27 15:50:36 +0000
committeragriffis <agriffis@gentoo.org>2005-10-27 15:50:36 +0000
commit749c34a0871eb63161ec2ae9f0c221f61053a329 (patch)
tree38756bb29b756d76fb6eaced961098537eb711f8
parent1141383aeede6b34340b265cbbe5dddecbda43a5 (diff)
downloadgentoolkit-749c34a0871eb63161ec2ae9f0c221f61053a329.tar.gz
Fix comment handling. Add ~ as a synonym for ~all (for SpanKY)
svn path=/; revision=251
-rw-r--r--trunk/src/ekeyword/ChangeLog4
-rw-r--r--trunk/src/ekeyword/ekeyword7
2 files changed, 8 insertions, 3 deletions
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 <agriffis@gentoo.org>
+ * Fix handling of comments
+ * Add support for bare ~ as a synonym for ~all
+
23 Mar 2005 Aron Griffis <agriffis@gentoo.org>
* 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/;