Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-portage-dev
I recently posted a question in the Portage & Programming forum and was told
that this mailing list might be the place to go. Any help would be greatly
appreciated.
I have a custom in-house web based source code/packaging repository system
that I need to integrate into ebuilds. It is kind of like a funky cvs
system. Source code and packages are all viewed or downloaded via a
browser.
For example, to retrieve a gzipped tarball of a package named "mypackage"
from the repository looks like:
http://codeserver.wherever.net/pman/package_ids.php?action=package&id=10105
On any standard browser (konqueror, IE, firefox) this would retrieve a file
named "mypackage.tar.gz".
Here is where my problem starts, and why I believe a custom eclass might be
my best route.
The utility that fetches packages via emerge mangles the resulting file
name, as well as wget (does emerge use wget?). When fetching the above url,
emerge or wget saves the file as "package_ids.php?action=package&id=10105".
This of course throws a wrench into my use of custom ebuilds :)
Currently I route around the problem with a stupid hack in my ebuilds:
##mypackage-20051006.ebuild
#MY_P="mypackage.tar.gz"
#DESCRIPTION="My example package"
#HOMEPAGE="http://codeserver.wherever.net/pman/package_ids.php?action=package&id=1015"
#SRC_URI=""
#RESTRICT="fetch nostrip"
#...snip...
#src_install() {
# wget "${HOMEPAGE}" -O ${WORKDIR}/${MY_P} || die "could not fetch
#distfile"
# cd ${WORKDIR} || die "cd ${WORKDIR}"
# tar xfz ${MY_P} || die "Failed to extract ${MY_P}"
# mv "${WORKDIR}/etc" "${D}/" || die "mv etc"
# mv "${WORKDIR}/var" "${D}/" || die "mv /var"
#}
What I would like to do is create a custom elcass that allows me to replace
the "standard" ebuild package fetching routines. It would need to:
1) Check that the source tarball does not already exist.
2) If the correct source tarball does not already exist, fetch it using
something like wget -O source.tar.gz
3) Rename source.tar.gz to ${DISTDIR}/${PN}-${PV}.tar.gz
My problem is that I cannot seem to locate where any package fetching
routines are in any of the existing eclasses to use as a template. Another
thing I am curious about, will custom eclasses in PORTDIR_OVERLAY work
correctly (assuming they are written correctly).
If anyone could point me in the right direction I would certainly appreciate
it.
|
|