Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147349 - Document local filesystem support for GENTOO_MIRRORS
Summary: Document local filesystem support for GENTOO_MIRRORS
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-12 11:23 UTC by Michael Helmling
Modified: 2022-10-20 02:42 UTC (History)
2 users (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 Michael Helmling 2006-09-12 11:23:17 UTC
Hello,
I like to clean up my /usr/portage/distfiles from time to time with a simple rm * command, if it gets me too large.
But, if I have to re-emerge some set of packages, it annoys me that I have to manually download some of the fetch restricted stuff again - mainly java. It would be nice if portage had an extra folder, maybe a subfolder of distfiles, where it stores fetch restricted files, so they can easily be distinguished from normal, free files for cleanup reasons.
Just a small feature wish. ;)
Comment 1 Zac Medico gentoo-dev 2006-09-12 11:32:14 UTC
You could use portage's ability to fetch from filesystem mirrors.  If you put one or more directory paths in GENTOO_MIRRORS, portage will automatically copy distfiles from there during the fetch phase.  Anything in GENTOO_MIRRORS that starts with / is considered a filesystem mirror.
Comment 2 Michael Helmling 2006-09-12 12:36:10 UTC
Ok, this sounds good, didn't know about that. Pretty much makes this bug obsolete, except that it would be somewhat easier for not-too-serious gentoo users if portage would use a different folder without any extra configuration. But I admit, that solution would be a bit unaesthetic, too.
Comment 3 Zac Medico gentoo-dev 2006-09-12 12:59:49 UTC
We can treat this as a documentation bug, since the feature is undocumented.
Comment 4 Michael Helmling 2006-09-12 13:07:02 UTC
Doesn't seem to work; I created /usr/portage/distfiles/fetch-restricted and put jdk-1.5.0-doc.zip inside. My GENTOO_MIRRORS has an "/usr/portage/distfiles/fetch-restricted" entry, but:

# emerge java-sdk-docs
Calculating dependencies... done!

>>> Emerging (1 of 1) dev-java/java-sdk-docs-1.5.0-r1 to /

!!! dev-java/java-sdk-docs-1.5.0-r1 has fetch restriction turned on.
!!! This probably means that this ebuild's files must be downloaded
!!! manually.  See the comments in the ebuild for more information.

 * Please download jdk-1_5_0-doc.zip from
 * http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-1.5.0-doc-oth-JPR&SiteId=JSC&TransactionId=noreg
 * and place it in /usr/portage/distfiles named as
 * jdk-1_5_0-doc-r1.zip. Notice the r1. Because Sun changes the doc zip file
 * without changing the filename, we have to resort to renaming to keep
 * the md5sum verification working existing and new downloads.
 *
 * If emerge fails because of a md5sum error it is possible that Sun
 * has again changed the upstream release, try downloading the file
 * again or a newer revision if available. Otherwise report this to
 * http://bugs.gentoo.org/67266 and we will make a new revision.


From emerge --info:

GENTOO_MIRRORS="/usr/portage/distfiles/fetch-restricted/ http://gentoo.ITDNet.net/gentoo http://mirror.uni-c.dk/pub/gentoo/"
Comment 5 Zac Medico gentoo-dev 2006-09-12 13:58:57 UTC
(In reply to comment #4)
>  * and place it in /usr/portage/distfiles named as
>  * jdk-1_5_0-doc-r1.zip. Notice the r1. Because Sun changes the doc zip file
>  * without changing the filename, we have to resort to renaming to keep
>  * the md5sum verification working existing and new downloads.

You have to rename the file.
Comment 6 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-12 16:29:56 UTC
The disadvantage of this local mirror thing is that fetch copies the files, doubling the space needed. Maybe it could just symlink?
Comment 7 Zac Medico gentoo-dev 2006-09-12 22:38:44 UTC
I suppose a symlink would be manageable.  We'd have to check for a broken link on each fetch and recreate it if necessary.
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2006-09-13 08:33:43 UTC
Be careful of the networked filesystem users... Fex, a possible real world case would be the gentoo user whom has a notebook that needs updating, a file server with all the distfiles needed and those distfiles mounted somewhere. A quick emerge -uDNf world before heading home to continue working and update in the background...

A contrived case but not completely unimaginable. I guess if it's documented in the release notes though...
Comment 9 Zac Medico gentoo-dev 2006-09-13 10:09:39 UTC
(In reply to comment #8)
> A contrived case but not completely unimaginable. I guess if it's documented in
> the release notes though...

Still, it seems like it would be turning the fetch phase into something different than originally intended.  I suppose we could extend the DISTDIR variable to allow multiple paths.  Portage already creates a fake DISTDIR full of symlinks anyway, for use in the ebuild environment.
Comment 10 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 08:37:57 UTC
I'd be more inclined to use hardlinks and if that fails fall back to copy.
Comment 11 Marius Mauch (RETIRED) gentoo-dev 2007-06-06 23:44:59 UTC
Don't like the idea of multiple entries for DISTDIR btw as then you'd also need a way to specify the one to use for fetching (might not be the same you specified first for reading).