FS#7271 - [patch] option for avoiding caching netfiles

Attached to Project: Pacman
Opened by gyo (gyo) - Friday, 25 May 2007, 16:48 GMT
Last edited by Dan McGee (toofishes) - Saturday, 14 July 2007, 22:01 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To Aaron Griffin (phrakture)
Architecture All
Severity Medium
Priority Normal
Reported Version 3.0.4
Due in Version 3.1.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Here is a patch in order add an option to makepkg for avoiding caching network files that are defined into the source=() directive.

There is a command line option and a makepkg.conf directive for this:
- command line option : -H
- makepkg.conf directive : NOCACHE=1

By default, caching is enable (i.e. NOCACHE=0)

This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 14 July 2007, 22:01 GMT
Reason for closing:  Implemented
Additional comments about closing:  implemented in GIT, although slightly different than the title inplies. see comments for details.
Comment by Dan McGee (toofishes) - Wednesday, 30 May 2007, 19:15 GMT
Interesting, although the proliferation of command line options begins again. Thoughts from anyone else?
Comment by Aaron Griffin (phrakture) - Wednesday, 30 May 2007, 19:43 GMT
I don't know how I feel about it. Shouldn't this, in essence, be a cleanup task (part of -c or perhaps -cc ?)?
Comment by Dan McGee (toofishes) - Wednesday, 30 May 2007, 20:32 GMT
Good point, it seems kind of odd to do this as a one-off operation when building a package. I'd be fine with closing without implementing.
Comment by gyo (gyo) - Thursday, 31 May 2007, 09:32 GMT
I made this patch in order to safe space on disk for those who haven't big disk/haven't a lot a space left on disk, think about OOo/Kde/Firefox/Kernel/"another big netfile source".
Comment by Dan McGee (toofishes) - Thursday, 31 May 2007, 14:26 GMT
Disc space is cheap...bandwidth is not for everyone. A pacman cache is likely a bigger disk user than one source package will ever be. Is running makepkg -c all that hard (or even deleting the source manually)?
Comment by Aaron Griffin (phrakture) - Thursday, 31 May 2007, 15:10 GMT
Well my point was that makepkg -c doesn't cleanup the downloaded source and it doesn't sound like a good default really. Perhaps we could add on another -c for cleaning source as well? makepkg -cc?
Comment by Dan McGee (toofishes) - Thursday, 31 May 2007, 15:49 GMT
Um...makepkg -C?
Comment by Aaron Griffin (phrakture) - Thursday, 31 May 2007, 16:19 GMT
After talking this over with Dan, I will recant what I said.
I think this is already handled as well as it could be with a combo of setting SRCDEST and using makepkg -C
Comment by gyo (gyo) - Friday, 01 June 2007, 08:49 GMT
Ok, -C option cleans SRCDEST but in the meanwhile, netfiles are duplicated and during the duplication + extraction process of these files and you can running out of space on your disk.
Moreover, this patch is small and it's a KISS peace of code that doesn't deeply modify makepkg.
Comment by Dan McGee (toofishes) - Friday, 01 June 2007, 13:02 GMT
Why don't we fix the real problem then- the duplication? It would seem awfully counterintuitive to me to build a whole package, forget a configure flag, and then have to re-download the source because of it. Keep in mind that the disk space of the extracted source far exceeds that of the compressed source, that is the bigger problem...

I just don't see this being something that is needed by a large number of users- disk space is cheap, and deleting one tarball doesn't do a whole lot, even if it is 100MB (which means it will be way bigger when extracted).
Comment by gyo (gyo) - Friday, 01 June 2007, 15:19 GMT
Mm?? What you say is false, my patch doesn't delete netfiles just after decompression, it just avoids netfiles to be duplicated in SRCDEST (for those who want) and netfiles still exists in $startdir/src, that's all folks. So if makepkg process fails and you relaunch makepkg, netfiles aren't downloaded again..
Comment by Dan McGee (toofishes) - Friday, 01 June 2007, 15:25 GMT
Ahh, I see. Well why don't we address the real problem then? For any files downloaded, store them only in SRCDEST instead of SRCDEST and src/. This should be possible, no?
Comment by gyo (gyo) - Friday, 01 June 2007, 15:37 GMT
In fact, makepkg download those files in working directory src/ and then do a copy to SRCDEST, for local files makepkg copy SRCDEST to src/
Comment by Roman Kyrylych (Romashka) - Friday, 01 June 2007, 16:28 GMT
IMO it should do in an opposite way:
download sources to SCRDEST, then extract to src/ (without copying)
Comment by Dan McGee (toofishes) - Monday, 09 July 2007, 05:02 GMT
Anyone want to make a patch against GIT makepkg incorporating Roman's good suggestion above?

Loading...