aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS (renamed from trunk/AUTHORS)0
-rw-r--r--COPYING (renamed from trunk/COPYING)0
-rw-r--r--ChangeLog805
-rw-r--r--Makefile58
-rw-r--r--NEWS (renamed from trunk/NEWS)0
-rw-r--r--README (renamed from trunk/README)0
-rw-r--r--README.Developer (renamed from trunk/README.Developer)0
-rw-r--r--TODO (renamed from trunk/TODO)0
-rwxr-xr-xrelease.sh (renamed from trunk/release.sh)0
-rw-r--r--src/ebump/AUTHORS5
-rw-r--r--src/ebump/ChangeLog8
-rw-r--r--src/ebump/Makefile20
-rw-r--r--src/ebump/README18
-rw-r--r--src/ebump/TODO0
-rwxr-xr-xsrc/ebump/ebump356
-rw-r--r--src/ebump/ebump.1110
-rw-r--r--src/echangelog/AUTHORS1
-rw-r--r--src/echangelog/ChangeLog84
-rw-r--r--src/echangelog/Makefile26
-rw-r--r--src/echangelog/README11
-rw-r--r--src/echangelog/TODO0
-rwxr-xr-xsrc/echangelog/echangelog711
-rw-r--r--src/echangelog/echangelog.1270
-rw-r--r--src/echangelog/test/TEST.pm26
-rw-r--r--src/echangelog/test/templates/test.patch6
-rw-r--r--src/echangelog/test/templates/vcstest-0.0.1.ebuild16
-rwxr-xr-xsrc/echangelog/test/test.sh178
-rw-r--r--src/ego/AUTHOR1
-rw-r--r--src/ego/AUTHORS1
-rw-r--r--src/ego/ChangeLog2
-rw-r--r--src/ego/Makefile18
-rw-r--r--src/ego/README2
-rw-r--r--src/ego/TODO0
-rw-r--r--src/ego/ego86
-rw-r--r--src/ekeyword/AUTHORS1
-rw-r--r--src/ekeyword/ChangeLog46
-rw-r--r--src/ekeyword/Makefile24
-rw-r--r--src/ekeyword/README20
-rw-r--r--src/ekeyword/TODO0
-rwxr-xr-xsrc/ekeyword/ekeyword131
-rw-r--r--src/ekeyword/ekeyword.pod74
-rwxr-xr-xsrc/ekeyword2/ekeyword296
-rw-r--r--src/eviewcvs/AUTHORS1
-rw-r--r--src/eviewcvs/Makefile22
-rw-r--r--src/eviewcvs/README11
-rwxr-xr-xsrc/eviewcvs/eviewcvs95
-rw-r--r--src/eviewcvs/eviewcvs.pod48
-rw-r--r--trunk/makedefs.mak20
48 files changed, 3388 insertions, 20 deletions
diff --git a/trunk/AUTHORS b/AUTHORS
index fdfccf3..fdfccf3 100644
--- a/trunk/AUTHORS
+++ b/AUTHORS
diff --git a/trunk/COPYING b/COPYING
index 60549be..60549be 100644
--- a/trunk/COPYING
+++ b/COPYING
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..6597880
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,805 @@
+2009-04-30: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Add patch from loki_val to check -l dependencies in
+ .la files (Bug #267898)
+
+2009-04-24: Paul Varner <fuzzyray@gentoo.org>
+ * ekeyword: Fix to handle multiline KEYWORDS (Bug #267250)
+
+2009-01-08: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix package.py to account for PORTDIR being a symbolic link
+ when checking if a package is in an overlay. (Bug #253968)
+
+2008-11-25: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fixes for non-linux Gentoo systems. Add patch from
+ igli to fix find command to comply with POSIX. Change awk calls to
+ gawk.
+
+2008-11-11: Paul Varner <fuzzyray@gentoo.org>
+ * echangelog: Add --strict option (Bug 246242).
+ * echangelog: Fix processing of virtual category (Bug 179530)
+
+2008-09-17: Paul Varner <fuzzyray@gentoo.org>
+ * euse: Fix check_sanity function to use get_all_make_defaults
+ function when checking for the make.defaults files in the profile.
+ (Bug #233651)
+
+2008-09-03: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix depgraph function to print out dependencies that don't
+ resolve to a package (Bug #236492)
+
+2008-08-26: Paul Varner <fuzzyray@gentoo.org>
+ * glsa-check: Fix has_key() deprecation message. (Bug #232797)
+ * revdep-rebuild: Update fix for Bug 232270 to utilize better patch
+ from Ian Abbott.
+
+2008-08-22: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix find_packages and find_installed_packages to print
+ a warning instead of a traceback when an InvalidAtom exception occurs.
+ (Bug #234358)
+ * equery: Fix equery belongs to strip multiple slashes from path
+ names. (Bug #234584)
+
+2008-07-24: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix equery check to convert mtime to an integer so that
+ comparisions always work. Thanks to Alexey Parshin for discovering the
+ problem and providing a patch. (Bug 232803)
+
+2008-07-22: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix gentoolkit.split_package_name to work with
+ newer portage.catpkgsplit that now returns a tuple instead of a
+ list. (Bug 232599)
+
+2008-07-21: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix filtering of masked paths from SEARCH_DIRS
+ variable. (Bug 232270)
+
+2008-07-18: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Remove prefixed '+/-' signs from IUSE for equery uses
+ command. (Bug 232019)
+
+2008-07-09: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix revdep-rebuild to use TMPDIR instead of HOME for
+ temporary files. (Bug 203414)
+ * revdep-rebuild: Fix revdep-rebuild to not evaluate broken objects
+ multiple times. (Bug 220761)
+
+2008-07-09: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix gentoolkit to work without thread support in
+ python. (Bug 223255)
+
+2008-06-16: Marius Mauch <genone@gentoo.org>
+ * euse: Add support for multi-parent profiles, account for missing
+ final newline in make.conf
+
+2008-03-19: Paul Varner <fuzzyray@gentoo.org>
+ * glsa-check: Fix imports so mail functionality in glsa-check works
+ with python versions less than 2.5 (Bug 211706)
+
+2008-03-13: Paul Varner <fuzzyray@gentoo.org>
+ * euse: Add --info-installed option from patch provided by Andreas
+ Waidler. (Bug 212573)
+
+2008-03-13: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix trying to emerge an empty list of packages. (Bug
+ 213294)
+
+2008-02-28: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix traceback when accessing the portage
+ db. (Bug #211716)
+
+2008-02-21: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: "Use /etc/init.d/functions.sh instead of
+ /sbin/functions.sh. (Bug 210940)
+
+2008-02-18: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Apply patch to allow combined short options.
+ (Bug 188343)
+ * revdep-rebuild: Don't duplicate broken file output. (Bug 201319)
+ * revdep-rebuild: unset GREP_OPTIONS to prevent problems with grep.
+ (Bug 189257)
+ * revdep-rebuild: Apply patch to prevent false matches of object names.
+ (Bug 196460)
+ * revdep-rebuild: Apply patch to better handle masked and removed
+ packages. (Bug 205227)
+ * revdep-rebuild: Filter SEARCH_DIRS_MASK paths from SEARCH_DIRS.
+ (Bug 194993)
+ * revdep-rebuild: Apply patch for revdep-rebuild portable find function.
+ (Bug 194234)
+ * equery: Fix equery list to not generate an internal portage error when
+ fed input with too many slashes. (Bug 119806)
+ * equery: Assume the -p flag when equery list -I is used by itself.
+ (Bug 106278)
+
+
+2007-10-09: Marius Mauch <genone@gentoo.org>
+ * glsa-check: Change "affected" target so it's based on "new" instead of
+ "all" (IOW: exclude already applied/injected GLSAs).
+
+2007-10-05: Marius Mauch <genone@gentoo.org>
+ * glsa-check: Use UTF-8 strings to avoid EncodeErrors if a GLSA contains
+ non-ascii characters (bug #162493)
+
+2007-09-19: Paul Varner <fuzzyray@gentoo.org>
+ * epkginfo: Fix handling of KEYWORDS="" in an ebuild. (Bug #193108)
+ * revdep-rebuild: Fix handling of /var/db/pkg when it is a symbolic
+ link. (Bug #179392)
+
+2007-09-18: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Apply patch from Carlo Marcelo Arenas Belon to fix incorrect
+ display of masking status in list command. (Bug #188678)
+ * revdep-rebuild: Correctly handle LD_LIBRARY_MASK when checking for
+ "no version information" errors/ (Bug #182882)
+
+2007-09-12: Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Fix processing of the long arguments to work correctly. (Bug
+ #192345)
+ * revdep-rebuild: Correctly handle the case where an ebuild no longer
+ exists for a package (Bug #188918)
+ * eread: Fix eread to not accept invalid input for file selection.
+ (Bug #189994)
+
+2007-08-08: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix progress bar to only update when there is a
+ change (Bug #186945)
+ * revdep-rebuild: Ensure that we source functions.sh before calling
+ ewarn, etc.
+
+2007-08-06: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix processing of .la files (Bug #187453)
+ * revdep-rebuild: Add -X option back for backwards compatibilty (Bug
+ #187366)
+
+2007-07-30: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix grepping for non-existant package-owners file
+ (Bug #187141)
+
+2007-07-05: Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Added refactored revdep-rebuild from Michael A.
+ Smith (Bug #184042)
+
+2007-05-30: Marius Mauch <genone@gentoo.org>
+ * glsa-check: check SLOT when selecting and displaying upgrades
+ * glsa-check: new --emergelike option to use the best version
+ within the same SLOT instead of the one with the smallest delta.
+ * glsa-check: prefer visible upgrades to masked upgrades
+ * equery: check for and warn about unknown options (bug 119674)
+ * equery,eclean,glsa-check,epkginfo: Only add /usr/lib/portage/pym
+ to python search path when necessary
+
+2007-05-21: Paul Varner <fuzzyray@gentoo.org>
+ * echangelog: Add patch from genstef to fix issues from Bug 176337
+
+2007-05-11: Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Changed permission check to see if you are either root or
+ belong to the portage group (Bug #177385)
+
+2007-05-11: Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Updated eclean to not delete metadata.dtd by default (Bug
+ #176951)
+
+2007-05-10: Marius Mauch <genone@gentoo.org>
+ * euse: Fix incorrect flag status display when a flag appears multiple
+ times in a single location
+
+2007-04-25: Paul Varner <fuzzyray@gentoo.org>
+ * echangelog: Re-added subversion/git support with fixes from genstef.
+ (Bug #136048)
+
+2007-04-24: Paul Varner <fuzzyray@gentoo.org>
+ * etcat: Removed from Makefile (deprecated since 04-25-2005)
+ * qpkg: Removed from Makefile (deprecated since 04-25-2005)
+
+2007-04-23: Paul Varner <fuzzyray@gentoo.org>
+ * genpkgindex, epkginfo: Move to /usr/bin from
+ /usr/lib/gentoolkit/bin (Bug #175759)
+
+2007-04-10: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Change equery uses to command to display the best matching
+ uninstalled package version if an uninstalled package is specified.
+ Changed the meaning of -a to mean display all versions. (Bug #152325)
+
+2007-04-01: Alec Warner <antarus@gentoo.org>
+ * eread: Fix path and fully qualified paths (Bug #172969)
+
+2007-03-31: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix traceback in equery which (Bug #134053)
+
+2007-03-29: Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Change package.get_???_deps() methods to try the portage
+ tree first, since emerge always uses the portage tree for dependencies.
+ (Bug #164678)
+
+2007-03-29: Paul Varner <fuzzyray@gentoo.org>
+ * equery: Convert deprecated strings functions to str methods (Bug
+ #172694)
+
+2007-03-25: Paul Varner <fuzzyray@gentoo.org>
+ * echangelog: Remove subversion/git patch due to many bugs.
+
+2007-03-18 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Change --no-color to --nocolor for consistency
+ within gentoolkit. (Bug #165165)
+
+2007-03-16 Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix typo in package.py (Bug #168347)
+
+2007-03-15 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix equery check to not fail for symlinks prefixed with ./
+ (Bug #170702)
+
+2007-03-14 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Trim trailing slash from query for equery belongs command
+ (Bug #170981)
+
+2007-03-13 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix bug with --package-names option not rebuilding
+ packages (Bug #169761)
+
+2007-03-10 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Add --depth option to equery depgraph to limit the depth of
+ the dependency graph. (Bug #115807)
+
+2007-03-09 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Add support to detect "no version information
+ available" message from ldd (Bug #169973)
+
+2007-03-08 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Improved handling of KeyError in equery depends command
+ (Bug #169929)
+
+2007-03-07 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Change ordering algorithm to use --deep instead of
+ --emptytree on the advice of zmedico
+
+2007-02-26 Marius Mauch <genone@gentoo.org>
+ * glsa-check: Display access information in verbose list mode (bug 168482)
+
+2007-02-19 Paul Varner <fuzzyray@gentoo.org>
+ * echangelog: Updated to support git and subversion (Bug #136048)
+
+2007-01-10 Paul Varner <fuzzyray@gentoo.org>
+ * epkgmove: removed epkgmove command due to popular demand. (Bug
+ 161360)
+ * gensync: Deprecated gensync in favor of app-portage/layman (multiple
+ bugs)
+
+2007-01-02 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix equery depends --indirect command. (Bug #124552)
+
+2006-12-31 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Reworked equery depends command to be more accurate.
+
+2006-12-13 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix handling of /etc/portage/package.mask (Bug
+ #158025) Thanks to Wolfram Schlich for the patch.
+
+2006-12-12 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Add --tree option to equery files command. (Bug #62898)
+ Thanks to scope for the patch.
+
+2006-12-06 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Modify equery size command to work like the equery list
+ command for pkgspec arguments
+
+2006-11-27 Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Fix typographical error in help and man page. (Bug #156243)
+
+2006-10-11 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix fileAsStr to understand device files.
+ (http://forums.gentoo.org/viewtopic-p-3639575.html)
+
+2006-10-07 Paul Varner <fuzzyray@gentoo.org>
+ * euse: Fix quoting bug in get_real_path() (Bug #150335).
+
+2006-09-21 Paul Varner <fuzzyray@gentoo.org>
+ * eread: Add eread script for reading and managing portage ELOG files.
+ Thanks to Donnie Berkholz for writing this.
+
+2006-09-03 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Remove unused environment variables before calling
+ emerge (Bug #142074). Check for permissions to write temporary files
+ (Bug #142308)
+
+2006-08-12 Marius Mauch <genone@gentoo.org>
+ * glsa-check: Add new --mail option to send out vulnerability reports
+ (output of --list plus --dump for each matched glsa as attachment),
+ using elog configuration.
+
+2006-07-31 Paul Varner <fuzzyray@gentoo.org>
+ * euse: Replace calls to readlink with bash function for Gentoo/ALT
+ compatibility. (Bugs #140477, #128960)
+
+2006-07-28 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix revdep-rebuild to correctly handle --ask being
+ passed to emerge. Thanks to Sal Gonzalez <ghostx@optonline.net> for
+ the patch. (Bug #37485)
+
+2006-07-07 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Rename --no-path to --no-ld-path and change
+ functionality to not set LD_LIBRARY_PATH. This fixes bug #96946 as
+ well as bug #137313
+ * revdep-rebuild: Apply patch from truedfx to fix bug #38751
+
+2006-07-05 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Add --no-path option to revdep-rebuild for bug
+ #137313
+
+2006-06-25 Marius Mauch <genone@gentoo.org>
+ * glsa-check: update cve code for bug 128115
+
+2006-06-14 Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix package.py to honor $ROOT. (bug #136811)
+
+2006-05-22 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Use qfile to locate packages if portage-utils is
+ installed (Bug #128374). Be even more paranoid about extra slashes in
+ path names (Bug #128108). Remove unused code. Update configuration
+ section of manpage (Bug #126038).
+
+2006-04-02 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Remove double-slashes from path names (Bug #128108)
+
+2006-04-01 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Add fix so that packages no longer in the tree cause
+ errors (Bug #128174). Fix case where masked packages cause
+ revdep-rebuild to not rebuild any packages (Bug #128085)
+
+2006-03-29 Marius Mauch <genone@gentoo.org>
+ * euse: Add support for special %active argument as placeholder for
+ active use flags
+
+2006-03-26 Aron Griffis <agriffis@gentoo.org>
+ * echangelog: Don't warn about missing ebuilds when updating
+ copyrights #120061
+
+2006-03-25 Aron Griffis <agriffis@gentoo.org>
+ * eviewcvs: Update for sources.gentoo.org, add subversion support
+
+2006-03-21 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix to clear environment before portageq call. (Bug
+ #126038)
+
+2006-03-08 Paul Varner <fuzzyray@gentoo.org>
+ * genpkgindex: Add binary package indexing utility. (Bug 82132)
+
+2006-03-01 Paul Varner <fuzzyray@gentoo.org>
+ * gentoolkit: Fix depends parsing to properly handle conjunction. (bug
+ #123725). Thanks to tgl for the patch.
+ * gentoolkit: Added function to get post-merge dependencies (PDEPEND)
+ (bug #99191)
+ * gentoolkit: Change get_dependency functions to always use the
+ portage tree
+ * equery: Added post-merge dependencies to depends and depgraph
+ actions. (bug #99191)
+ * equery: Removed requirement for package to be installed to use
+ depgraph action.
+
+2006-02-16 Marius Mauch <genone@gentoo.org>
+ * euse: add/remove use flags even if there is no USE= statement in make.conf
+ (bug #95432)
+
+2006-02-16 Marius Mauch <genone@gentoo.org>
+ * glsa-check: Fix bug causing the wrong summary to be displayed
+ for --test --verbose (bug #123084)
+
+2006-02-06 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Reset PORTAGE_NICENESS, so that emerge is not niced
+ twice. Thanks to Lukas Reck for the patch. (Bug 121482)
+
+2006-01-24 Marius Mauch <genone@gentoo.org>
+ * glsa-check: Use vbd information in verbose list mode (patch by solar)
+
+2006-01-18 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Add capability to check libtool .la files for
+ non-existant references.
+
+2006-01-06 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix revdep-rebuild to play nicely with portage-2.1
+ (Bug 118124)
+
+2005-12-28 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix to automatically determine how to call find (Bug 111203)
+
+2005-12-19 Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Add regular expression matching for exclude files (Bug 114365)
+
+2005-12-13 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix USE flag parsing. (Bug 115294)
+
+2005-12-07 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix revdep-rebuild to work with findutils-4.2.27.
+ (bug 111203)
+ * equery: Added note to error message about quoting redirection
+ characters. (Bug 113423)
+ * gentoolkit: Removed python-config call from make file. (Bug 113386)
+
+2005-11-23 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Changed default behavior for equery list to search for
+ partial name matches. Added equery list examples to the equery man
+ page. (Bugs 113032, 113134)
+
+2005-11-15 Marius Mauch <genone@gentoo.org>
+ * glsa-check: Changed several messages to stderr instead of stdout
+ * glsa-check: Added new --cve option as requested by solar (bug 98589)
+ * glsa-check: Added support for a EMERGE_OPTS env variable to modify the emerge call of glsa-check --fix
+ * glsa-check: Added a new target "affected"
+ * glsa-check: Removed the warning message as it is now pretty much tested
+ * glsa-check: Show GLSA title on --test if --verbose is also used
+
+2005-11-11 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Added sanity check to equery files (Bug 75983)
+ * equery: Fix string matching for equery depends (Bug 85653)
+ * gentoolkit: Fix package.size() to report correct size for symbolic
+ links (Bug 90384)
+ * equery: Fix equery depgraph to show all dependencies (Bug 99191)
+ * equery: Fix traceback with invalid regular expression for equery
+ list (Bug 109392)
+
+2005-11-04 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Fix equery belongs to correctly work when passed an argument
+ list of multiple files (Bug 111501)
+
+2005-11-02 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Fix to work with findutils-4.2.25 (Bug 111203)
+
+2005-10-18 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Make equery look at both DEPEND and RDEPEND for dependencies
+ * gentoolkit: Fix _parse_deps to understand || syntax (Bug 101377)
+
+2005-10-14 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Add qpkg --dups functionality to equery list command (bug
+ 109156)
+
+2005-10-13 Paul Varner <fuzzyray@gentoo.org>
+ * equery: equery depgraph shows USE flags (Bug 74554)
+ * equery: equery should properly parse use.local.desc (Bug 74569)
+ * equery: equery list escapes regular expressions (Bug 77113)
+ * equery: equery uses displays flags correctly (Bug 86633)
+ * equery: equery -N option to disable pipe detection (Bug 90046)
+ * equery: equery list properly detects version string (Bug 91286)
+ * equery: equery belongs now requires a filename (Bug 94618)
+ * equery: equery files over a pipe only prints file names (Bug 100148)
+ * revdep-rebuild: Fix typo in man page (Bug 109147)
+
+2005-09-25 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Update to read configuration files from
+ /etc/revdep-rebuild
+
+2005-09-23 Paul Varner <fuzzyray@gentoo.org>
+ * equery: Sort output from equery list (bug 67152)
+ * equery: Update man page (Bugs 73893, 74944)
+ * equery: equery which returns best-visible ebuild (bug 78687)
+ * equery: equery --quiet is actually quiet (bug 78921)
+ * equery: Fixed typo in equery -h (bug 82352)
+ * gentoolkit: gentoolkit now uses a single portage.config object (bug
+ 90680)
+ * equery: equery uses returns unique, sorted list (bug 91623)
+ * equery: equery always honors nocolor flag and settings (bug 98634)
+
+2005-09-08 Paul Varner <fuzzyray@gentoo.org>
+ * eclean: Inital commit of eclean 0.4.1 from Thomas de Grenier de
+ Latour (tgl) <degrenier@easyconnect.fr> (bug 33877)
+
+2005-06-28 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Revert fix for bug 93574 as it can cause packages to
+ be missed. (bug 97171)
+
+2005-06-07 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Delete temporary files if the environment does not
+ match the previous environment (bug 95274)
+
+2005-06-05 Paul Varner <fuzzyray@gentoo.org>
+ * revdep-rebuild: Imported revdep-rebuild release from bug 62644
+ * revdep-rebuild: Major changes to the functionality when using
+ --package-names/-X The script should now update slotted packages
+ correctly. (bug 22161)
+ * revdep-rebuild: Customizable searching controlled through environment
+ variables. This removes the need for end users to directly modify the
+ script. (bugs 32276, 38011, 59803)
+ * revdep-rebuild: The directories to search are no longer hard coded
+ into the script. revdep-rebuild now determines the directories to
+ search based upon /etc/profile.env and /etc/ld.so.conf. (bugs 32276,
+ 38011, 89781)
+ * revdep-rebuild: --ignore option to ignore temporary files left from
+ previous runs. Automatically ignore temporary files older than 24 hours.
+ (bug 34052)
+ * revdep-rebuild: Always return an exit status based upon success or
+ failure. (bug 38472)
+ * revdep-rebuild: Fixed to only emerge packages with direct missing
+ dependencies. (bug 38487)
+ * revdep-rebuild: New man page. (bug 40042)
+ * revdep-rebuild: emerge is no longer called with --nodeps. This allows
+ for needed dependencies to be pulled in. (bug 62893)
+ * revdep-rebuild: Cleaned up grammatical errors (bug 85278)
+ * revdep-rebuild: Added support for revdep-rebuild --soname
+ /path/to/library.so (bug 91503)
+ * revdep-rebuild: Removed symbolically linked directories from search
+ (bug 93574)
+ * revdep-rebuild: --nocolor option to turn off colored output, the
+ script also obeys the NOCOLOR setting from /etc/make.conf.
+ * revdep-rebuild: Removed dependency on qpkg
+ * revdep-rebuild: Script uses PORTAGE_NICENESS from /etc/make.conf
+ * revdep-rebuild: Undocumented --keep-temp option. This is primarily
+ for debugging/testing. This option prevents temporary files from being
+ deleted.
+ * revdep-rebuild: Changed --soname --soname-regexp options to --library
+ and treat all arguments as basic regular expressions. --soname and
+ --soname-regexp can still be used as options for backwards
+ compatability.
+ * revdep-rebuild: Removed requirement to keep revdep-rebuild and emerge
+ options distinct. Options that are unrecognized by revdep-rebuild are
+ passed directly to emerge.
+
+2005-04-30 Marius Mauch <genone@gentoo.org>
+ * glsa-check: add V to short option list so it actually works
+ * equery: added new option --name-only to belongs command to make it
+ "emerge-compatible"
+
+2005-04-26 Marius Mauch <genone@gentoo.org>
+ * gentoolkit: fix broken Makefile
+ * gentoolkit: add some sticky tape to get the stupid thing working again
+ * equery: fix a few minor problems
+
+2005-04-25 Marius Mauch <genone@gentoo.org>
+ * qpkg: moving to /usr/share/doc/gentoolkit-*/deprecated
+ * etcat: moving to /usr/share/doc/gentoolkit-*/deprecated
+ * revdep-rebuild: replacing qpkg call with equivalent grep/sed call
+
+2005-04-07 Marius Mauch <genone@gentoo.org>
+ * euse: fixed bugs 74344, 75525 and 84521
+ * euse: add better support for cascaded profiles
+ * glsa-check: use --oneshot (bug 79819)
+ * glsa.py: fix stupid revision comparison bug (bug 75233)
+
+2005-03-12 Aron Griffis <agriffis@gentoo.org>
+ * Added eviewcvs to -dev, utility for generating viewcvs URLs
+
+2005-03-01 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Dropped epkgmove from the -dev
+ * Released gentoolkit-dev-0.2.3
+
+2005-03-01 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Released gentookit-dev-0.2.2
+
+2004-12-09 Marius Mauch <genone@gentoo.org>
+ * glsa.py: Another stupid bug, this time revisionMatch() broke as
+ ~foobar-rN isn't valid anymore
+
+2004-12-08 Marius Mauch <genone@gentoo.org>
+ * equery: implemented the --category option
+ * glsa-check: fixed the bug where it wanted to unnecessary merge masked
+ packages
+ * glsa-check: added a check to verify that all non-option arguments are
+ valid GLSAs
+ * glsa.py: changed the outfile parameter in Glsa.dump() to outstream so
+ we don't have to open/close a file which breaks pipes
+ * glsa.py: checks now for python versions below 2.3 and throws an
+ exception
+
+2004-11-29 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * branched v0-3-0: major rework in equery is in progess. the main
+ branch is reserved for minor and incremental fixups.
+
+2004-10-20 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * release.sh: New script that automates the relase of a new gentoolkit
+ relase. Only works for gentoolkit-dev at the moment.
+ * src/echangelog/Makefile: Fixed spurious '}'
+ * Released gentoolkit-dev-0.2.1
+
+2004-10-31 Marius Mauch <genone@gentoo.org>
+ * qpkg: security fix for bug #68846
+
+2004-10-20 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * etcat: fixed get_use_vars to get_use_flags, fixes #67349.
+
+2004-10-18 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: collapsed ChangeLog into base ChangeLog
+ * gentoolkit: reverted indenting back to tabs, due to loud protests
+ from Marius;)
+ * equery: collapsed ChangeLog into base ChangeLog
+ * equery: reverted indenting back to tabs, due to loud protests from
+ Marius;)
+ * equery: minor syntactical cleanups.
+ * equery: minor documentation improvements
+ * equery: added errors module that will hold various types of internal
+ errors raised.
+ * equery: added try block around on md5sum check, which fails on various
+ conditions like insufficient permission or stale temporary checksum
+ files.
+
+2004-10-17 Marius Mauch <genone@gentoo.org>
+ * equery: fix for bug #67473 (checking md5sums of prelinked binaries)
+ * equery: fix for bug #67275 (--nocolor didn't work as configure was
+ called before parsing the arguments
+ * equery: changed defaults for `equery depends` as making a depgraph for
+ the full portage tree isn't a good idea and find_all_packages() uses way
+ to much memory currently
+ * euse: replaced the old perl version with a newly written bash version.
+
+2004-10-12 Marius Mauch <genone@gentoo.org>
+ * equery: fix for bug #67210
+
+2004-10-10 Marius Mauch <genone@gentoo.org>
+ * Removed old-scripts directory from gentoolkit
+ * euse: added a errormessage that it doesn't support cascading profiles
+ * equery: small bugfixes
+ * equery: performance speedup for `equery belongs` by using portage
+ directly
+ * equery: added MD5 verification to `equery check`
+ * equery: renamed 'hasuses' to 'hasuse'
+ * equery: added filter patch for `equery files` from bug 43422, thanks
+ to degrenier@easyconnect.fr
+ * Released gentoolkit-0.2.0_pre10
+
+2004-10-10 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added unit tests for all supported commands
+ * equery: Fixed printing order and recognition of overlay, #53432.
+
+2004-10-11 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: Split gentoolkit.py into helpers.py and package.py
+
+2004-10-10 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: Fixed Makefiles to work with posix-compatible shells
+ * gentoolkit: Fixed is_overlay() to report properly, #53432.
+
+2004-10-06 Marius Mauch <genone@gentoo.org>
+ * glsa.py: Convert Unicode strings to ascii before passing them to
+ portage
+ * glsa.py: Some formatting fixes for dump()
+ * glsa.py: changed the matching routines so the reports are hopefully
+ more accurate
+ * glsa-check: added color support
+ * glsa-check: added a --verbose option to show the warnings about
+ invalid GLSAs
+
+2004-09-30 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added unit tests for --help
+ * equery: Added unit tests for 'files'
+
+2004-09-27 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: Added find_installed_packages
+ * equery: Added short commands
+ * equery: Fixed copyright dates
+ * equery: Fixed belongs to search only installed packages
+ * equery: Fixed reporting bug in uses command
+ * equery: Fixed reference to cppv
+ * equery: Added import of die
+ * equery: Added searching header to uses
+ * equery: Fixed hasuses to report properly
+ * Released gentoolkit-0.2.0_pre9
+ * Released gentoolkit-dev-0.2.0_pre4
+
+2004-09-08 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added man page rewrites by Katerina Barone-Adesi
+ <katerinab@gmail.com>, fixes #63045
+ * equery: Fixed spacing issues with files, fixes #63036.
+ * equery: Added depends command by Olivier Crete <tester@gentoo.org>,
+ fixes #40830.
+ * equery: Reworked output yet again.
+ * equery: Belongs handles multiple files on the command line, partially
+ fixes #62361.
+ * gentoolkit: Reworked printing functions
+
+2004-08-29 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: Added printing functions
+ * equery: Added check for bad regexp in belongs, fixes #58494
+ * equery: Added proper error reporting to stderr, fixes #57580
+
+2004-08-22 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * gentoolkit: Fixed Package.get_env_var to use the correct tree db.
+ * gentoolkit: Renamed Package.get_use_vars to Package.get_use_flags
+ * equery: Searches now include masked packages, when installed.
+ * equery: Fixed output to be piping-friendly
+ * equery: Added -N option to force non-piping output
+ * equery: Added hasuses command
+
+2004-08-01 Marius Mauch <genone@gentoo.org>
+ * Fixed grep expression for `qpkg -f`
+
+2004-05-04 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added a -f/--full-regex option to belongs and some logic so
+ users can do belongs ant, belongs /usr/bin/ant and belongs -f ".*ant.*"
+ while getting sensible results. Fixes #37637.
+
+2004-04-14 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Released gentoolkit-dev-0.2.0_pre3
+
+2004-03-31 Marius Mauch <genone@gentoo.org>
+ * glsa-check: updates, fixing #45528 and #45522, adding support for rXX
+ operators and passing filenames as arguments to Glsa()
+
+2004-03-13 Marius Mauch <genone@gentoo.org>
+ * Added glsa-check and glsa.py, please note:
+ - they are only temporary for testing, so no manpage/ChangeLog
+ - their CVS home is in gentoo-projects
+ * fixed bugs #42160, #40935, #43389
+ * equery: fixing descriptions for local USE flags
+ * equery: more checking on exceptions
+
+2004-02-08 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added ebump
+ * Added gensync
+ * Added epkgmove, closes #36663.
+
+2004-02-06 Marius Mauch <genone@gentoo.org>
+ * fixed bugs #40159, #39798, #39652, #39596, #39293
+ * changed etcat and equery behavior for ambigous package names,
+ they now return values for all matching packages rather
+ than erroring out
+ * added "will be phased out" messages to etcat and qpkg
+
+2004-01-23 Marius Mauch <genone@gentoo.org>
+ * lots of bugfixes
+ * equery: now catches Exceptions thrown by portage
+ * equery: minor bugfixes
+
+2004-01-14 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added src/ego to gentoolkit-dev
+
+2004-01-12 Marius Mauch <genone@gentoo.org>
+ * equery: added mask, keyword and slot information to list command
+ * equery: fixed traceback in equery
+ * equery: added more information on "equery list"
+
+2004-01-10 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added src/ego
+
+2004-01-07 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added Makefile
+ * Added new build system
+ * Added src/old-scripts, the scripts from app-portage/gentoolkit
+ * Renamed gentool to equery
+ * Released 0.2.0_pre1
+
+2003-12-31 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added which command
+ * equery: Added check command (not finished)
+
+2003-12-12 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added size command
+ * equery: Added depgraph command
+
+2003-12-11 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added list command
+ * equery: Added uses command
+
+2003-12-08 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Removed emerge-rsync, emerge-webrsync
+ * Added moo
+ * Added skeleton man pages to all packages
+ * Added Makefile
+
+2003-10-05 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * equery: Added files command
+ * equery: Added belongs command
+
+2003-10-04 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Rewrote dep-clean to python
+
+2003-06-31 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Rewrote more of etcat; many of the functions now employ
+ gentoolkit.
+ * Replaced qpkg with stubs of a reimplementation in python.
+
+2003-06-27 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added patch to echangelog to consider PORTDIR, fixes #23881.
+
+2003-06-26 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added echangelog, by agenkin
+ * Added ekeyword, by agenkin
+ * Added gentoolkit, the common python library for all Gentoolkit tools.
+ * Revived pkg-size as a testbed for the gentoolkit library
+ * Fixed some minor issues in qpkg
+ * Added revdep-rebuild-1
+ * Added revdep-rebuild-2
+ * Restructuring etcat
+ * Fixed some minor issues in dep-clean
+
+2002-11-21 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Renamed pkg-size to gentool-package-size
+ * Renamed pst-package-count to gentool-package-count
+ * Retired rest of pst-* stuff
+
+2002-08-06 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Created separate CVS module for Gentoolkit
+ * Restructured directory hierarchy
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..af50ef7
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,58 @@
+# Copyright 2003-2004 Karl Trygve Kalleberg <karltk@gentoo.org>
+# Copyright 2003-2004 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+#
+# $Header$
+
+include makedefs.mak
+
+
+all:
+ echo "YARMOUTH (vb.) To shout at foreigners in the belief that the louder you speak, the better they'll understand you."
+ echo $(PYVERSION)
+ echo $(VERSION)
+ echo $(docdir)
+ echo $(bindir)
+ echo $(sbindir)
+ echo $(mandir)
+
+test:
+ make -C src/echangelog test
+
+clean:
+ rm -rf release/*
+
+dist:
+ echo "Error: Must use either dist-gentoolkit or dist-gentoolkit-dev"
+ exit 1
+
+dist-gentoolkit-dev:
+ mkdir -p release/gentoolkit-dev-$(VERSION)$(RELEASE_TAG)
+ for x in ekeyword echangelog ego ebump gensync eviewcvs ; do \
+ ( cd src/$$x ; $(MAKE) distdir=release/gentoolkit-dev-$(VERSION)$(RELEASE_TAG) dist ) \
+ done
+ cp Makefile AUTHORS README README.Developer TODO COPYING NEWS ChangeLog release/gentoolkit-dev-$(VERSION)$(RELEASE_TAG)/
+ cat makedefs.mak | \
+ sed "s/^VERSION=.*/VERSION=$(VERSION)/" | \
+ sed "s/^RELEASE_TAG=.*/RELEASE_TAG=$(RELEASE_TAG)/" | \
+ sed "s:^docdir=.*:docdir=\$$(DESTDIR)/usr/share/doc/gentoolkit-dev-\$$(VERSION)\$$(RELEASE_TAG):" \
+ > release/gentoolkit-dev-$(VERSION)$(RELEASE_TAG)/makedefs.mak
+ ( cd release ; tar zcf gentoolkit-dev-$(VERSION)$(RELEASE_TAG).tar.gz gentoolkit-dev-$(VERSION)$(RELEASE_TAG)/ )
+
+install:
+ echo "Error: Must use either install-gentoolkit or install-gentoolkit-dev"
+ exit 1
+
+# FIXME: If run from the CVS tree, the documentation will be installed in
+# $(DESTDIR)/usr/share/doc/gentoolkit-$(VERSION), not gentoolkit-dev-$(VERSION)
+install-gentoolkit-dev:
+
+ install -d $(docdir)
+ install -d $(bindir)
+ install -d $(mandir)
+
+ install -m 0644 AUTHORS ChangeLog COPYING NEWS README README.Developer TODO $(docdir)/
+
+ for x in ekeyword echangelog ego ebump eviewcvs ; do \
+ ( cd src/$$x ; $(MAKE) DESTDIR=$(DESTDIR) install ) \
+ done
diff --git a/trunk/NEWS b/NEWS
index e69de29..e69de29 100644
--- a/trunk/NEWS
+++ b/NEWS
diff --git a/trunk/README b/README
index 5c785d3..5c785d3 100644
--- a/trunk/README
+++ b/README
diff --git a/trunk/README.Developer b/README.Developer
index 6c48c84..6c48c84 100644
--- a/trunk/README.Developer
+++ b/README.Developer
diff --git a/trunk/TODO b/TODO
index d39ea85..d39ea85 100644
--- a/trunk/TODO
+++ b/TODO
diff --git a/trunk/release.sh b/release.sh
index 22313b4..22313b4 100755
--- a/trunk/release.sh
+++ b/release.sh
diff --git a/src/ebump/AUTHORS b/src/ebump/AUTHORS
new file mode 100644
index 0000000..2432e06
--- /dev/null
+++ b/src/ebump/AUTHORS
@@ -0,0 +1,5 @@
+Maintainer:
+Karl Trygve Kalleberg <karltk@gentoo.org>
+
+Original author:
+Karl Trygve Kalleberg <karltk@gentoo.org>
diff --git a/src/ebump/ChangeLog b/src/ebump/ChangeLog
new file mode 100644
index 0000000..4434b94
--- /dev/null
+++ b/src/ebump/ChangeLog
@@ -0,0 +1,8 @@
+2004-06-21 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Fixed handling of deletion.
+
+2004-03-11 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Fixed incorrect cut'ing of wc -l output when updating ChangeLog
+
+2004-02-08 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Initial import
diff --git a/src/ebump/Makefile b/src/ebump/Makefile
new file mode 100644
index 0000000..aa1d347
--- /dev/null
+++ b/src/ebump/Makefile
@@ -0,0 +1,20 @@
+# 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
+
+.PHONY: all
+all:
+
+dist:
+ mkdir -p ../../$(distdir)/src/ebump/
+ cp Makefile AUTHORS README TODO ChangeLog ebump ebump.1 ../../$(distdir)/src/ebump/
+
+install: all
+ install -m 0755 ebump $(bindir)/
+ install -d $(docdir)/ebump
+ install -m 0644 AUTHORS README TODO ChangeLog $(docdir)/ebump/
+ install -m 0644 ebump.1 $(mandir)/
diff --git a/src/ebump/README b/src/ebump/README
new file mode 100644
index 0000000..c81835c
--- /dev/null
+++ b/src/ebump/README
@@ -0,0 +1,18 @@
+
+Package : ebump
+Version : 0.1.0
+Author : See AUTHORS
+
+MOTIVATION
+
+The ebump utility is a Gentoo-specific tool for bumping the revision of
+a given ebuild and auxiliary files in the Portage tree. It is only
+useful for Gentoo developers with CVS commit access.
+
+MECHANICS
+
+N/A
+
+IMPROVEMENTS
+
+N/A
diff --git a/src/ebump/TODO b/src/ebump/TODO
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/ebump/TODO
diff --git a/src/ebump/ebump b/src/ebump/ebump
new file mode 100755
index 0000000..2623a28
--- /dev/null
+++ b/src/ebump/ebump
@@ -0,0 +1,356 @@
+#! /bin/sh
+#
+# Copyright (c) 2004 Karl Trygve Kalleberg <karltk@gentoo.org>
+# Copyright (c) Gentoo Technologies, Inc.
+# Licensed under the GNU General Public License, version 2
+#
+# Maintainer: Karl Trygve Kalleberg <karltk@gentoo.org>
+
+__version__="0.1.0"
+__author__="Karl Trygve Kalleberg"
+__email__="<karltk@gentoo.org>"
+__description__="Ebuild version bumping tool"
+
+
+
+die() {
+ echo $1 > /dev/stderr
+ exit -1
+}
+
+einfo() {
+ if [ ${opt_verbosity} -gt 2 ] ; then
+ echo $*
+ fi
+}
+
+print_version() {
+ echo "${__description__}, v${__version__}"
+ echo "Copyright (c) 2004 ${__author__} ${__email__}"
+ echo "Copyright (c) 2004 Gentoo Technologies, Inc."
+ echo "Licensed under the GNU General Public License, version 2"
+}
+
+print_usage() {
+ echo "Usage: ebump <options> foo<.ebuild>"
+ echo "Ebuild version bumping tool, v${__version__}"
+ echo " -V|--version show version info"
+ echo " -v|--verbose increase verbosity"
+ echo " -q|--quiet turn off output"
+ echo " -C|--no-cvs do not add to CVS"
+ echo " -m|--message append message to ChangeLog"
+ echo " -d|--delete-old delete previous revision from CVS (DANGEROUS!)"
+}
+
+#
+# Load options from /etc/gentoolkit/ebump.conf and ${HOME}/.gentoo/ebump.conf
+# Home directory file takes precedence.
+#
+load_options() {
+
+ # FIXME: Sourcing config files like this is really a bad idea; users may
+ # easily override any function in this program inside his config files.
+
+ if [ -f /etc/gentoolkit/ebump.conf ] ; then
+ . /etc/gentoolkit/ebump.conf
+ fi
+ if [ -f ${HOME}/.gentoo/gentool-env ] ; then
+ . ${HOME}/.gentoo/gentool-env
+ fi
+ if [ -f ${HOME}/.gentoo/ebump.conf ] ; then
+ . ${HOME}/.gentoo/ebump.conf
+ fi
+}
+
+#
+# Find closes ebuild to ${1}, if any
+#
+find_ebuild() {
+ f=${1}
+
+ if [ -f ${1} ] ; then
+ echo ${1}
+ fi
+
+ if [ -f ${1}.ebuild ] ; then
+ echo ${1}
+ fi
+}
+
+#
+# splitname (version|name|revision) package-name-version-revision
+#
+splitname() {
+ case $1 in
+ version)
+ echo ${2} | sed -r "s/.*-([0-9].*)/\1/"
+ ;;
+ name)
+ name=$(echo ${2} | sed -r "s/(.*)-[0-9].*/\1/")
+ if [ ${name} == ${2} ] ; then
+ if [ $(echo ${2} | grep "^[0-9].*") ] ; then
+ # The filename starts with a version number, thus it has no
+ # name
+ name=""
+ else
+ # The filename doesn't have a recognizeable version number;
+ # everything is a name
+ name=${2}
+ fi
+ fi
+ echo ${name}
+ ;;
+ revision)
+ rev=$(echo ${2} | sed -r "s/.*-r([0-9][0-9]*)/\1/")
+ if [ ${rev} == ${2} ] ; then
+ rev=0
+ fi
+ echo ${rev}
+ ;;
+ vernorev)
+ ver=$(echo ${2} | sed -r "s/.*-([0-9].*)-r[0-9]+/\1/")
+ if [ ${ver} == ${2} ] ; then
+ ver=$(echo ${2} | sed -r "s/.*-([0-9].*)/\1/")
+ fi
+ echo ${ver}
+ ;;
+ *)
+ echo
+ esac
+}
+
+process_ebuild() {
+ ebuild_arg=${1}
+
+ # Files to add to CVS
+ addfiles=""
+ # Files to remove from CVS
+ delfiles=""
+
+ if [ -z ${ebuild_arg} ] ; then
+ print_usage
+ exit
+ fi
+
+ #
+ # Try to find a matching ebuild
+ #
+
+ ebuild_name=$(find_ebuild ${ebuild_arg})
+ if [ -z ${ebuild_name} ] ; then
+ die "Could not find ${ebuild_arg}"
+ fi
+ einfo "Processing ebuild ${ebuild_name}"
+
+ #
+ # Bump revision suffix (or add one)
+ #
+
+ PF=$(basename ${ebuild_name} .ebuild)
+ PN=$(splitname name ${PF})
+ PV=$(splitname version ${PF})
+ rev=$(splitname revision ${PF})
+ PV_norev=$(splitname vernorev ${PF})
+ newPF=${PN}-${PV_norev}-r$[rev+1]
+
+# echo $PF / $PN / $PV / $rev / $PV_norev / $newPF
+
+ einfo "Bumped ${PF}.ebuild to ${newPF}.ebuild"
+
+ cp ${PF}.ebuild ${newPF}.ebuild
+
+ addfiles="${addfiles} ${newPF}.ebuild"
+ delfiles="${delfiles} ${PF}.ebuild"
+
+ #
+ # (Optional) Bump relevant files in files/
+ #
+
+ if [ "${opt_bump_auxfiles}" == "y" ] ; then
+
+ # Gather list of auxiliary files in files/ that has a versioned
+ # filename, where the version matches our current version.
+
+ bumplist=""
+ for x in $(echo files/*) ; do
+ if [ ! -z $(echo $x | grep "${PV}$") ] ; then
+ bumplist="${bumplist} ${x}"
+ fi
+ done
+
+ # Bump version of all matches
+
+ for x in ${bumplist} ; do
+
+ bn=$(basename ${x})
+ dn=$(dirname ${x})
+
+ PN=$(splitname name ${bn})
+ PV=$(splitname version ${bn})
+ rev=$(splitname revision ${bn})
+ PV_norev=$(splitname vernorev ${bn})
+
+# echo $PN / ${PV_norev} / ${rev}
+
+ # Special case for when we have no name part; filename
+ # is just a version number
+ if [ -z "${PN}" ] ; then
+ newbn=${PV_norev}-r$[rev+1]
+ else
+ newbn=${PN}-${PV_norev}-r$[rev+1]
+ fi
+
+ if [ -d ${dn}/${bn} ] ; then
+ if [ -e ${dn}/${newbn} ] ; then
+ echo "Directory ${dn}/${newbn} exists, not copying" > /dev/stderr
+ else
+ cp -a ${dn}/${bn} ${dn}/${newbn}
+ find ${dn}/${newbn} -name CVS | xargs rm -rf
+ fi
+ else
+ cp ${dn}/${bn} ${dn}/${newbn}
+ fi
+
+ addfiles="${addfiles} ${dn}/${newbn}"
+ delfiles="${delfiles} ${dn}/${bn}"
+
+ einfo "Bumped ${dn}/${bn} to ${dn}/${newbn}"
+ done
+ fi
+
+# echo "addfiles ${addfiles}"
+# echo "delfiles ${delfiles}"
+
+ filelist="${addfiles}"
+ #
+ # (Optional) Add ChangeLog entry
+ #
+
+ if [ "${opt_add_changelog}" == "y" ] &&
+ [ -f ChangeLog ] ; then
+
+ # Add ChangeLog entry
+
+ curdate=$(LC_TIME="us" date +"%02d %b %Y")
+ cp ChangeLog ChangeLog.old
+ (
+ # Use header (four first lines) of the old ChangeLog
+ head -n 4 ChangeLog.old
+
+ # Write new entry
+
+ echo "*${newPF} (${curdate})"
+ echo
+ echo " ${curdate}; ${AUTHORNAME} <${AUTHOREMAIL}> ${filelist}"
+
+ # If we don't have a commit message, add comment
+ if [ -z "${opt_commitmessage}" ] ; then
+ echo " # INSERT ENTRY HERE"
+ if [ "${opt_delete_old}" == "y" ] && [ ! -z "${delfiles}" ] ; then
+ echo " Removed ${delfiles}."
+ fi
+ echo
+ else
+ echo " ${opt_commitmessage}"
+ echo
+ fi
+
+ # Write tail of old ChangeLog
+ nl=$(wc -l ChangeLog.old | sed -r "s/^([0-9]+).*/\1/")
+ tail -n $[nl - 4] ChangeLog.old
+ ) > ChangeLog
+ rm ChangeLog.old
+
+ einfo "Added ChangeLog entry"
+ fi
+
+ #
+ # (Optional) Add CVS entry for all new files
+ #
+
+ if [ "${opt_add_cvs}" == "y" ] ; then
+
+ # Add all new files to CVS
+ for x in ${addfiles} ; do
+ if [ -d ${x} ] ; then
+ find ${x} | xargs echo cvs add
+ else
+ cvs add ${x}
+ fi
+ done
+ einfo "Added ${addfiles} to CVS"
+ fi
+
+
+ #
+ # (Optional) Delete previous entry
+ #
+
+ if [ "${opt_delete_old}" == "y" ] ; then
+
+ for x in ${delfiles} ; do
+ cvs remove -f ${x}
+ done
+ einfo "Removed ${delfiles} from CVS"
+ fi
+
+}
+
+original_params=${#}
+
+#
+# Global options
+#
+opt_verbosity=1
+opt_warn_on_delete=y
+opt_add_changelog=y
+opt_add_cvs=y
+opt_bump_auxfiles=y
+opt_delete_old=n
+opt_commitmessage=""
+
+load_options
+
+skip=0
+while [ ${#} -gt 0 ] ; do
+ arg=${1}
+ shift
+ if [ ${skip} -gt 0 ] ; then
+ skip=$[skip-1]
+ else
+ case ${arg} in
+ -h|--help)
+ print_usage
+ exit 0
+ ;;
+ -m|--message)
+ opt_commitmessage="${1}"
+ skip=1
+ ;;
+ -C|--no-cvs)
+ opt_add_cvs=n
+ ;;
+ -V|--version)
+ print_version
+ exit
+ ;;
+ -v|--verbose)
+ opt_verbosity=$[opt_verbosity + 1]
+ ;;
+ -q|--quiet)
+ opt_verbosity=0
+ ;;
+ -d|--delete-old)
+ opt_delete_old=y
+ ;;
+ *)
+ ebuild_arg=${arg}
+ ;;
+ esac
+ fi
+done
+
+process_ebuild ${ebuild_arg}
+
+# TODO:
+# - put cli parser into separate functions
diff --git a/src/ebump/ebump.1 b/src/ebump/ebump.1
new file mode 100644
index 0000000..6a64a0a
--- /dev/null
+++ b/src/ebump/ebump.1
@@ -0,0 +1,110 @@
+.TH "ebump" "1" "0.1.0" "Gentoolkit" "Gentoo Administration"
+.SH "NAME"
+.LP
+ebump \- Gentoo: Ebuild revision bumper
+.SH "SYNTAX"
+.LP
+ebump [\fIoption\fP] <\fIpackage-name[-version]\fP>
+
+.SH "DESCRIPTION"
+
+.LP
+\fIebump\fR bumps the revision of a particular ebuild, and all auxiliary
+files in the files/ directory that have a matching version suffix.
+
+.LP
+By default, the all new revision files will be added to CVS, and a
+dummy ChangeLog entry will be made.
+
+.LP
+You must stand in the directory of the ebuild to be bumped.
+
+.SH "OPTIONS"
+.LP
+\fB\-C\fR
+.br
+\fB--no-cvs\fB
+.IP
+Do not add new files to CVS.
+
+.LP
+\fB\-V\fR
+.br
+\fB--version\fB
+.IP
+Display version information and exit.
+
+.LP
+\fB\-v\fR
+.br
+\fB--verbose\fB
+.IP
+Increase verbosity level. May be used more than once.
+
+.LP
+\fB\-q\fR
+.br
+\fB--quiet\fB
+.IP
+Do not output any non-essential information.
+
+.LP
+\fB\-m\fR <\fIChangeLog text\fR>
+.br
+\fB\--message\fR <\fIChangeLog text\fR>
+.IP
+Specifies the message to add to the ChangeLog, instead of the standard
+placeholder.
+
+.LP
+\fB\-d\fR
+.br
+\fB\--delete-old\fR
+.IP
+Delete old revision and old auxiliary files from CVS. This is
+\fIdangerous\fR and should only be used if you know exactly what you are
+doing, because
+.br
+1) the old revision may be stable on a different architecture than the one you
+are working on.
+.br
+2) the auxiliary files may be required by other versions of the ebuild.
+.br
+3) the new revision should usually undergo a period of testing before being marked stable.
+
+.SH "CONFIGURATION"
+
+.LP
+\fB/etc/gentoolkit/ebump.conf\fR
+.br
+\fB~/.gentoo/ebump.conf\fR
+.IP
+From these files, \fIebump\fR will load the settings
+.br
+\fBopt_verbosity\fR (default \fI1\fR) - verbosity level 0-10
+.br
+\fBopt_add_changelog\fR (default \fIy\fR) - add entry in ChangeLog
+.br
+\fBopt_add_cvs\fR (default \fIy\fR) - add new files to CVS
+.br
+\fBopt_bump_auxfiles\fR (default \fIy\fR) - bump auxiliary files in files/
+.br
+\fBopt_delete_old\fR (default \fIn\fR) - delete old revision (DANGEROUS!)
+.br
+\fBopt_commitmessage\fR (default \fI""\fR) - default ChangeLog message
+
+.LP
+\fB~/.gentoo/gentool-env\fR
+.IR
+From this file, \fIebump\fR will load the env vars \fBAUTHORNAME\fR and
+\fBAUTHOREMAIL\fR, which are used to generate proper ChangeLog entries.
+
+.SH "SEE ALSO"
+.LP
+The rest of the utilities in \fIapp-portage/gentoolkit-dev\fR, such as
+\fIechangelog\fR and \fIego\fR.
+
+.SH "AUTHORS"
+.LP
+Karl Trygve Kalleberg <karltk@gentoo.org>
+
diff --git a/src/echangelog/AUTHORS b/src/echangelog/AUTHORS
new file mode 100644
index 0000000..36d5bfd
--- /dev/null
+++ b/src/echangelog/AUTHORS
@@ -0,0 +1 @@
+Aron Griffis <agriffis@gentoo.org>
diff --git a/src/echangelog/ChangeLog b/src/echangelog/ChangeLog
new file mode 100644
index 0000000..c1c5885
--- /dev/null
+++ b/src/echangelog/ChangeLog
@@ -0,0 +1,84 @@
+26 Mar 2006 Aron Griffis <agriffis@gentoo.org>
+ * echangelog: Don't warn about missing ebuilds when updating
+ copyrights #120061
+
+27 Apr 2005 Aron Griffis <agriffis@gentoo.org>
+ * more changes for #90326; report all trivial files if no significant
+ changes can be found
+
+26 Apr 2005 Aron Griffis <agriffis@gentoo.org>
+ * detect conflicts explicitly
+ * report ChangeLog in the list of files if it's the only file that is
+ changing #90326
+
+23 Mar 2005 Aron Griffis <agriffis@gentoo.org>
+ * handle package moves without adding new version lines
+
+08 Mar 2005 Aron Griffis <agriffis@gentoo.org>
+ * don't complain about cvs add of digests #84377
+ * use gmtime instead of localtime
+
+07 Mar 2005 Aron Griffis <agriffis@gentoo.org>
+ * report all changed versions #84332
+
+25 Feb 2005 Aron Griffis <agriffis@gentoo.org>
+ * strip GECOS #80011
+
+09 Nov 2004 Aron Griffis <agriffis@gentoo.org>
+ * change "cvs diff -fU 0" => "cvs -f diff U0" because -f is a
+ global option, not a diff option
+
+08 Nov 2004 Aron Griffis <agriffis@gentoo.org>
+ * call cvs with -f to refrain from using .cvsrc, which might
+ contain conflicting options
+ * fix auto-addition of ChangeLog; last attempt was broken
+
+03 Nov 2004 Aron Griffis <agriffis@gentoo.org>
+ * abort when there are unresolved files (files that aren't under
+ revision control) just like repoman
+ * auto-add to cvs when a new ChangeLog is created
+
+15 Sep 2004 Aron Griffis <agriffis@gentoo.org>
+ * fix the wrapping to fit in 80 columns properly. It was
+ previously possible to get lines with 81 chars. Thanks to
+ ciaranm for reporting.
+
+29 Mar 2004 Aron Griffis <agriffis@gentoo.org>
+ * fix bug 46111 by testing for /<root@/ instead of / root@/
+
+28 Mar 2004 Aron Griffis <agriffis@gentoo.org>
+ * apply patch from plasmaroo, with minor modifications, to enable EDITOR
+ and +- support
+
+27 Mar 2004 Michael Sterrett <mr_bones_@gentoo.org>
+ * don't fall out of the loop if update_copyright() didn't change
+ anything. Just go on to the next file.
+
+21 Mar 2004 Aron Griffis <agriffis@gentoo.org>
+ * Fix typo $0 -> 0
+
+19 Mar 2004 Aron Griffis <agriffis@gentoo.org>
+ * Remove debugging output
+ * Fix $v bug introduced in last commit
+
+16 Mar 2004 Aron Griffis <agriffis@gentoo.org>
+ * Make Feb 17 behavior work without Feb 20 bug :-)
+ * Release as version 0.2.0
+
+20 Feb 2004 Aron Griffis <agriffis@gentoo.org>
+ * Only update copyrights on modified ebuilds, otherwise if you run
+ echangelog again, it reports that all the ebuilds have been updated!
+ The copyright year issue would be better solved on Jan 1 of each year by
+ a separate script.
+
+17 Feb 2004 Aron Griffis <agriffis@gentoo.org>
+ * Update copyrights on all ebuilds, not just the modified ones
+
+07 Jan 2004 Aron Griffis <agriffis@gentoo.org>
+ * Updated Makefile to understand building man-page from pod
+ * Removed static man-page in favor of generated man-page from pod
+ * Added copyright year updating
+ * Allow echangelog to run even when no files have changed
+
+2004-01-07 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added Makefile
diff --git a/src/echangelog/Makefile b/src/echangelog/Makefile
new file mode 100644
index 0000000..4825683
--- /dev/null
+++ b/src/echangelog/Makefile
@@ -0,0 +1,26 @@
+# 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
+
+.PHONY: all test
+
+all:
+
+test:
+ cd test; sh test.sh
+
+dist:
+ mkdir -p ../../$(distdir)/src/echangelog/test/templates
+ cp Makefile AUTHORS README TODO ChangeLog echangelog echangelog.1 ../../$(distdir)/src/echangelog/
+ cp test/TEST.pm test/test.sh ../../$(distdir)/src/echangelog/test/
+ cp test/templates/test.patch test/templates/vcstest-0.0.1.ebuild ../../$(distdir)/src/echangelog/test/templates
+
+install: all
+ install -m 0755 echangelog $(bindir)/
+ install -d $(docdir)/echangelog
+ install -m 0644 AUTHORS README $(docdir)/echangelog/
+ install -m 0644 echangelog.1 $(mandir)/
diff --git a/src/echangelog/README b/src/echangelog/README
new file mode 100644
index 0000000..77a7930
--- /dev/null
+++ b/src/echangelog/README
@@ -0,0 +1,11 @@
+Most of the documentation is contained in the man-page, which you can
+read directly (using GNU man) by doing
+
+ man ./echangelog.1
+
+To rebuild the man-page from pod source, do
+
+ pod2man --name=echangelog --center='Gentoolkit' \
+ echangelog.pod echangelog.1
+
+03 Nov 2004 agriffis
diff --git a/src/echangelog/TODO b/src/echangelog/TODO
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/echangelog/TODO
diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog
new file mode 100755
index 0000000..551d9b9
--- /dev/null
+++ b/src/echangelog/echangelog
@@ -0,0 +1,711 @@
+#!/usr/bin/perl -w
+#
+# echangelog: Update the ChangeLog for an ebuild. For example:
+#
+# $ echangelog 'Add ~alpha to KEYWORDS'
+# 4a5,7
+# > 10 Feb 2003; Aron Griffis <agriffis@gentoo.org> oaf-0.6.8-r1.ebuild :
+# > Add ~alpha to KEYWORDS
+# >
+
+use strict;
+use POSIX qw(strftime getcwd setlocale);
+use File::Find;
+use Getopt::Long;
+
+# Fix bug 21022 by restricting to C locale
+setlocale(&POSIX::LC_ALL, "C");
+
+use Text::Wrap;
+$Text::Wrap::columns = 77;
+$Text::Wrap::unexpand = 0;
+
+# Global variables
+my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions);
+my ($input, $editor, $entry, $user, $date, $text, $year, $vcs);
+my ($opt_help, $opt_strict, $opt_version);
+
+$opt_help = 0;
+$opt_strict = 0;
+$opt_version = 0;
+
+my %vcs = (
+ cvs => {
+ diff => "cvs -f diff -U0",
+ status => "cvs -fn up",
+ add => "cvs -f add",
+ skip => 6,
+ regex => qr/^Index: (([^\/]*?)\.ebuild)\s*$/
+ },
+ svn => {
+ diff => "svn diff -N",
+ status => "svn status",
+ add => "svn add",
+ skip => 4,
+ regex => qr/^Index: (([^\/]*?)\.ebuild)\s*$/
+ },
+ git => {
+ diff => "git diff",
+ status => "git diff-index HEAD --name-status",
+ add => "git add",
+ # This value should usually be 3 but on new file mode we need skip+1.
+ # So 4 should be fine anyway.
+ skip => 4,
+ regex => qr/^diff \-\-git \S*\/((\S*)\.ebuild)/
+ },
+);
+
+sub usage {
+ (my $usage = <<" EOF") =~ s/^\t//gm;
+ Usage: echangelog [options] <changelog message>
+
+ Options:
+ --help err, this screen ...
+ --strict abort on trivial/no changes
+ --version show version info
+ EOF
+ print $usage;
+ exit 0;
+}
+
+sub version {
+ my $Revision = "Last svn change rev";
+ my $Date = "Last svn change date";
+ my $foo = "";
+ print "echangelog\n$Revision$foo \n$Date$foo\n";
+ exit 0;
+}
+
+sub getenv($) {
+ my $key = shift;
+
+ # Ensure our variable exist
+ if ( defined($ENV{$key}) ) {
+ # Ensure we don't get empty variables
+ if ( length($ENV{$key}) > 0 ) {
+ return $ENV{$key};
+ }
+ }
+ return undef;
+}
+
+# Bug 264146.
+# Copied from Text::Wrap.
+# The only modified thing is:
+# We trim _just_ tab/space etc. but not \n/\r.
+# \s treats even \n/\r as whitespace.
+# BUGS:
+# ' test'
+# ' test'
+# Will end up in:
+# ' test'
+# ''
+# 'test'
+# See 'my $ps = ($ip eq $xp) ? "\n\n" : "\n";'
+sub text_fill {
+ my ($ip, $xp, @raw) = @_;
+ my @para;
+ my $pp;
+
+ for $pp ( split(/\n\s+/, join("\n", @raw)) ) {
+ $pp =~ s/[\x09|\x0B|\x0C|\x20]+/ /g;
+ my $x = Text::Wrap::wrap($ip, $xp, $pp);
+ push(@para, $x);
+ }
+
+ # if paragraph_indent is the same as line_indent,
+ # separate paragraphs with blank lines
+ my $ps = ($ip eq $xp) ? "\n\n" : "\n";
+ return join ($ps, @para);
+}
+
+sub changelog_info(%) {
+ my %changed = @_;
+
+ open(INFO, '>', 'ChangeLog.new');
+
+ print(INFO "\n");
+ print(INFO "# Please enter the ChangeLog message for your changes. Lines starting\n");
+ print(INFO "# with '#' will be ignored, and an empty message aborts the ChangeLog.\n");
+ print(INFO "#\n# Changes:\n");
+
+ foreach my $key (keys(%changed)) {
+ if ($changed{$key} eq "+") {
+ printf(INFO "# new file:\t%s\n", $key);
+ }
+ elsif ($changed{$key} eq "-") {
+ printf(INFO "# deleted:\t%s\n", $key);
+ }
+ else {
+ printf(INFO "# modified:\t%s\n", $key);
+ }
+ }
+
+ close(INFO);
+}
+
+GetOptions(
+ 'help' => \$opt_help,
+ 'strict' => \$opt_strict,
+ 'version' => \$opt_version,
+);
+
+usage() if $opt_help;
+version() if $opt_version;
+
+# Figure out what kind of repo we are in.
+if ( -d "CVS" ) {
+ $vcs = "cvs";
+} elsif ( -d '.svn' ) {
+ $vcs = "svn";
+} else {
+ # Respect $PATH while looking for git
+ if (getenv("PATH")) {
+ foreach my $path ( split(":", getenv("PATH")) ) {
+ if ( -X "$path/git" ) {
+ open(GIT, '-|', "git rev-parse --git-dir 2>/dev/null");
+ $vcs = "git" if defined(<GIT>);
+ close(GIT);
+ last;
+ }
+ }
+ }
+
+ if ( ! $vcs ) {
+ die "No CVS, .git, .svn directories found, what kind of repo is this?";
+ }
+}
+
+# Read the current ChangeLog
+if (-f 'ChangeLog') {
+ open I, '<ChangeLog' or die "Can't open ChangeLog for input: $!\n";
+ { local $/ = undef; $text = <I>; }
+ close I;
+} else {
+ # No ChangeLog here, maybe we should make one...
+ if (<*.ebuild>) {
+ open C, "portageq envvar PORTDIR |" or die "Can't find PORTDIR";
+ my ($new) = <C>;
+ close C;
+
+ $new =~ s/\s+$//;
+ open I, "< $new/skel.ChangeLog"
+ or die "Can't open $new/skel.ChangeLog for input: $!\n";
+ { local $/ = undef; $text = <I>; }
+ close I;
+ $text =~ s/^\*.*//ms; # don't need the fake entry
+ } else {
+ die "This should be run in a directory with ebuilds...\n";
+ }
+}
+
+# Figure out what has changed around here
+open C, $vcs{$vcs}{status}.' 2>&1 |' or die "Can't run ".$vcs{$vcs}{status}.": $!\n";
+while (<C>) {
+ if (/^C\s+(\S+)/) {
+ if($vcs eq "git") {
+ my $filename = $2;
+ $filename =~ /\S*\/(\S*)/;
+
+ if( -d $1 ) {
+ next;
+ }
+
+ push @conflicts, $1;
+ next;
+ }
+
+ push @conflicts, $1;
+ next;
+ } elsif (/^\?\s+(\S+)/) {
+ if($vcs eq "git") {
+ my $filename = $2;
+ $filename =~ /\S*\/(\S*)/;
+
+ if( -d $1 ) {
+ next;
+ }
+
+ push @unknown, $1;
+ next;
+ } else {
+ push @unknown, $1;
+ }
+
+ $actions{$1} = '+';
+ next;
+ } elsif (/^([ARMD])\s+\+?\s*(\S+)/) {
+ my ($status, $filename) = ($1,$2);
+
+ if($vcs eq "git") {
+ open P, "git rev-parse --sq --show-prefix |";
+ my $prefix = <P>;
+ $prefix = substr($prefix, 0, -1);
+ close P;
+
+ if ($filename =~ /$prefix(\S*)/) {
+ $filename = $1 ;
+ }
+ else {
+ next;
+ }
+ }
+
+ if( -d $filename ) {
+ next;
+ }
+
+ push @files, $filename;
+ ($actions{$filename} = $status) =~ tr/DARM/-+-/d;
+ }
+}
+
+# git only shows files already added so we need to check for unknown files
+# separately here.
+if($vcs eq "git") {
+ find(\&git_unknown_objects, "./");
+}
+
+sub git_unknown_objects {
+ my $object = $_;
+ my ($dev,$ino,$mode,$nlink,$uid,$gid);
+
+ # Ignore empty directories - git doesn't version them and cvs removes them.
+ if ( (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && ! -d _ ) {
+ open C, $vcs." status $_ 2>&1 1>/dev/null |";
+
+ while (<C>) {
+ $_ = <C>;
+ push @unknown, $object;
+ };
+
+ close C;
+ };
+}
+
+# Separate out the trivial files for now
+@files = grep {
+ !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+} @files;
+
+@unknown = grep {
+ !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; }
+} @unknown;
+
+# Don't allow any conflicts
+if (@conflicts) {
+ print STDERR <<EOT;
+$vcs reports the following conflicts. Please resolve them before
+running echangelog.
+EOT
+ print STDERR map "C $_\n", @conflicts;
+ exit 1;
+}
+
+# Don't allow unknown files (other than the trivial files that were separated
+# out above)
+if (@unknown) {
+ print STDERR <<EOT;
+$vcs reports the following unknown files. Please use "$vcs add" before
+running echangelog, or remove the files in question.
+EOT
+ print STDERR map "? $_\n", @unknown;
+ exit 1;
+}
+
+# Sort the list of files as portage does. None of the operations through
+# the rest of the script should break this sort.
+sub sortfunc($$) {
+ my ($a, $b) = @_;
+ (my $va = $a) =~ s/.*?-(\d.*?)(?:\.ebuild)?$/$1/;
+ (my $vb = $b) =~ s/.*?-(\d.*?)(?:\.ebuild)?$/$1/;
+ my ($na, $sa, $sna, $ra) = ($va =~ /^(.*?)(?:_(alpha|beta||pre|rc|p)(\d*))?(?:-r(\d+))?$/);
+ my ($nb, $sb, $snb, $rb) = ($vb =~ /^(.*?)(?:_(alpha|beta||pre|rc|p)(\d*))?(?:-r(\d+))?$/);
+ my (@na) = split /\.|(?<=\d)(?=[^\d\.])/, $na;
+ my (@nb) = split /\.|(?<=\d)(?=[^\d\.])/, $nb;
+ my $retval;
+
+ #
+ # compare version numbers first
+ #
+ for (my $i = 0; defined $na[$i] or defined $nb[$i]; $i++) {
+ # def vs. undef
+ return +1 if defined $na[$i] and !defined $nb[$i];
+ return -1 if defined $nb[$i] and !defined $na[$i];
+
+ # num vs. num
+ if ($na[$i] =~ /^\d/ and $nb[$i] =~ /^\d/) {
+ $retval = ($na[$i] <=> $nb[$i]);
+ return $retval if $retval;
+ next;
+ }
+
+ # char vs. char
+ if ($na[$i] =~ /^\D/ and $nb[$i] =~ /^\D/) {
+ $retval = ($na[$i] cmp $nb[$i]);
+ return $retval if $retval;
+ next;
+ }
+
+ # num vs. char
+ $retval = ($na[$i] =~ /\d/ and -1 or +1);
+ return $retval;
+ }
+
+ #
+ # compare suffix second
+ #
+ if (defined $sa and !defined $sb) {
+ return +2 if $sa eq "p";
+ return -2;
+ }
+ if (defined $sb and !defined $sa) {
+ return -3 if $sb eq "p";
+ return +3;
+ }
+
+ if (defined $sa) { # and defined $sb
+ $retval = ($sa cmp $sb);
+ if ($retval) {
+ return +4 if $sa eq "p";
+ return -4 if $sb eq "p";
+ return $retval; # suffixes happen to be alphabetical order, mostly
+ }
+
+ # compare suffix number
+ return +5 if defined $sna and !defined $snb;
+ return -5 if defined $snb and !defined $sna;
+
+ if (defined $sna) { # and defined $snb
+ $retval = ($sna <=> $snb);
+ return $retval if $retval;
+ }
+ }
+
+ #
+ # compare rev third
+ #
+ return +6 if defined $ra and !defined $rb;
+ return -6 if defined $rb and !defined $ra;
+
+ if (defined $ra) { # and defined $rb
+ return ($ra <=> $rb);
+ }
+
+ #
+ # nothing left to compare
+ #
+ return 0;
+}
+
+# Just to ensure we don't get duplicate entries.
+sub mypush(\@@) {
+ my $aref = shift;
+
+ foreach my $value (@_) {
+ push(@{$aref}, $value) if !grep(/^$value$/, @{$aref});
+ }
+}
+
+# Forget ebuilds that only have changed copyrights, unless that's all
+# the changed files we have
+
+@ebuilds = grep /\.ebuild$/, @files;
+@files = grep !/\.ebuild$/, @files;
+
+if (@ebuilds) {
+ if ($vcs eq "git") {
+ open C, $vcs{$vcs}{diff}." HEAD -- @ebuilds 2>&1 |" or die "Can't run: ".$vcs{$vcs}{diff}."$!\n";
+ } else {
+ open C, $vcs{$vcs}{diff}." @ebuilds 2>&1 |" or die "Can't run: ".$vcs{$vcs}{diff}."$!\n";
+ }
+
+ $_ = <C>;
+
+ while (defined $_) {
+ # only possible with cvs
+ if (/^$vcs diff: (([^\/]*?)\.ebuild) was removed/) {
+ mypush(@files, $1);
+ }
+ # We assume GNU diff output format here.
+ # git format: diff --git a/app-doc/repodoc/metadata.xml b/app-doc/repodoc/metadata.xml
+ elsif (/$vcs{$vcs}{regex}/) {
+ my $f = $1;
+
+ if ($vcs eq "git") {
+ my $version = $2;
+
+ while (<C>) {
+ last if /^deleted file mode|^index/;
+ if (/^new file mode/) {
+ mypush(@files, $f);
+ mypush(@new_versions, $version);
+ last;
+ }
+ }
+ }
+
+ # check if more than just copyright date changed.
+ # skip some lines (vcs dependent)
+ foreach(1..$vcs{$vcs}{skip}) {
+ $_ = <C>;
+ }
+
+ while (<C>) {
+ last if /^[A-Za-z]/;
+ if (/^[-+](?!# Copyright)/) {
+ mypush(@files, $f);
+ last;
+ }
+ }
+
+ # at this point we've either added $f to @files or not,
+ # and we have the next line in $_ for processing
+ next;
+ }
+ elsif (/^$vcs.*?: (([^\/]*?)\.ebuild) is a new entry/) {
+ mypush(@files, $1);
+ mypush(@new_versions, $2);
+ }
+
+ # other cvs output is ignored
+ $_ = <C>;
+ }
+}
+close C;
+
+# Subversion diff doesn't identify new versions. So use the status command
+if (($vcs eq "svn") and (@ebuilds)) {
+ open C, $vcs{$vcs}{status}." @ebuilds 2>&1 |" or die "Can't run: ".$vcs{$vcs}{status}."$!\n";
+ $_ = <C>;
+
+ while (defined $_) {
+ if (/^A\s+\+?\s*(([^\s]*)\.ebuild)/) {
+ mypush(@files, $1);
+ mypush(@new_versions, $2);
+ }
+
+ $_ = <C>;
+ }
+}
+
+# When a package move occurs, the versions appear to be new even though they are
+# not. Trim them from @new_versions in that case.
+@new_versions = grep { $text !~ /^\*\Q$_\E\s/m } @new_versions;
+
+# Check if we have any files left, otherwise re-insert ebuild list
+# (of course, both might be empty anyway)
+@files = @ebuilds unless (@files);
+
+# Allow ChangeLog entries with no changed files, but give a fat warning
+unless (@files) {
+ print STDERR "**\n";
+ print STDERR "** NOTE: No non-trivial changed files found. Normally echangelog\n";
+ print STDERR "** should be run after all affected files have been added and/or\n";
+ print STDERR "** modified. Did you forget to $vcs add?\n";
+ print STDERR "**\n";
+
+ if ($opt_strict) {
+ print STDERR "** In strict mode, exiting\n";
+ exit 1;
+ }
+
+ @files = sort sortfunc @trivial;
+
+ # last resort to put something in the list
+ unless (@files) {
+ @files = qw/ChangeLog/;
+ $actions{'ChangeLog'} = "";
+ }
+}
+
+# sort
+@files = sort sortfunc @files;
+@new_versions = sort sortfunc @new_versions;
+
+# Get the input from the cmdline, editor or stdin
+if ($ARGV[0]) {
+ $input = "@ARGV";
+} else {
+ $editor = getenv('ECHANGELOG_EDITOR') ? getenv('ECHANGELOG_EDITOR') : getenv('EDITOR') || undef;
+
+ if ($editor) {
+ # Append some informations.
+ changelog_info(%actions);
+
+ system("$editor ChangeLog.new");
+
+ if ($? != 0) {
+ # This usually happens when the editor got forcefully killed; and
+ # the terminal is probably messed up: so we reset things.
+ system('stty sane');
+ print STDERR "Editor died! Reverting to stdin method.\n";
+ undef $editor;
+ } else {
+ if (open I, "<ChangeLog.new") {
+ local $/ = undef;
+ $input = <I>;
+ close(I);
+
+ # Remove comments from changelog_info().
+ local $/ = "\n";
+ $input =~ s/^#.*//mg;
+ local $/ = undef;
+ } else {
+ print STDERR "Error opening ChangeLog.new: $!\n";
+ print STDERR "Reverting to stdin method.\n";
+ undef $editor;
+ }
+ }
+ unlink('ChangeLog.new') if -f 'ChangeLog.new';
+ }
+
+ unless ($editor) {
+ print "Please type the log entry: use Ctrl-d to finish, Ctrl-c to abort...\n";
+ local $/ = undef;
+ $input = <>;
+ }
+}
+die "Empty entry; aborting\n" unless $input =~ /\S/;
+
+# If there are any long lines, then wrap the input at $columns chars
+# (leaving 2 chars on left, one char on right, after adding indentation below).
+$input = text_fill(' ', ' ', $input);
+
+# Prepend the user info to the input
+# Changes related to bug 213374;
+# This sequence should be right:
+# 1. GENTOO_COMMITTER_NAME && GENTOO_COMMITTER_EMAIL
+# 2. GENTOO_AUTHOR_NAME && GENTOO_AUTHOR_EMAIL
+# 3. ECHANGELOG_USER (fallback/obsolete?)
+# 4. getpwuid()..
+if ( getenv("GENTOO_COMMITTER_NAME") && getenv("GENTOO_COMMITTER_EMAIL") ) {
+ $user = sprintf("%s <%s>", getenv("GENTOO_COMMITTER_NAME"), getenv("GENTOO_COMMITTER_EMAIL"));
+}
+elsif ( getenv("GENTOO_AUTHOR_NAME") && getenv("GENTOO_AUTHOR_EMAIL") ) {
+ $user = sprintf("%s <%s>", getenv("GENTOO_AUTHOR_NAME"), getenv("GENTOO_AUTHOR_EMAIL"));
+}
+elsif ( getenv("ECHANGELOG_USER") ) {
+ $user = getenv("ECHANGELOG_USER");
+}
+else {
+ my ($fullname, $username) = (getpwuid($<))[6,0];
+ $fullname =~ s/,.*//; # remove GECOS, bug 80011
+ $user = sprintf('%s <%s@gentoo.org>', $fullname, $username);
+}
+
+# Make sure that we didn't get "root"
+die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ /<root@/;
+
+$date = strftime("%d %b %Y", gmtime);
+$entry = "$date; $user ";
+$entry .= join ', ', map "$actions{$_}$_", @files;
+$entry .= ':';
+$entry = Text::Wrap::fill(' ', ' ', $entry); # does not append a \n
+$entry .= "\n$input"; # append user input
+
+# Each one of these regular expressions will eat the whitespace
+# leading up to the next entry (except the two-space leader on the
+# front of a dated entry), so it needs to be replaced with a
+# double carriage-return. This helps to normalize the spacing in
+# the ChangeLogs.
+if (@new_versions) {
+ # Insert at the top with a new version marker
+ $text =~ s/^( .*? ) # grab header
+ \s*\n(?=\ \ \d|\*|\z) # suck up trailing whitespace
+ /"$1\n\n" .
+ join("\n", map "*$_ ($date)", reverse @new_versions) .
+ "\n\n$entry\n\n"/sxe
+ or die "Failed to insert new entry (4)\n";
+} else {
+ # Changing an existing patch or ebuild, no new version marker
+ # required
+ $text =~ s/^( .*? ) # grab header
+ \s*\n(?=\ \ \d|\*|\z) # suck up trailing whitespace
+ /$1\n\n$entry\n\n/sx
+ or die "Failed to insert new entry (3)\n";
+}
+
+sub update_cat_pn {
+ my ($t) = @_;
+ my ($cwd) = getcwd();
+
+ $cwd =~ m|.*/(\w+-\w+\|virtual)/([^/]+)|
+ or die "Can't figure out category/package.. sorry!\n";
+ my ($category, $package_name) = ($1, $2);
+ $t =~ s/^(# ChangeLog for).*/$1 $category\/$package_name/;
+
+ return $t;
+}
+
+# New packages and/or ones that have moved around often have stale data here.
+# But only do that in places where ebuilds are around (as echangelog can be
+# used in profiles/ and such places).
+if (grep(/\.ebuild$/, @files)) {
+ $text = update_cat_pn($text);
+}
+
+sub update_copyright {
+ my ($t) = @_;
+ (my $year = $date) =~ s/.* //;
+
+ $t =~ s/^# Copyright \d+(?= )/$&-$year/m or
+ $t =~ s/^(# Copyright) \d+-(\d+)/$1 1999-$year/m;
+
+ return $t;
+}
+
+# Update the copyright year in the ChangeLog
+$text = update_copyright($text);
+
+# Write the new ChangeLog
+open O, '>ChangeLog.new' or die "Can't open ChangeLog.new for output: $!\n";
+print O $text or die "Can't write ChangeLog.new: $!\n";
+close O or die "Can't close ChangeLog.new: $!\n";
+
+# Update affected ebuild copyright dates. There is no reason to update the
+# copyright lines on ebuilds that haven't changed. I verified this with an IP
+# lawyer.
+for my $e (grep /\.ebuild$/, @files) {
+ if (-s $e) {
+ my ($etext, $netext);
+
+ open E, "<$e" or warn("Can't read $e to update copyright year\n"), next;
+ { local $/ = undef; $etext = <E>; }
+ close E;
+
+ # Attempt the substitution and compare
+ $netext = update_copyright($etext);
+ next if $netext eq $etext; # skip this file if no change.
+
+ # Write the new ebuild
+ open E, ">$e.new" or warn("Can't open $e.new\n"), next;
+ print E $netext and
+ close E or warn("Can't write $e.new\n"), next;
+
+ # Move things around and show the diff
+ system "diff -U 0 $e $e.new";
+ rename "$e.new", $e or warn("Can't rename $e.new: $!\n");
+ }
+}
+
+# Move things around and show the ChangeLog diff
+system 'diff -Nu ChangeLog ChangeLog.new';
+rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename ChangeLog.new: $!\n";
+
+# Okay, now we have a starter ChangeLog to work with.
+# The text will be added just like with any other ChangeLog below.
+# Add the new ChangeLog to vcs before continuing.
+if ($vcs eq "cvs") {
+ if (open F, "CVS/Entries") {
+ system("cvs -f add ChangeLog") unless (scalar grep /^\/ChangeLog\//, <F>);
+ }
+} elsif ($vcs eq "svn") {
+ if (open F, ".svn/entries") {
+ system("svn add ChangeLog") unless (scalar grep /ChangeLog/, <F>);
+ }
+} else {
+ system("$vcs{$vcs}{add} ChangeLog 2>&1 >> /dev/null");
+}
+
+# vim: set ts=4 sw=4 tw=0:
diff --git a/src/echangelog/echangelog.1 b/src/echangelog/echangelog.1
new file mode 100644
index 0000000..1575644
--- /dev/null
+++ b/src/echangelog/echangelog.1
@@ -0,0 +1,270 @@
+.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
+.\"
+.\" Standard preamble:
+.\" ========================================================================
+.de Sh \" Subsection heading
+.br
+.if t .Sp
+.ne 5
+.PP
+\fB\\$1\fR
+.PP
+..
+.de Sp \" Vertical space (when we can't use .PP)
+.if t .sp .5v
+.if n .sp
+..
+.de Vb \" Begin verbatim text
+.ft CW
+.nf
+.ne \\$1
+..
+.de Ve \" End verbatim text
+.ft R
+.fi
+..
+.\" Set up some character translations and predefined strings. \*(-- will
+.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
+.\" double quote, and \*(R" will give a right double quote. \*(C+ will
+.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
+.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
+.\" nothing in troff, for use with C<>.
+.tr \(*W-
+.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
+.ie n \{\
+. ds -- \(*W-
+. ds PI pi
+. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
+. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
+. ds L" ""
+. ds R" ""
+. ds C` ""
+. ds C' ""
+'br\}
+.el\{\
+. ds -- \|\(em\|
+. ds PI \(*p
+. ds L" ``
+. ds R" ''
+'br\}
+.\"
+.\" Escape single quotes in literal strings from groff's Unicode transform.
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\"
+.\" If the F register is turned on, we'll generate index entries on stderr for
+.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
+.\" entries marked with X<> in POD. Of course, you'll have to process the
+.\" output yourself in some meaningful fashion.
+.ie \nF \{\
+. de IX
+. tm Index:\\$1\t\\n%\t"\\$2"
+..
+. nr % 0
+. rr F
+.\}
+.el \{\
+. de IX
+..
+.\}
+.\"
+.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
+.\" Fear. Run. Save yourself. No user-serviceable parts.
+. \" fudge factors for nroff and troff
+.if n \{\
+. ds #H 0
+. ds #V .8m
+. ds #F .3m
+. ds #[ \f1
+. ds #] \fP
+.\}
+.if t \{\
+. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
+. ds #V .6m
+. ds #F 0
+. ds #[ \&
+. ds #] \&
+.\}
+. \" simple accents for nroff and troff
+.if n \{\
+. ds ' \&
+. ds ` \&
+. ds ^ \&
+. ds , \&
+. ds ~ ~
+. ds /
+.\}
+.if t \{\
+. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
+. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
+. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
+. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
+. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
+. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
+.\}
+. \" troff and (daisy-wheel) nroff accents
+.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
+.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
+.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
+.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
+.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
+.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
+.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
+.ds ae a\h'-(\w'a'u*4/10)'e
+.ds Ae A\h'-(\w'A'u*4/10)'E
+. \" corrections for vroff
+.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
+.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
+. \" for low resolution devices (crt and lpr)
+.if \n(.H>23 .if \n(.V>19 \
+\{\
+. ds : e
+. ds 8 ss
+. ds o a
+. ds d- d\h'-1'\(ga
+. ds D- D\h'-1'\(hy
+. ds th \o'bp'
+. ds Th \o'LP'
+. ds ae ae
+. ds Ae AE
+.\}
+.rm #[ #] #H #V #F C
+.\" ========================================================================
+.\"
+.IX Title "echangelog 1"
+.TH echangelog 1 "2009-04-28" "perl v5.10.0" "Gentoolkit"
+.\" For nroff, turn off justification. Always turn off hyphenation; it makes
+.\" way too many mistakes in technical documents.
+.if n .ad l
+.nh
+.SH "NAME"
+echangelog \- Gentoo: update portage ChangeLogs
+.SH "SYNOPSIS"
+.IX Header "SYNOPSIS"
+echangelog [ \fItext\fR ]
+.SH "DESCRIPTION"
+.IX Header "DESCRIPTION"
+This tool provides an easy way to create or update portage ChangeLogs
+in Gentoo. The tool scans the current directory, which is assumed to
+be a package directory such as /usr/portage/app\-editors/vim, finds
+what files have been changed or added, and inserts the appropriate
+entry to ChangeLog. If \fItext\fR is not provided on the command-line,
+echangelog prompts for it.
+.PP
+All modifications should occur before running echangelog so that it
+can include the appropriate file information in the ChangeLog entry.
+For example, you should run \*(L"cvs add\*(R" on your files, otherwise
+echangelog won't know those files are part of the update.
+.PP
+If your text would cause the ChangeLog entry to exceed 80 columns, it
+will be rewrapped to keep the ChangeLog neat. If you need special
+formatting in the ChangeLog, then you can either (1) run echangelog
+with no text on the command-line, and make sure that your text won't
+be too wide, (2) edit the ChangeLog manually. If you prefer (2), I'd
+recommend something like \*(L"echangelog blah\*(R" so that the header lines
+are computed correctly, then edit and change \*(L"blah\*(R" to your preferred
+text.
+.PP
+In addition to updating the ChangeLog, echangelog will automatically
+update the copyright year of all out-of-date ebuilds, as well as the
+ChangeLog itself. These updates are included in the diff displayed by
+echangelog when it finishes its work.
+.SH "OPTIONS"
+.IX Header "OPTIONS"
+Presently echangelog is simple enough that it supplies no options.
+Probably I'll add \fB\-\-help\fR and \fB\-\-version\fR in the future, but for
+now it's enough to track the gentoolkit version.
+.SH "EXAMPLES"
+.IX Header "EXAMPLES"
+To create a ChangeLog for a completely new package. The header is
+parsed from skel.ebuild.
+.PP
+.Vb 2
+\& $ cvs add metalog\-0.1.ebuild
+\& cvs server: use \*(Aqcvs commit\*(Aq to add this file permanently
+\&
+\& $ echangelog \*(AqNew ebuild, thanks to Harvey McGillicuddy\*(Aq
+\& \-\-\- ChangeLog 1969\-12\-31 19:00:00.000000000 \-0500
+\& +++ ChangeLog.new 2003\-02\-23 14:04:06.000000000 \-0500
+\& @@ \-0,0 +1,9 @@
+\& +# ChangeLog for app\-admin/metalog
+\& +# Copyright 2000\-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+\& +# $Header$
+\& +
+\& +*metalog\-0.1 (23 Feb 2003)
+\& +
+\& + 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> metalog\-0.1.ebuild :
+\& + New ebuild, thanks to Harvey McGillicuddy
+\& +
+.Ve
+.PP
+To bump a revision. Note you need to \*(L"cvs add\*(R" so that echangelog
+will notice the new file.
+.PP
+.Vb 2
+\& $ cvs add metalog\-0.1\-r1.ebuild
+\& cvs server: use \*(Aqcvs commit\*(Aq to add this file permanently
+\&
+\& $ echangelog \*(AqBump revision to fix bug #999\*(Aq
+\& \-\-\- ChangeLog 2003\-02\-23 14:04:06.000000000 \-0500
+\& +++ ChangeLog.new 2003\-02\-23 14:07:48.000000000 \-0500
+\& @@ \-2,6 +2,11 @@
+\& # Copyright 2000\-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+\& # $Header$
+\&
+\& +*metalog\-0.1\-r1 (23 Feb 2003)
+\& +
+\& + 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> metalog\-0.1\-r1.ebuild :
+\& + Bump revision to fix bug #999
+\& +
+\& *metalog\-0.1 (23 Feb 2003)
+\&
+\& 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> metalog\-0.1.ebuild :
+.Ve
+.PP
+For a multi-line entry, omit the command-line arg.
+.PP
+.Vb 10
+\& $ echangelog
+\& Please type the log entry, finish with ctrl\-d
+\& Bump revision to fix bug #999. Necessary to bump the revision because
+\& the problem appears at run\-time, not compile\-time. This should also
+\& give users the updated default configuration file.
+\& \-\-\- ChangeLog 2003\-02\-23 14:09:12.000000000 \-0500
+\& +++ ChangeLog.new 2003\-02\-23 14:12:43.000000000 \-0500
+\& @@ \-2,6 +2,13 @@
+\& # Copyright 2000\-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+\& # $Header$
+\&
+\& +*metalog\-0.1\-r1 (23 Feb 2003)
+\& +
+\& + 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> metalog\-0.1\-r1.ebuild :
+\& + Bump revision to fix bug #999. Necessary to bump the revision because
+\& + the problem appears at run\-time, not compile\-time. This should also
+\& + give users the updated default configuration file.
+\& +
+\& *metalog\-0.1 (23 Feb 2003)
+\&
+\& 23 Feb 2003; Aron Griffis <agriffis@gentoo.org> metalog\-0.1.ebuild :
+.Ve
+.SH "ENVIRONMENT VARIABLES"
+.IX Header "ENVIRONMENT VARIABLES"
+.IP "\s-1ECHANGELOG_USER\s0" 4
+.IX Item "ECHANGELOG_USER"
+If echangelog can't figure out your username for the entry, you should
+set \s-1ECHANGELOG_USER\s0. For example, export ECHANGELOG_USER=\*(L"Aron
+Griffis <agriffis@gentoo.org>\*(R"
+.SH "NOTES"
+.IX Header "NOTES"
+As of the most recent version of echangelog (when this man-page
+appeared), echangelog puts all new entries at the top of the file
+instead of finding the appropriate *version line within the file.
+This is because that \*(L"new\*(R" ChangeLog format was never agreed upon by
+the Gentoo developers. Unfortunately the existence of both formats
+will undoubtedly cause much confusion.
+.PP
+This also means that the examples above are wrong, since I just copied
+them from some old email. However they're not much wrong. ;\-)
+.PP
+This tool was written by Aron Griffis <agriffis@gentoo.org>. Bugs
+found should be filed against me at http://bugs.gentoo.org/
diff --git a/src/echangelog/test/TEST.pm b/src/echangelog/test/TEST.pm
new file mode 100644
index 0000000..6632148
--- /dev/null
+++ b/src/echangelog/test/TEST.pm
@@ -0,0 +1,26 @@
+# We just return a static/predefined date because we're working with
+# static md5 checksums.
+
+package TEST;
+
+use strict;
+use warnings;
+
+BEGIN {
+ use Exporter();
+ our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
+
+ $VERSION = 1.00;
+
+ @ISA = qw(Exporter);
+ @EXPORT = qw(&strftime);
+ %EXPORT_TAGS = ( );
+ @EXPORT_OK = qw();
+}
+our @EXPORT_OK;
+
+sub strftime {
+ return "01 Jan 2009";
+}
+
+1;
diff --git a/src/echangelog/test/templates/test.patch b/src/echangelog/test/templates/test.patch
new file mode 100644
index 0000000..72d46fa
--- /dev/null
+++ b/src/echangelog/test/templates/test.patch
@@ -0,0 +1,6 @@
+--- test.patch 2009-04-28 14:13:26.171225175 +0200
++++ test.patch 2009-04-28 14:12:26.246497830 +0200
+@@ -0,0 +1,3 @@
++This is just an example.
++Its used for several echangelog tests.
++
diff --git a/src/echangelog/test/templates/vcstest-0.0.1.ebuild b/src/echangelog/test/templates/vcstest-0.0.1.ebuild
new file mode 100644
index 0000000..2824b83
--- /dev/null
+++ b/src/echangelog/test/templates/vcstest-0.0.1.ebuild
@@ -0,0 +1,16 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+DESCRIPTION="echangelog test ebuild"
+HOMEPAGE=""
+SRC_URI=""
+
+LICENSE=""
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
diff --git a/src/echangelog/test/test.sh b/src/echangelog/test/test.sh
new file mode 100755
index 0000000..f2052f3
--- /dev/null
+++ b/src/echangelog/test/test.sh
@@ -0,0 +1,178 @@
+#!/bin/sh
+
+source /etc/init.d/functions.sh
+
+SUPPORTED_VCS=( "cvs" "svn" "git" )
+VCSTEST="echangelog-test/vcstest"
+_ROOT=$(pwd)
+
+export ECHANGELOG_USER="Just a test <echangelogtest@gentoo.org>"
+
+MD5_INIT="34d54bc2ab1a2154b0c7bd5cdd7f6119"
+MD5_PATCH="db1ab89bb7374824d0f198078f79a83f"
+MD5_REVBUMP="31ddfa60d2ae4dd1fccd7e3d2bd2c06c"
+MD5_COPYRIGHT="6f39fa409ea14bb6506347c53f6dee50"
+MD5_OBSOLETE="0aedadf159c6f3add97a3f79fb867221"
+MD5_FINAL="17eb0df69f501cc6fdaffebd118b7764"
+
+function md5() {
+ local fname=$1
+ echo $(md5sum ${fname} | awk '{ print $1 }')
+}
+
+function ech() {
+ local bin=$1
+ local msg=$2
+
+ perl -I$(dirname $(dirname ${bin})) ${bin} "${msg}"
+}
+
+function make_test() {
+ local root=$1
+ local vcs=$2
+
+ local echangelog="${root}/tmp/echangelog"
+ local tmp="${root}/tmp/${vcs}"
+ local template="${root}/templates"
+
+ cd $root
+ mkdir -p ${tmp}
+ cd ${tmp}
+
+ [[ "${vcs}" == "cvs" ]] && mkdir -p ${tmp}/cvsroot
+ [[ "${vcs}" == "svn" ]] && mkdir -p ${tmp}/svnroot
+
+ if [[ "${vcs}" == "git" ]];
+ then
+ git init
+ touch .gitignore
+ git add .gitignore
+ git commit -a -m 'Initial Commit'
+ elif [[ "${vcs}" == "svn" ]];
+ then
+ svnadmin create svnroot
+ svn co file://${tmp}/svnroot svn
+ cd svn
+ elif [[ "${vcs}" == "cvs" ]];
+ then
+ CVSROOT="${tmp}/cvsroot" cvs init
+ mkdir cvsroot/cvs
+ cvs -d:local:${tmp}/cvsroot co cvs
+ cd cvs
+ fi
+
+ mkdir -p ${VCSTEST}
+
+ cp ${template}/vcstest-0.0.1.ebuild ${VCSTEST}
+ ${vcs} add $(dirname ${VCSTEST})
+ if [[ "${vcs}" == "cvs" ]];
+ then
+ ${vcs} add ${VCSTEST}
+ ${vcs} add "${VCSTEST}/vcstest-0.0.1.ebuild"
+ fi
+
+ cd ${VCSTEST}
+ ech ${echangelog} 'New ebuild for bug <id>.'
+
+ if [[ "${MD5_INIT}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_INIT!"
+ fi
+
+ mkdir files
+ cp ${template}/test.patch files
+ if [[ "${vcs}" == "cvs" ]];
+ then
+ ${vcs} add files/
+ ${vcs} add files/test.patch
+ else
+ ${vcs} add files
+ fi
+
+ ech ${echangelog} "Added adittional patch to fix foo."
+
+ if [[ "${MD5_PATCH}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_PATCH!"
+ fi
+
+ if [[ "${vcs}" == "svn" ]];
+ then
+ ${vcs} commit -m 'New ebuild for bug <id>.' ../
+ else
+ ${vcs} commit -m 'New ebuild for bug <id>.'
+ fi
+
+ [[ "${vcs}" == "cvs" ]] && sed -i -e 's:# $Header\: .*$:# $Header\: $:' ChangeLog
+
+ cp vcstest-0.0.1.ebuild vcstest-0.0.1-r1.ebuild
+ ${vcs} add vcstest-0.0.1-r1.ebuild
+
+ ech ${echangelog} "Revbump..."
+
+ if [[ "${MD5_REVBUMP}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_REVBUMP!"
+ fi
+
+ sed -i -e 's:# Copyright 1999-2009 Gentoo Foundation:# Copyright 1999-2010 Gentoo Foundation:' vcstest-0.0.1.ebuild
+ ech ${echangelog} "Revbump...; Just copyright changed."
+
+ if [[ "${MD5_COPYRIGHT}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_COPYRIGHT!"
+ fi
+
+ if [[ "${vcs}" == "cvs" ]];
+ then
+ rm -f files/test.patch
+ ${vcs} remove files/test.patch
+ else
+ ${vcs} rm files/test.patch
+ fi
+
+ ech ${echangelog} "Revbump...; Just copyright changed; Removed obsolete patch."
+
+ if [[ "${MD5_OBSOLETE}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_OBSOLETE!"
+ fi
+
+ echo>>vcstest-0.0.1.ebuild
+ ech ${echangelog} "Revbump...; Just copyright changed; Removed obsolete patch; Modified more then just the copyright."
+
+ if [[ "${MD5_FINAL}" != "$(md5 ChangeLog)" ]];
+ then
+ eerror "WRONG MD5_FINAL!"
+ fi
+}
+
+[[ -d "${_ROOT}/tmp" ]] && rm -rf ${_ROOT}/tmp
+mkdir -p ${_ROOT}/tmp
+
+ebegin "Preparing echangelog"
+
+if [[ -e ../echangelog ]];
+then
+ cp ../echangelog "${_ROOT}/tmp" || set $?
+ sed -i -e 's:use POSIX qw.*:use POSIX qw(setlocale getcwd);\nuse TEST qw(strftime);:' "${_ROOT}/tmp/echangelog" || set $?
+ eend ${1:-0} || exit ${1}
+else
+ eerror "error"
+ eend ${1:-1}
+ exit 1
+fi
+
+for vcs in ${SUPPORTED_VCS[*]};
+do
+ if [[ -x "$(which ${vcs} 2>/dev/null)" ]];
+ then
+ ebegin "Starting test with ${vcs}"
+ make_test $_ROOT "${vcs}" || set $?
+ eend ${1:-0}
+ else
+ ewarn "No ${vcs} executable found, skipping test..."
+ fi
+done
+
+rm -rf "${_ROOT}/tmp"
diff --git a/src/ego/AUTHOR b/src/ego/AUTHOR
new file mode 100644
index 0000000..36d5bfd
--- /dev/null
+++ b/src/ego/AUTHOR
@@ -0,0 +1 @@
+Aron Griffis <agriffis@gentoo.org>
diff --git a/src/ego/AUTHORS b/src/ego/AUTHORS
new file mode 100644
index 0000000..36d5bfd
--- /dev/null
+++ b/src/ego/AUTHORS
@@ -0,0 +1 @@
+Aron Griffis <agriffis@gentoo.org>
diff --git a/src/ego/ChangeLog b/src/ego/ChangeLog
new file mode 100644
index 0000000..503d0da
--- /dev/null
+++ b/src/ego/ChangeLog
@@ -0,0 +1,2 @@
+2004-15-01 Karl Trygve Kalleberg <karltk@gentoo.org>
+ * Added Makefile
diff --git a/src/ego/Makefile b/src/ego/Makefile
new file mode 100644
index 0000000..b27a2cb
--- /dev/null
+++ b/src/ego/Makefile
@@ -0,0 +1,18 @@
+# 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
+
+all:
+
+dist:
+ mkdir -p ../../$(distdir)/src/ego/
+ cp Makefile AUTHORS README TODO ChangeLog ego ../../$(distdir)/src/ego/
+
+install: all
+ install -d $(docdir)/ego
+ install -m 0644 AUTHORS README ego $(docdir)/ego/
+
diff --git a/src/ego/README b/src/ego/README
new file mode 100644
index 0000000..6c44b4c
--- /dev/null
+++ b/src/ego/README
@@ -0,0 +1,2 @@
+[ -f ${HOME}/scripts/ego.bash ] &&
+alias ego="unalias ego ; source ${HOME}/scripts/ego.bash ; ego "
diff --git a/src/ego/TODO b/src/ego/TODO
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/ego/TODO
diff --git a/src/ego/ego b/src/ego/ego
new file mode 100644
index 0000000..f1691f2
--- /dev/null
+++ b/src/ego/ego
@@ -0,0 +1,86 @@
+echo1() {
+ echo "$1"
+}
+
+ego() {
+ local portdir tmpdir category pkg target
+
+ # This is WAY faster than portageq:
+ # portdir=$(portageq portdir)
+ # tmpdir=$(portageq envvar PORTAGE_TMPDIR)/portage
+ eval $(
+ . /etc/make.globals
+ . /etc/make.conf
+ export PORTDIR PORTAGE_TMPDIR
+ export | sed -n '
+ s/^declare -x PORTDIR=/portdir=/p
+ s/^declare -x PORTAGE_TMPDIR=\(.*\)/tmpdir=\1\/portage/p'
+ )
+
+ case $1 in
+ *-*/*)
+ pkg=${1##*/}
+ category=${1%/*}
+ ;;
+
+ ?*)
+ pkg=$1
+ # require an ebuild so that we can block deprecated packages
+ # such as dev-libs/rep-gtk
+ category=$(echo1 $portdir/*-*/$pkg/*.ebuild)
+ [[ -f $category ]] || category=$(echo1 $portdir/*-*/$pkg*/*.ebuild)
+ [[ -f $category ]] || category=$(echo1 $portdir/*-*/*$pkg/*.ebuild)
+ [[ -f $category ]] || category=$(echo1 $portdir/*-*/*$pkg*/*.ebuild)
+ if [[ ! -f $category ]]; then
+ echo "Can't find $pkg in $portdir" >&2
+ return 1
+ fi
+ pkg=${category%/*}
+ pkg=${pkg##*/}
+ category=${category#$portdir/}
+ category=${category%%/*}
+ ;;
+
+ *)
+ # Check if we're under $portdir first
+ pkg=${PWD##*/}
+ category=${PWD%/*}
+ category=${category##*/}
+ if [[ ! -d $portdir/$category/$pkg ]]; then
+ # Next check if we're in PORTAGE_TMPDIR
+ if [[ $PWD = $tmpdir/* ]]; then
+ pkg=${PWD#$tmpdir/}
+ pkg=${pkg%%/*}
+ pkg=${pkg%%-[0-9]*} # not really a valid assumption
+ category=$(echo1 $portdir/*-*/$pkg/*.ebuild)
+ if [[ ! -f $category ]]; then
+ echo "Can't find $pkg in $portdir" >&2
+ return 1
+ fi
+ category=${category#$portdir/}
+ category=${category%%/*}
+ else
+ echo "syntax: ego [pkgname]" >&2
+ echo "or simply ego from a dir under $portdir or $tmpdir" >&2
+ return 1
+ fi
+ fi
+ ;;
+ esac
+
+ # go to tmpdir or portdir?
+ if [[ $PWD/ = */$category/$pkg/* ]]; then
+ [[ -n $tmpdir ]] || tmpdir=$(portageq envvar PORTAGE_TMPDIR)/portage
+ target=$(command ls -1td $tmpdir/$pkg-* 2>/dev/null | head -n 1)
+ if [[ -z $target ]]; then
+ echo "No matches found for $tmpdir/$pkg-*" >&2
+ return 1
+ fi
+ cd $target/work/$pkg* 2>/dev/null ||
+ cd $target/work 2>/dev/null ||
+ cd $target
+ else
+ cd $portdir/$category/$pkg
+ fi
+}
+
diff --git a/src/ekeyword/AUTHORS b/src/ekeyword/AUTHORS
new file mode 100644
index 0000000..36d5bfd
--- /dev/null
+++ b/src/ekeyword/AUTHORS
@@ -0,0 +1 @@
+Aron Griffis <agriffis@gentoo.org>
diff --git a/src/ekeyword/ChangeLog b/src/ekeyword/ChangeLog
new file mode 100644
index 0000000..68d99e5
--- /dev/null
+++ b/src/ekeyword/ChangeLog
@@ -0,0 +1,46 @@
+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/src/ekeyword/Makefile b/src/ekeyword/Makefile
new file mode 100644
index 0000000..c3aed80
--- /dev/null
+++ b/src/ekeyword/Makefile
@@ -0,0 +1,24 @@
+# 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/src/ekeyword/README b/src/ekeyword/README
new file mode 100644
index 0000000..ec7ff5e
--- /dev/null
+++ b/src/ekeyword/README
@@ -0,0 +1,20 @@
+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/src/ekeyword/TODO b/src/ekeyword/TODO
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/ekeyword/TODO
diff --git a/src/ekeyword/ekeyword b/src/ekeyword/ekeyword
new file mode 100755
index 0000000..002e44b
--- /dev/null
+++ b/src/ekeyword/ekeyword
@@ -0,0 +1,131 @@
+#!/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/src/ekeyword/ekeyword.pod b/src/ekeyword/ekeyword.pod
new file mode 100644
index 0000000..1fac8ef
--- /dev/null
+++ b/src/ekeyword/ekeyword.pod
@@ -0,0 +1,74 @@
+=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/
diff --git a/src/ekeyword2/ekeyword2 b/src/ekeyword2/ekeyword2
new file mode 100755
index 0000000..ce8842d
--- /dev/null
+++ b/src/ekeyword2/ekeyword2
@@ -0,0 +1,96 @@
+#!/usr/bin/python
+
+# Output like:
+# setuptools-0.6_rc9.ebuild
+# < KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd -x86 ~x86-fbsd"
+# ---
+# > KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd x86 ~x86-fbsd"
+
+from __future__ import with_statement
+from sys import argv
+from fnmatch import fnmatch
+from shutil import copyfile
+from os import environ as env
+
+import re
+import string
+
+from portage import settings
+
+STABLE_KEYWORDS = frozenset(settings["PORTAGE_ARCHLIST"].split())
+BROKEN_KEYWORDS = frozenset(['-*'] + ['-'+k for k in STABLE_KEYWORDS])
+TEST_KEYWORDS = frozenset(['~'+k for k in STABLE_KEYWORDS])
+KNOWN_KEYWORDS = STABLE_KEYWORDS | TEST_KEYWORDS | BROKEN_KEYWORDS
+
+argv = set(argv[1:])
+kw_re = re.compile(r'KEYWORDS="([^"]*)"')
+ebuilds = frozenset([x for x in argv if fnmatch(x, '*.ebuild')])
+pretend = bool(argv.intersection(('-p', '--pretend',)))
+keywords = argv.difference(('-p', '--pretend',)) - ebuilds
+
+if not ebuilds:
+ print 'usage: ekeyword [-p|--pretend] [^|~|-][all] [[^|~|-]arch [[^|~|-]arch]...] ebuild [ebuild...]'
+
+for e in ebuilds:
+ # TODO: error handling for file I/O
+ kw = set(keywords)
+ if not pretend:
+ try:
+ copyfile(e, e+'.orig')
+ except IOError:
+ print "Can't copy file %s. Check permissions." % e
+ exit(1)
+ try:
+ with open(e) as c:
+ ebuild = c.read()
+ except IOError:
+ print "Can't open file %s. Aborting." % e
+ exit(1)
+
+ orig = kw_re.search(ebuild)
+ curkw = set(orig.groups()[0].split())
+
+ # ^ or ^all by itself means remove all keywords
+ # (however, other keywords established in the same args still get set.)
+ if kw.intersection(('^', '^all',)):
+ kw -= set(('^', '^all',))
+ curkw = set()
+
+ # ~ or ~all by itself means set ~keyword for all keywords
+ # since ~ expands to "$HOME" in the shell, assume the user meant ~ if we see
+ # the expansion of "$HOME". (Hope there's no user named 'all'.)
+ if kw.intersection(('~', '~all', env['HOME'],)):
+ kw -= set(('~', '~all', env['HOME'],))
+ curkw = set(['~'+k if k in STABLE_KEYWORDS else k for k in curkw])
+
+ for k in kw:
+ # Remove keywords starting with ^
+ if k[0] == '^':
+ curkw -= set((k[1:], '-'+k[1:], '~'+k[1:], ))
+ # Set ~ and - keywords to TEST and BROKEN, respectively
+ elif k[0] == '~' or k[0] == '-':
+ curkw -= set((k[1:], '-'+k[1:], '~'+k[1:], ))
+ curkw |= set((k,))
+ # Set remaining keywords to STABLE
+ else:
+ curkw -= set(('~'+k,))
+ curkw |= set((k,))
+
+ # Sort by arch, then OS (Luckily, this makes -* show up first if it's there)
+ result = 'KEYWORDS="%s"' % ' '.join(sorted(curkw,
+ key=lambda x: x.strip(string.punctuation).lower()))
+
+ if not pretend:
+ try:
+ with open(e, 'w') as rebuild:
+ rebuild.write(kw_re.sub(result, ebuild))
+ except IOError:
+ print "Can't write file %s. Aborting." % e
+ exit(1)
+
+ unknown_keywords = curkw - KNOWN_KEYWORDS
+ if unknown_keywords:
+ print "\nWarning: Unknown keywords '%s'.\n" % ', '.join(sorted(unknown_keywords))
+
+ print '<<< %s' % orig.group()
+ print '>>> %s' % result
diff --git a/src/eviewcvs/AUTHORS b/src/eviewcvs/AUTHORS
new file mode 100644
index 0000000..36d5bfd
--- /dev/null
+++ b/src/eviewcvs/AUTHORS
@@ -0,0 +1 @@
+Aron Griffis <agriffis@gentoo.org>
diff --git a/src/eviewcvs/Makefile b/src/eviewcvs/Makefile
new file mode 100644
index 0000000..ee4208f
--- /dev/null
+++ b/src/eviewcvs/Makefile
@@ -0,0 +1,22 @@
+# Copyright 2005 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+#
+# $Header$
+
+include ../../makedefs.mak
+
+%.1 : %.pod
+ pod2man $< > $@
+
+.PHONY: all
+all: eviewcvs.1
+
+dist: eviewcvs.1
+ mkdir -p ../../$(distdir)/src/eviewcvs/
+ cp Makefile AUTHORS README eviewcvs eviewcvs.pod eviewcvs.1 ../../$(distdir)/src/eviewcvs/
+
+install: all
+ install -m 0755 eviewcvs $(bindir)/
+ install -d $(docdir)/eviewcvs
+ install -m 0644 AUTHORS README $(docdir)/eviewcvs/
+ install -m 0644 eviewcvs.1 $(mandir)/
diff --git a/src/eviewcvs/README b/src/eviewcvs/README
new file mode 100644
index 0000000..c7258d7
--- /dev/null
+++ b/src/eviewcvs/README
@@ -0,0 +1,11 @@
+Most of the documentation is contained in the man-page, which you can
+read directly (using GNU man) by doing
+
+ man ./eviewcvs.1
+
+To rebuild the man-page from pod source, do
+
+ pod2man --name=eviewcvs --center='Gentoolkit' \
+ eviewcvs.pod eviewcvs.1
+
+03 Nov 2004 agriffis
diff --git a/src/eviewcvs/eviewcvs b/src/eviewcvs/eviewcvs
new file mode 100755
index 0000000..280ec0b
--- /dev/null
+++ b/src/eviewcvs/eviewcvs
@@ -0,0 +1,95 @@
+#!/bin/bash
+# $Id$
+#
+# Copyright 2005, Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# Written by Aron Griffis <agriffis@gentoo.org>
+#
+# eviewcvs - generate viewcvs urls for some files
+#
+
+if [[ -t 1 ]]; then
+ blue=""
+ cyan=""
+ green=""
+ red=""
+ off=""
+else
+ unset blue cyan green red off
+fi
+
+startdir="$PWD"
+url="http://sources.gentoo.org/viewcvs.py"
+unset diffs
+declare -a hdr orev
+
+chdir() {
+ cd "$1" || return
+
+ # Figure out where we are, hopefully
+ unset cwd root
+ if [[ -f CVS/Repository ]]; then
+ cwd=$(<CVS/Repository)
+ elif [[ -f .svn/entries ]]; then
+ cwd=$(grep -om1 'url=.*' .svn/entries)
+ cwd=${cwd#*/var/svnroot/}
+ cwd=${cwd%\"*}
+ fi
+}
+
+# Default to all files in directory
+[[ -n $* ]] || set -- *
+
+for f in "$@"; do
+ [[ -f $f ]] || continue
+
+ # Determine the directory settings
+ if [[ $f == */* ]]; then
+ chdir ${f%/*}
+ f=${f##*/}
+ else
+ chdir ${startdir}
+ fi
+
+ # Default to the directory settings
+ fwd=$cwd
+
+ # Get the header for this file, from which we can extract the root,
+ # directory and revision
+ hdr=( $(egrep -m1 -o '\$(Header|Id):[^$]*\$' "$f") )
+ frev=${hdr[2]}
+ case ${hdr[*]} in
+ \$Header:\ /var/cvsroot/*/*\ \$*)
+ fwd=${hdr[1]} # /var/cvsroot/gentoo-src/keychain/keychain.sh,v
+ fwd=${fwd#/var/cvsroot/} # gentoo-src/keychain/keychain.sh,v
+ fwd=${fwd%/*} # gentoo-src/keychain
+ ;;
+ '')
+ if [[ -d CVS ]]; then
+ frev=$(cvs log "$f" 2>/dev/null | awk '/^head:/{print $2}')
+ elif [[ -d .svn ]]; then
+ frev=$(svn info "$f" 2>/dev/null | awk '/^Revision:/{print $2}')
+ fi
+ ;;
+ esac
+ [[ -n ${frev} ]] || continue
+
+ # Here is the simple URL to view it
+ echo "${url}/${fwd:+$fwd/}${green}${f}${off}?rev=${frev}&view=markup"
+
+ # Also supply a diff URL if possible
+ if [[ ${frev##*.} -gt 1 ]]; then
+ orev=( ${frev//./ } ) # convert to array
+ (( orev[${#orev[@]}-1]-- )) # decrement the last element
+ orev=${orev[*]} # convert to string
+ orev=${orev// /.} # revert spaces to dots
+ diffs="${diffs:+$diffs
+}${url}/${fwd:+$fwd/}${blue}${f}${off}?r1=${orev}&r2=${frev}"
+ fi
+done
+
+if [[ -n ${diffs} ]]; then
+ echo "${diffs}"
+fi
+
+# vim:set expandtab sw=4 smarttab:
diff --git a/src/eviewcvs/eviewcvs.pod b/src/eviewcvs/eviewcvs.pod
new file mode 100644
index 0000000..b4403c8
--- /dev/null
+++ b/src/eviewcvs/eviewcvs.pod
@@ -0,0 +1,48 @@
+=head1 NAME
+
+eviewcvs - Gentoo: generate viewcvs URLs
+
+=head1 SYNOPSIS
+
+eviewcvs [ I<files...> ]
+
+=head1 DESCRIPTION
+
+This tool generates a list of viewcvs URLs based on the files listed, or all the
+files in the current directory if the file list is omitted. The first part of
+the output, hilighted in green, is the simple URLs to view the files. The
+second part of the output, hilighted in blue, is the URLs to view the diffs
+against the previous revision.
+
+=head1 OPTIONS
+
+Presently eviewcvs 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 generate viewcvs URLs for a given file:
+
+ $ eviewcvs package.mask
+ http://www.gentoo.org/cgi-bin/viewcvs.cgi/profiles/package.mask?rev=1.3716&content-type=text/vnd.viewcvs-markup
+ http://www.gentoo.org/cgi-bin/viewcvs.cgi/profiles/package.mask?r1=1.3715&r2=1.3716
+
+To generate viewcvs URLs for all files in a directory:
+
+ $ cd portage/net-misc/keychain
+ $ eviewcvs
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/ChangeLog?rev=1.54&view=markup
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/Manifest?rev=1.86&view=markup
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/keychain-2.6.1.ebuild?rev=1.3&view=markup
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/keychain-2.6.2.ebuild?rev=1.1&view=markup
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/metadata.xml?rev=1.3&view=markup
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/ChangeLog?r1=1.53&r2=1.54
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/Manifest?r1=1.85&r2=1.86
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/keychain-2.6.1.ebuild?r1=1.2&r2=1.3
+ http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/keychain/metadata.xml?r1=1.2&r2=1.3
+
+=head1 AUTHOR
+
+This tool was written by Aron Griffis <agriffis@gentoo.org>. Bugs
+found should be filed against me at http://bugs.gentoo.org/
diff --git a/trunk/makedefs.mak b/trunk/makedefs.mak
deleted file mode 100644
index efbc8ce..0000000
--- a/trunk/makedefs.mak
+++ /dev/null
@@ -1,20 +0,0 @@
-# Copyright 2003 Karl Trygve Kalleberg <karltk@gentoo.org>
-# Copyright 2003 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License v2
-#
-# $Header$
-
-# Override this on command line when making a release, ie 'dist'
-
-VERSION=9.9.9
-RELEASE_TAG=
-# python-config is not installed on all arches Bug #113386
-#PYVERSION="`python-config | sed 's/-l//' | sed 's/ -lm.*//'`"
-PYVERSION="`LC_COLLATE=C; python -V 2>&1 | tr '[:upper:]' '[:lower:]' | sed -e 's/ //g;s/\([0-9]\.[0-9]\)\.[0-9]/\1/'`"
-DESTDIR=
-
-docdir=$(DESTDIR)/usr/share/doc/gentoolkit-$(VERSION)$(RELEASE_TAG)
-bindir=$(DESTDIR)/usr/bin
-sbindir=$(DESTDIR)/usr/sbin
-mandir=$(DESTDIR)/usr/share/man/man1
-sysconfdir=$(DESTDIR)/etc