diff options
author | Aron Griffis <agriffis@gentoo.org> | 2003-02-12 19:42:11 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2003-02-12 19:42:11 +0000 |
commit | 989f0e6e595c933fa5f3a4cc000d33e4efaf8943 (patch) | |
tree | 37d4237f439c634f5ac8a1b6530662d399dd83b7 /app-admin | |
parent | fixed my fix which didn't fix he problem ;) (diff) | |
download | historical-989f0e6e595c933fa5f3a4cc000d33e4efaf8943.tar.gz historical-989f0e6e595c933fa5f3a4cc000d33e4efaf8943.tar.bz2 historical-989f0e6e595c933fa5f3a4cc000d33e4efaf8943.zip |
updated echangelog and ekeyword
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/gentoolkit/ChangeLog | 7 | ||||
-rw-r--r-- | app-admin/gentoolkit/files/scripts/ChangeLog | 4 | ||||
-rw-r--r-- | app-admin/gentoolkit/files/scripts/echangelog | 59 | ||||
-rw-r--r-- | app-admin/gentoolkit/files/scripts/ekeyword | 4 | ||||
-rw-r--r-- | app-admin/gentoolkit/gentoolkit-0.1.18-r1.ebuild | 69 |
5 files changed, 125 insertions, 18 deletions
diff --git a/app-admin/gentoolkit/ChangeLog b/app-admin/gentoolkit/ChangeLog index 391ed99cbf2d..14efc52dfc9a 100644 --- a/app-admin/gentoolkit/ChangeLog +++ b/app-admin/gentoolkit/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for app-admin/gentoolkit # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.56 2003/02/12 02:21:03 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.57 2003/02/12 19:42:11 agriffis Exp $ + +*gentoolkit-0.1.18-r1 (12 Feb 2003) + + 12 Feb 2003; Aron Griffis <agriffis@gentoo.org> gentoolkit-0.1.18-r1.ebuild files/scripts/echangelog files/scripts/ekeyword : + Bump revision to pick up changes to echangelog and ekeyword 10 Feb 2003; Aron Griffis <agriffis@gentoo.org> gentoolkit-0.1.18.ebuild files/scripts/echangelog files/scripts/ekeyword files/digest-gentoolkit-0.1.18 : Add echangelog and ekeyword. Bump version to 0.1.18. diff --git a/app-admin/gentoolkit/files/scripts/ChangeLog b/app-admin/gentoolkit/files/scripts/ChangeLog index d0b7d9ac5c8b..c7d4488c0c40 100644 --- a/app-admin/gentoolkit/files/scripts/ChangeLog +++ b/app-admin/gentoolkit/files/scripts/ChangeLog @@ -1,3 +1,7 @@ +12 Feb 2003 Aron Griffis <agriffis@gentoo.org> + * update echangelog to insert entry at the correct location in the + ChangeLog + 10 Feb 2003 Aron Griffis <agriffis@gentoo.org> * add echangelog and ekeyword diff --git a/app-admin/gentoolkit/files/scripts/echangelog b/app-admin/gentoolkit/files/scripts/echangelog index 93119b3d12b6..2e292f24646a 100644 --- a/app-admin/gentoolkit/files/scripts/echangelog +++ b/app-admin/gentoolkit/files/scripts/echangelog @@ -8,25 +8,33 @@ # > Add ~alpha to KEYWORDS # > - +use strict; use POSIX qw(strftime); my @files = (); -my ($entry, $user, $date, $text); +my ($entry, $user, $date, $text, $version); +my %versions = (); -die "No ChangeLog in this directory\n" unless -f 'ChangeLog'; +# Read the current ChangeLog +open I, '<ChangeLog' or die "Can't open ChangeLog for input: $!\n"; +{ local $/ = undef; $text = <I>; } +close I; +# Figure out what has changed around here open C, 'cvs diff --brief 2>&1 |' or die "Can't run cvs diff: $!\n"; while (<C>) { /ChangeLog/ and next; if (/^cvs server: (\S+) .*new entry/ || /^Index: (\S+)/) { push @files, $1; + if ($1 =~ /^([^\/]*?)\.ebuild$/) { + $versions{$1} = -1; + } } } close C; - die "No changed files found\n" unless @files; +# Get the entry from the cmdline or stdin if ($ARGV[0]) { $entry = $ARGV[0]; } else { @@ -34,24 +42,45 @@ if ($ARGV[0]) { print "Please type the log entry, finish with ctrl-d\n"; $entry = <>; } - die "Empty entry; aborting\n" unless $entry =~ /\S/; -$entry =~ s/^\s*(.*?)\s*$/$1/; # trim whitespace -$entry =~ s/^/ /gm; # add indentation +# Prepend the user info to the entry $user = $ENV{'ECHANGELOG_USER'} || sprintf("%s <%s\@gentoo.org>", (getpwuid($<))[6,0]); - $date = strftime("%d %b %Y", localtime); +$entry =~ s/^\s*(.*?)\s*\z/$1/; # trim whitespace +$entry = "$date; $user @files :\n$entry"; +$entry =~ s/^/ /gm; # add indentation -open I, '<ChangeLog' or die "Can't open ChangeLog for input: $!\n"; -{ local $/ = undef; $text = <I>; } -close I; +# Find the version that's highest in the file (or determine if we're +# adding a new version). +if (%versions) { + for (keys %versions) { + $versions{$_} = index $text, $_; + } + $version = (sort { $versions{$a} <=> $versions{$b} } keys %versions)[0]; +} + +if (!defined $version) { + # Changing a patch or something, not an ebuild, so put the entry + # at the top of the file. + $text =~ s/^.*?\n(?=\s)/$&\n$entry\n/s + or die "Failed to insert new entry\n"; +} elsif ($versions{$version} > -1) { + # Insert after the *version line + $text =~ s/^\*$version\s.*\n/$&\n$entry\n/m + or die "Failed to insert new entry\n"; +} else { + # Insert at the top with a new version marker + $text =~ s/^.*?\n(?=\s)/$&\n*$version ($date)\n\n$entry\n/s + or die "Failed to insert new entry\n"; +} +# Write the new ChangeLog open O, '>ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n"; -$text =~ s/^.*?\n(?=\s)/$&\n $date; $user @files :\n$entry\n/s; -print O $text; -close O; +print O $text or die "Can't write ChangeLog.new: $!\n"; +close O or die "Can't close ChangeLog.new: $!\n"; -system 'diff ChangeLog ChangeLog.new'; +# Move things around +system 'diff -u ChangeLog ChangeLog.new'; rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename: $!\n"; diff --git a/app-admin/gentoolkit/files/scripts/ekeyword b/app-admin/gentoolkit/files/scripts/ekeyword index aa09c96561ea..5e1287196906 100644 --- a/app-admin/gentoolkit/files/scripts/ekeyword +++ b/app-admin/gentoolkit/files/scripts/ekeyword @@ -16,13 +16,13 @@ my $kw = shift @ARGV; for my $f (@ARGV) { open I, "<$f" or die "Can't read $f: $!\n"; - open O, ">$f.new" or die "Can't write $f.new: $!\n"; + open O, ">$f.new" or die "Can't create $f.new: $!\n"; select O; while (<I>) { /^KEYWORDS/ or print, next; s/~?$arch/$kw/ || s/.*?['"].*?(?=['"])/$& $kw/; - print $_, <I>; + print $_, <I> or die "Can't write $f.new: $!\n"; } close I; diff --git a/app-admin/gentoolkit/gentoolkit-0.1.18-r1.ebuild b/app-admin/gentoolkit/gentoolkit-0.1.18-r1.ebuild new file mode 100644 index 000000000000..13051b37d8a1 --- /dev/null +++ b/app-admin/gentoolkit/gentoolkit-0.1.18-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/gentoolkit-0.1.18-r1.ebuild,v 1.1 2003/02/12 19:42:11 agriffis Exp $ + +DESCRIPTION="Collection of unofficial administration scripts for Gentoo" +SRC_URI="" +HOMEPAGE="http://www.gentoo.org/~karltk/projects/gentoolkit/" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="x86 ppc sparc alpha mips hppa" + +DEPEND=">=dev-lang/python-2.0 + >=dev-util/dialog-0.7 + >=sys-devel/perl-5.6 + >=sys-apps/grep-2.5-r1" + +src_install() { + dodir /usr/share/gentoolkit + + insinto /usr/share/gentoolkit + doins ${FILESDIR}/portage-statistics/histogram.awk + + dobin ${FILESDIR}/gentool/gentool-bump-revision + dobin ${FILESDIR}/gentool/gentool-total-coverage + dobin ${FILESDIR}/gentool/gentool-author-coverage + dobin ${FILESDIR}/gentool/gentool-package-count + docinto gentool + dodoc ${FILESDIR}/gentool/ChangeLog + + dobin ${FILESDIR}/scripts/qpkg + doman ${FILESDIR}/scripts/qpkg.1 + fowners root:wheel /usr/bin/qpkg + fperms 0750 /usr/bin/qpkg + + dobin ${FILESDIR}/scripts/pkg-size +# 2002-08-06: karltk +# This utility currently does more harm than good. I'm not including it +# until it has been fixed properly. See #5777 in particular. +# dobin ${FILESDIR}/scripts/useflag +# doman ${FILESDIR}/scripts/useflag.1 + + dosbin ${FILESDIR}/scripts/pkg-clean + dosbin ${FILESDIR}/scripts/mkebuild + dosbin ${FILESDIR}/scripts/emerge-webrsync +# dosbin ${FILESDIR}/scripts/epm + +# dobin ${FILESDIR}/lintool/lintool +# doman ${FILESDIR}/lintool/lintool.1 +# docinto lintool +# dodoc ${FILESDIR}/lintool/{checklist-for-ebuilds,ChangeLog} + + dobin ${FILESDIR}/scripts/echangelog + dobin ${FILESDIR}/scripts/ekeyword +} + +pkg_postinst() { + ewarn "The 'useflag' utility has been removed, pending an overhaul. It has proven to be too brittle to be used safely." + ewarn "The 'etc-update' utility has been moved to portage." + einfo "" + einfo "emerge-webrsync -v displays the wget status" + einfo "since epm is now it's own package please emerge it yourself sys-apps/epm" + einfo "" + einfo "if you are upgrading from gentoolkit-0.1.17-r7 or earlier and" + einfo "you're using mkebuild, please remove ~/.mkebuild to update your settings" + einfo "" + einfo "dep-clean is no more supported and has been removed" + +} |