diff options
Diffstat (limited to 'trunk/src/ekeyword')
| -rw-r--r-- | trunk/src/ekeyword/AUTHORS | 1 | ||||
| -rw-r--r-- | trunk/src/ekeyword/ChangeLog | 46 | ||||
| -rw-r--r-- | trunk/src/ekeyword/Makefile | 24 | ||||
| -rw-r--r-- | trunk/src/ekeyword/README | 20 | ||||
| -rw-r--r-- | trunk/src/ekeyword/TODO | 0 | ||||
| -rwxr-xr-x | trunk/src/ekeyword/ekeyword | 131 | ||||
| -rw-r--r-- | trunk/src/ekeyword/ekeyword.pod | 74 |
7 files changed, 0 insertions, 296 deletions
diff --git a/trunk/src/ekeyword/AUTHORS b/trunk/src/ekeyword/AUTHORS deleted file mode 100644 index 36d5bfd..0000000 --- a/trunk/src/ekeyword/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Aron Griffis <agriffis@gentoo.org> diff --git a/trunk/src/ekeyword/ChangeLog b/trunk/src/ekeyword/ChangeLog deleted file mode 100644 index 68d99e5..0000000 --- a/trunk/src/ekeyword/ChangeLog +++ /dev/null @@ -1,46 +0,0 @@ -24 Apr 2009 Paul Varner <fuzzyray@gentoo.org> - * Handle multiline KEYWORDS - -07 Jan 2009 Mike Frysinger <vapier@gentoo.org> - * Support intended KEYWORDS - * Convert every instance of KEYWORDS in the file - * Error out on invalid arguments #156827 - * Tighten up diff output to show KEYWORDS changes - -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" - -17 Mar 2005 Aron Griffis <agriffis@gentoo.org> - * Sort keywords alphabetically - -09 Nov 2004 Aron Griffis <agriffis@gentoo.org> - * Fix mismatching of ppc vs. ppc-macos #69683 - -15 Sep 2004 Aron Griffis <agriffis@gentoo.org> - * Update for GLEP 22 keywords - * Change copyright line for Gentoo Foundation - -12 Apr 2004 Aron Griffis <agriffis@gentoo.org> - * Add ability to remove keywords with ^, for example: - ekeyword ^alpha blah.ebuild - * Add support for -*, for example: ekeyword -* would add it; - ekeyword ^* would remove it. - * Add a man-page for ekeyword - -09 Apr 2004 Aron Griffis <agriffis@gentoo.org> - * Add ability to modify all keywords via all, ~all, or -all, for - example: ekeyword -all ~alpha ia64 blah.ebuild - -31 Mar 2004 Aron Griffis <agriffis@gentoo.org> - * Fix bug 28426 with patch from Mr_Bones_ to keep ekeyword from confusing - ppc and ppc64 - -2004-01-12 Aron Griffis <agriffis@gentoo.org> - * Allow multiple keywords - -2004-01-07 Karl Trygve Kalleberg <karltk@gentoo.org> - * Added Makefile diff --git a/trunk/src/ekeyword/Makefile b/trunk/src/ekeyword/Makefile deleted file mode 100644 index c3aed80..0000000 --- a/trunk/src/ekeyword/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2004 Karl Trygve Kalleberg <karltk@gentoo.org> -# Copyright 2004 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# -# $Header$ - -include ../../makedefs.mak - -%.1 : %.pod - pod2man $< > $@ - -.PHONY: all -all: ekeyword.1 - -dist: ekeyword.1 - mkdir -p ../../$(distdir)/src/ekeyword - cp Makefile AUTHORS README TODO ChangeLog ekeyword ekeyword.1 ../../$(distdir)/src/ekeyword/ - -install: all - install -m 0755 ekeyword $(bindir)/ - install -d $(docdir)/ekeyword - install -m 0644 AUTHORS README TODO ChangeLog $(docdir)/ekeyword/ - install -m 0644 ekeyword.1 $(mandir)/ - diff --git a/trunk/src/ekeyword/README b/trunk/src/ekeyword/README deleted file mode 100644 index ec7ff5e..0000000 --- a/trunk/src/ekeyword/README +++ /dev/null @@ -1,20 +0,0 @@ -Package : ekeyword -Version : 0.1.0 -Author : See AUTHORS - -MOTIVATION - -Update the KEYWORDS in an ebuild. - -MECHANICS - -N/A - -IMPROVEMENTS - -- Should rewrite to Python, and use Portage directly to select candidate - ebuilds. -- Should add entry to ChangeLog. - -For improvements, send a mail to agriffis@gentoo.org or make out a bug at -bugs.gentoo.org. diff --git a/trunk/src/ekeyword/TODO b/trunk/src/ekeyword/TODO deleted file mode 100644 index e69de29..0000000 --- a/trunk/src/ekeyword/TODO +++ /dev/null diff --git a/trunk/src/ekeyword/ekeyword b/trunk/src/ekeyword/ekeyword deleted file mode 100755 index 002e44b..0000000 --- a/trunk/src/ekeyword/ekeyword +++ /dev/null @@ -1,131 +0,0 @@ -#!/usr/bin/perl -w -# -# Copyright 2003-2009, Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# Written by Aron Griffis <agriffis@gentoo.org> -# -# ekeyword: Update the KEYWORDS in an ebuild. For example: -# -# $ ekeyword ~alpha oaf-0.6.8-r1.ebuild -# 12c12 -# < KEYWORDS="x86 ppc sparc" -# --- -# > KEYWORDS="x86 ppc sparc ~alpha" - - -my ($kw_re) = '^(?:([-~^]?)(\w[\w-]*)|([-^]\*))$'; -my (@kw); - -# make sure the cmdline consists of keywords and ebuilds -unless (@ARGV > 0) { - die "syntax: ekeyword { arch | ~[arch] | -[arch] } ebuild...\n" -} -for my $a (@ARGV) { - $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"; -} - -my $files = 0; -for my $f (@ARGV) { - if ($f =~ /$kw_re/o) { - push @kw, $f; - next; - } - - print "$f\n"; - - open I, "<$f" or die "Can't read $f: $!\n"; - open O, ">$f.new" or die "Can't create $f.new: $!\n"; - select O; - - while (<I>) { - if (/^\s*KEYWORDS=/) { - - # extract the quoted section from KEYWORDS - while (not /^KEYWORDS=["'].*?["']/) { - chomp; - my $next = <I>; - $_ = join " ", $_, $next; - } - (my $quoted = $_) =~ s/^.*?["'](.*?)["'].*/$1/s; - - # replace -* with -STAR for our convenience below - $quoted =~ s/-\*/-STAR/; - - for my $k (@kw) { - my ($leader, $arch, $star) = ($k =~ /$kw_re/o); - - # handle -* and ^* - if (defined $star) { - $leader = substr $star,0,1; - $arch = 'STAR'; - } - - # remove keywords - if ($leader eq '^') { - if ($arch eq 'all') { - $quoted = ''; - } else { - $quoted =~ s/[-~]?\Q$arch\E\b//; - } - - # add or modify keywords - } else { - if ($arch eq 'all') { - # modify all non-masked keywords in the list - $quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g; - } else { - # modify or add keyword - unless ($quoted =~ s/[-~]?\Q$arch\E(\s|$)/$leader$arch$1/) { - # modification failed, need to add - if ($arch eq 'STAR') { - $quoted = "$leader$arch $quoted"; - } else { - $quoted .= " $leader$arch"; - } - } - } - } - } - - # replace -STAR with -* - $quoted =~ s/-STAR\b/-*/; - - # sort keywords and fix spacing - $quoted = join " ", sort { - (my $sa = $a) =~ s/^\W//; - (my $sb = $b) =~ s/^\W//; - return -1 if $sa eq '*'; - return +1 if $sb eq '*'; - $sa .= "-"; - $sb .= "-"; - $sa =~ s/([a-z0-9]+)-([a-z0-9]*)/$2-$1/g; - $sb =~ s/([a-z0-9]+)-([a-z0-9]*)/$2-$1/g; - $sa cmp $sb; - } split " ", $quoted; - - # re-insert quoted to KEYWORDS - s/(["']).*?["']/$1$quoted$1/; - - print $_ or die "Can't write $f.new: $!\n"; - } else { - print, next; - } - } - - close I; - close O; - select STDOUT; - - system "diff -U 0 $f $f.new | sed -n '/KEYWORDS=/s:^: :p'"; - rename "$f.new", "$f" or die "Can't rename: $!\n"; - $files++; -} - -if ($files == 0) { - die "No ebuilds processed!"; -} - -# vim:ts=4 sw=4 diff --git a/trunk/src/ekeyword/ekeyword.pod b/trunk/src/ekeyword/ekeyword.pod deleted file mode 100644 index 1fac8ef..0000000 --- a/trunk/src/ekeyword/ekeyword.pod +++ /dev/null @@ -1,74 +0,0 @@ -=head1 NAME - -ekeyword - Gentoo: modify package KEYWORDS - -=head1 SYNOPSIS - -ekeyword { arch|~arch|-arch|^arch } ebuild... - -=head1 DESCRIPTION - -This tool provides a simple way to add or update KEYWORDS in a set of -ebuilds. Each command-line argument is processed in order, so that -keywords are added to the current list as they appear, and ebuilds are -processed as they appear. - -Instead of specifying a specific arch, it's possible to use the word -"all". This causes the change to apply to all keywords presently -specified in the ebuild. - -The ^ leader instructs ekeyword to remove the specified arch. - -=head1 OPTIONS - -Presently ekeyword is simple enough that it supplies no options. -Probably I'll add B<--help> and B<--version> in the future, but for -now it's enough to track the gentoolkit version. - -=head1 EXAMPLES - -To mark a single arch stable: - - $ ekeyword alpha metalog-0.7-r1.ebuild - metalog-0.7-r1.ebuild - < KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - --- - > KEYWORDS="~x86 ~ppc ~sparc alpha ~mips ~hppa ~amd64 ~ia64" - -When bumping a package, to mark all arches for testing: - - $ ekeyword ~all metalog-0.7-r2.ebuild - metalog-0.7-r2.ebuild - < KEYWORDS="x86 ppc sparc alpha mips hppa amd64 ia64" - --- - > KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - -To signify that a package is broken for all arches except one: - - $ ekeyword ^all -* ~x86 metalog-0.7-r3.ebuild - metalog-0.7-r3.ebuild - < KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - --- - > KEYWORDS="-* ~x86" - -To do lots of things at once: - - $ ekeyword alpha metalog-0.7-r1.ebuild \ - ~all metalog-0.7-r2.ebuild ^all -* ~x86 metalog-0.7-r3.ebuild - metalog-0.7-r1.ebuild - < KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - --- - > KEYWORDS="~x86 ~ppc ~sparc alpha ~mips ~hppa ~amd64 ~ia64" - metalog-0.7-r2.ebuild - < KEYWORDS="x86 ppc sparc alpha mips hppa amd64 ia64" - --- - > KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - metalog-0.7-r3.ebuild - < KEYWORDS="~x86 ~ppc ~sparc ~alpha ~mips ~hppa ~amd64 ~ia64" - --- - > KEYWORDS="-* ~x86" - -=head1 NOTES - -This tool was written by Aron Griffis <agriffis@gentoo.org>. Bugs -found should be filed against me at http://bugs.gentoo.org/ |
