FS#8890 - separate download and build stages for offline mode (cvs/svn PKGBUILDs)
Attached to Project:
Pacman
Opened by Mildred (mildred) - Tuesday, 11 December 2007, 01:27 GMT
Last edited by Allan McRae (Allan) - Friday, 10 August 2012, 04:56 GMT
Opened by Mildred (mildred) - Tuesday, 11 December 2007, 01:27 GMT
Last edited by Allan McRae (Allan) - Friday, 10 August 2012, 04:56 GMT
|
Details
Currently, cvs/svn packages do the checkout 'or the update)
in the build function regardless of whenever the user is
connected to the Internet and can fetch the sources. So I
propose to add an option to makepkg that would tell him not
to download the sources and use what's already downloaded
(and of course if something is missing, stop the buid
process).
And to allow cvs/svn/whatever package to be built this way, a variable like $do_download should be set to tell the PKGBUILD whenever it is allowed to connect to the internet to fetch the source or whenever it should only use what has been downloaded so far. To allow someone to download the source but not build it (just keep it there for a later build), makepkg would need another option like --onlydownload. And we have to figure out a way to tell PKGBUILD to act acordingly. We could set like previously a variable $do_build if you have better ideas, please tell. |
This task depends upon
Closed by Allan McRae (Allan)
Friday, 10 August 2012, 04:56 GMT
Reason for closing: Implemented
Additional comments about closing: https://projects.archlinux.org/pacman.gi t/commit/?id=024bc44a
Friday, 10 August 2012, 04:56 GMT
Reason for closing: Implemented
Additional comments about closing: https://projects.archlinux.org/pacman.gi t/commit/?id=024bc44a
$ makepkg --help
makepkg (pacman) 3.1.0devel
Usage: /usr/bin/makepkg [options]
Options:
<snip>
-e, --noextract Do not extract source files (use existing src/ dir)
<snip>
-o, --nobuild Download and extract files only
<snip>
I think we could generalize the way makepkg works a bit more. Andrew had a patch for a while that added a separate install() function that would be the only part of makepkg to run under fakeroot. Perhaps we could add an optional prep() section as well?
Your solution seems great, just add pref and install functions. And to be backwards compatible, provide default implementation that does nothing.
FS#7816