I've used g-cpan.pl a couple of times and decided that it would be nice if it would automatically keep the created ebuild in my portage overlay directory. I have created the following patch that does this by default. If PORTDIR_OVERLAY is not defined, then it will revert to the current behavior of creating a temporary overlay and then removing it when completed. This patch also incorporates the patch to bug# 43259 so that a manifest is generated for the created ebuild. Reproducible: Always Steps to Reproduce: 1. Run g-cpan.pl <some perl module> 2. g-cpan.pl creates ebuilds and installs perl module Actual Results: g-cpan.pl removes created ebuilds Expected Results: g-cpan.pl places created ebuilds in defined portage overlay directory Portage 2.0.51_pre17 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20040619-r1, 2.6.7-gentoo-r13 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz) ================================================================= System uname: 2.6.7-gentoo-r13 i686 Intel(R) Pentium(R) 4 CPU 1.80GHz Gentoo Base System version 1.5.2 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux26-headers-2.6.7-r4 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O2 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache fixpackages sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X acpi alsa arts artswrappersuid audiofile avi berkdb cdr crypt cups dvd encode fam fbcon foomaticdb gdbm gif gpm gtk gtk2 imlib java javascript jpeg kde libg++ libwww mad mbox mikmod mmx motif mozilla moznocompose moznoirc moznomail mpeg ncurses nls nptl oggvorbis opengl pam pda pdflib perl png ppds python qt quicktime readline sasl sdl slang spell sse ssl tcltk tcpd tiff truetype usb x86 xml2 xmms xv zlib linguas_en"
Created attachment 37438 [details, diff] Create ebuilds in PORTDIR_OVERLAY
Why do you want to hold onto the ebuild? /me would just fish it out of the binpkg or /var/db/pkg/*/*
Mainly so I don't have to go fishing for it in /var/db/pkg. Secondly I like to occasionally tinker with things and having the ebuild already in the overlay gives me the base to start. Additionally, without the ebuild present in an overlay I have seen emerge complain or not completely work the way it was intended. As an example: If I want to rebuild the system using emerge -e world - Portage doesn't know about any ebuilds created by g-cpan.pl and those modules will not be rebuilt. It basically creates the same problems as those created when an ebuild is removed from the tree. The solution that I've always seen posted when an ebuild isn't in the tree is to place it in your overlay directory. So my thinking is to place it there in the first place to help avoid those problems.
Bug has been fixed and released in stable portages on or before 2.0.51-r2