summaryrefslogtreecommitdiff
path: root/package/pkg-download.mk
AgeCommit message (Collapse)Author
2012-07-22Package downloads: allow restricting to primary site onlyThomas De Schampheleire
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>
2012-07-22pkg-download.mk: support detection of URI schemes in DOWNLOADThomas De Schampheleire
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>
2012-07-22pkg-download.mk: use stripurischeme function in localfiles download methodThomas De Schampheleire
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-07-22pkg-download.mk: allow using localfiles outside of package infrastructureThomas De Schampheleire
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>
2012-07-01pkg-download: handle interrupted wget downloadsArnout Vandecappelle
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>
2012-05-23pkg-download.mk: Add missing argument when downloading from primary mirror (scp)Thomas De Schampheleire
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>
2012-05-05pkg-download.mk: Add missing argument when downloading from primary mirrorMarkos Chandras
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>
2012-04-19pkg-*.mk: add some comments, update some existing commentsThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-04-19Split Makefile.package.in in pkg-download.mk, pkg-utils.mk and pkg-gentargets.mkThomas Petazzoni
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>