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. ;)
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.
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.
We can treat this as a documentation bug, since the feature is undocumented.
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/"
(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.
The disadvantage of this local mirror thing is that fetch copies the files, doubling the space needed. Maybe it could just symlink?
I suppose a symlink would be manageable. We'd have to check for a broken link on each fetch and recreate it if necessary.
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...
(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.
I'd be more inclined to use hardlinks and if that fails fall back to copy.
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).