aboutsummaryrefslogtreecommitdiffstats
path: root/package/pkg-download.mk
Commit message (Collapse)AuthorAgeFilesLines
* pkg-download.mk: fix multiple matches in shallow clone testDanomi Manchego2012-12-091-1/+1
| | | | | | | | | | | | Move the git reference directly to git-ls-remote rather than piping the output to grep, to help avoid reporting partial matches rather than the actual requested reference. Also, add quotes to protest "test" from failing when multiple strings are reported. Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-download.mk: Fix shallow cloneStephan Hoffmann2012-12-021-3/+10
| | | | | | | | | | | | | | | | Some git versions (e.g. 1.7.0) do not treat trying to shallow clone a non existing branch or tag as a fatal error but report a warning and clone HEAD instead. Thus the fallback mechanism does not work in this case. This patch introduces a check for the presence of the requested version as a branch or tag before trying the shallow clone. It also removes the need to do two clones when a sha1 is given as a packege version. [Peter: use cut -f2-] Signed-off-by: Stephan Hoffmann <sho@relinux.de> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-download: Make a shallow clone for git downloadsArnout Vandecappelle (Essensium/Mind)2012-11-041-1/+4
| | | | | | | | | | | | | | | When downloading from git, we clone the whole repository and then only use the latest commit. That's a lot of redundant stuff. So instead, make a shallow clone. Unfortunately that's only possible when downloading a branch or tag, so fall back to the old method if git gives an error. This speeds up the cloning of a linux git from more than 2 hours to 20 minutes on a 200KB/s link). Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Acked-by: Luca Ceresoli <luca@lucaceresoli.net> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-download: allow relative BR2_DL_DIRPeter Korsgaard2012-09-101-1/+10
| | | | | | And move the BUILDROOT_DL_DIR override here as well for consistency. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Package downloads: allow restricting to primary site onlyThomas De Schampheleire2012-07-221-2/+5
| | | | | | | | | | | | | | | | | | | This patch adds a new config option BR2_PRIMARY_SITE_ONLY that, when set, restricts package downloads to the specified BR2_PRIMARY_SITE. If the package is not present on the primary site, the download fails. This is useful for project developers who want to ensure that the project can be built even if the upstream tarball locations disappear. [thomas.petazzoni@free-electrons.com: Extend config option help message with more details coming from the commit log. Added a dependency on the fact that a primary site has been defined. Without any primary site (the default configuration), this new option does not make any sense.] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download.mk: support detection of URI schemes in DOWNLOADThomas De Schampheleire2012-07-221-1/+6
| | | | | | | | | | | | | | | | | When using one of the package infrastructures, the DOWNLOAD function uses $(PKG)_SITE_METHOD to determine the appropriate download method, which is autodetected based on the URI if none was explicitly set. When the DOWNLOAD function is called directly, for example when downloading a toolchain, or from a package that does not use one of the package infrastructures, the SITE_METHOD is not autodetected, and thus the download defaults to wget. This patch adds URI scheme detection directly to the DOWNLOAD method, in case no SITE_METHOD was detected yet. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download.mk: use stripurischeme function in localfiles download methodThomas De Schampheleire2012-07-221-2/+2
| | | | | Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download.mk: allow using localfiles outside of package infrastructureThomas De Schampheleire2012-07-221-4/+4
| | | | | | | | | | | | | | The localfiles download method uses $($(PKG)_SITE))) and $($(PKG)_SOURCE) instead of $(1) and $(2). This means that it can only be used for package downloads (through gentargets, autotargets, ...) and not for other downloads like external toolchains. This patch changes localfiles to allow this, just as the wget and scp download methods already did. For the version control download methods, nothing changes. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* pkg-download: handle interrupted wget downloadsArnout Vandecappelle2012-07-011-3/+6
| | | | | | | | | | | | | | | When a wget download is interrupted, the downloaded file is still created. It will therefore not be re-downloaded in the next build, and the extraction will fail. To avoid this, download to a temporary file first and rename when the download is successful. The existing mechanism doesn't work for interrupted downloads because the whole sub-shell is interrupted, so the rm-part never gets executed. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-download.mk: Add missing argument when downloading from primary mirror (scp)Thomas De Schampheleire2012-05-231-1/+1
| | | | | | | This problem was already fixed by Markos Chandras for wget, but not for scp. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-download.mk: Add missing argument when downloading from primary mirrorMarkos Chandras2012-05-051-1/+1
| | | | | | Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* pkg-*.mk: add some comments, update some existing commentsThomas Petazzoni2012-04-191-0/+9
| | | | | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
* Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mkThomas Petazzoni2012-04-191-0/+219
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>