Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144201 - PORTAGE_OVERLAY allows for multiple overlays, but DISTDIR only one
Summary: PORTAGE_OVERLAY allows for multiple overlays, but DISTDIR only one
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-17 06:55 UTC by John (EBo) David
Modified: 2006-08-17 12:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John (EBo) David 2006-08-17 06:55:18 UTC
I have several projects which are managed by seperating each into its own portage overlay.  Setting multipul overlays by setting PORTAGE_OVERLAY="/usr/local/project1 /usr/local/project2 ..." finds the ebuilds as expected, but if the distfiles are put into their associated overlay (eg. /usr/local/project*/distfiles), portage cannot find them unless DISTDIR is set specifically to that directory and only that directory.

DISTDIR only allows for a single directory to be set, not multipul ones similar to PORTAGE_OVERLAY.

The quick workaround is to temporarily set DISTDIR before the ebuild/emerge:

  DISTDIR="/usr/local/project*/distfiles" ebuild bla.ebuild whatever

Not being able to set multipul DISTDIRs is only a minor inconvienance and not critical.
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2006-08-17 07:23:56 UTC
(In reply to comment #0)
> Not being able to set multipul DISTDIRs is only a minor inconvienance and not
> critical.

Maybe you could explain what the point should be having multiple distdirs?

Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-08-17 07:56:30 UTC
I don't get this either. What's the point in having multiple places to dump tarballs to?
Comment 3 Zac Medico gentoo-dev 2006-08-17 08:52:34 UTC
Portage supports filesystem mirrors (they must begin with a "/") via the GENTOO_MIRRORS variable.  The fetch phase will automatically check each of the filesystem mirrors and copy the the necessary files to $DISTDIR.
Comment 4 John (EBo) David 2006-08-17 09:53:40 UTC
To aid project management, I put all project related files (tar-balls included) in the project overlays directory tree.  So, when I ship the project off to someone it is easy to keep everything together and clean.

ex: I am working on a ebuild for a collection of atmospheric models that runs on our departments supercomputer.  This is basically what the overlay looks like --

  /usr/local/portage-cmaq
  /usr/local/portage-cmaq/distfiles
  /usr/local/portage-cmaq/distfiles/M3MODELS.CMAQv4.5.1.tar.gz
  /usr/local/portage-cmaq/distfiles/smoke.Linux2_x86pg.tar.gz
       ...
  /usr/local/portage-cmaq/sci-misc/cmaq
  /usr/local/portage-cmaq/sci-misc/cmaq-smoke
  /usr/local/portage-cmaq/sci-misc/cmaq-ioapi
       ...

Adding /usr/local/portage-cmaq finds the appropriate ebuilds but does not search the distfiles associated with those overlays unless I prepend the ebuild and emerge commands with DISTDIR.  The feature (well maybe it is a sideeffect) that I am using here is the fact that the source is already on my development machine and not part of Gentoo's distribution.  I would rather keep these sources seperate from /usr/portage/distfiles if possible for management purposes.  

I'll try the mirror suggestion and see if I can get that to work and repost.

  Thanks and best regards,  
  EBo
Comment 5 John (EBo) David 2006-08-17 10:21:23 UTC
Adding http://localhost to GENTOO_MIRRORS resolves to /usr/portage/distfiles which does not search the distfiles in all overlays.

Also the point of what I am doing is not to *download* the tarballs to multipul places, but to *search* for the tarballs in multipul places (specificly in the distfiles of all overlays).  If portage finds the named tarball in any of the overlay distfiles it uses that one (honoring CRC restrictions of course).
Comment 6 Zac Medico gentoo-dev 2006-08-17 10:27:51 UTC
(In reply to comment #5)
> Also the point of what I am doing is not to *download* the tarballs to multipul
> places, but to *search* for the tarballs in multipul places (specificly in the
> distfiles of all overlays).  If portage finds the named tarball in any of the
> overlay distfiles it uses that one (honoring CRC restrictions of course).

for example, GENTOO_MIRRORS="/usr/local/portage/distfiles http://gentoo.osuosl.org"
Comment 7 John (EBo) David 2006-08-17 12:08:49 UTC
> example, GENTOO_MIRRORS="/usr/local/portage/distfiles ..."

DOH! boy I feel stupid.  I thought I had to have an http, ftp, or rsync prepended and misunderstood your earlier comment about the leading "/".

That worked.  Thanks Zac and sorry for the mental fog...