From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-la0-x231.google.com ([2a00:1450:4010:c03::231]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1W6lBw-00067E-1l for ptxdist@pengutronix.de; Fri, 24 Jan 2014 19:09:21 +0100 Received: by mail-la0-f49.google.com with SMTP id y1so2749873lam.8 for ; Fri, 24 Jan 2014 10:09:13 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1390586381-19896-1-git-send-email-jon@ringle.org> References: <1390586381-19896-1-git-send-email-jon@ringle.org> Date: Fri, 24 Jan 2014 13:09:13 -0500 Message-ID: From: Jon Ringle Subject: Re: [ptxdist] [PATCHv4] ptxdist getdev: Download dev packages from ${PTXCONF_PROJECT_DEVMIRROR} Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Fri, Jan 24, 2014 at 12:59 PM, wrote: > From: Jon Ringle > > This patch allows you to setup a dev package mirror to hold *-dev.tar.gz > packages. > > Upload your *-dev.tar.gz packages to your mirror, then you can avoid > rebuilding all your packages by doing: > > ptxdist getdev > > Signed-off-by: Jon Ringle > --- > bin/ptxdist | 5 +++++ > rules/post/ptxd_make_world_get.make | 9 +++++++++ > rules/project-name.in | 9 +++++++++ > scripts/lib/ptxd_lib_dgen.awk | 7 +++++++ > scripts/lib/ptxd_make_get.sh | 15 ++++++++------- > 5 files changed, 38 insertions(+), 7 deletions(-) > > diff --git a/bin/ptxdist b/bin/ptxdist > index f9cbdec..663c41e 100755 > --- a/bin/ptxdist > +++ b/bin/ptxdist > @@ -1789,6 +1789,11 @@ EOF > fi > exit > ;; > + getdev) > + check_premake && > + ptxd_make_log getdev > + exit > + ;; > go|images) > do_${cmd} > exit > diff --git a/rules/post/ptxd_make_world_get.make b/rules/post/ptxd_make_world_get.make > index 152674c..b99102f 100644 > --- a/rules/post/ptxd_make_world_get.make > +++ b/rules/post/ptxd_make_world_get.make > @@ -26,6 +26,11 @@ $(SRCDIR)/%: > @$(call targetinfo) > @$(call get, $($@)) > > +ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR)),) > +$(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/%-dev.tar.gz: > + @$(call targetinfo) > + @$(call getdev, $@) > +endif > > $(STATEDIR)/%.get: > @$(call targetinfo) > @@ -59,4 +64,8 @@ get = \ > check_src = \ > ptxd_make_check_src "$($(strip $(1))_SOURCE)" "$($(strip $(1))_MD5)" > > +getdev = \ > + ptxd_make_get_nofail=y \ > + ptxd_make_get "$(strip $(1))" "$(call remove_quotes, $(PTXCONF_PROJECT_DEVMIRROR))/$(notdir $(1))" > + > # vim: syntax=make > diff --git a/rules/project-name.in b/rules/project-name.in > index f546458..d1cd09a 100644 > --- a/rules/project-name.in > +++ b/rules/project-name.in > @@ -180,4 +180,13 @@ config PROJECT_DEVPKGDIR > depends on PROJECT_USE_DEVPKGS > default "/opt/OSELAS.BSP/${PTXCONF_PROJECT_VENDOR}/OSELAS.BSP-${PTXCONF_PROJECT_VENDOR}-${PTXCONF_PROJECT}${PTXCONF_PROJECT_VERSION}" > > +config PROJECT_DEVMIRROR > + string > + prompt "Mirror for pre-build archives" > + depends on PROJECT_USE_DEVPKGS > + help > + Enter a URL where *-dev.tar.gz packages can be downloaded > + Use: ptxdist getdev > + > + > endmenu > diff --git a/scripts/lib/ptxd_lib_dgen.awk b/scripts/lib/ptxd_lib_dgen.awk > index 7f790c9..6cd60e2 100644 > --- a/scripts/lib/ptxd_lib_dgen.awk > +++ b/scripts/lib/ptxd_lib_dgen.awk > @@ -241,6 +241,13 @@ function write_deps_pkg_all(this_PKG, this_pkg) { > # .get rule > # > print "$(STATEDIR)/" this_pkg ".get: $(" this_PKG "_SOURCES)" > DGEN_DEPS_POST; > + print "ifneq ($(call remove_quotes, $(PTXCONF_PROJECT_DEVMIRROR)),)" > DGEN_DEPS_POST; > + print "ifneq ($($(" this_PKG "_DEVPKG)),NO)" > DGEN_DEPS_POST; > + print "ifneq ($(" this_PKG "_CFGHASH),)" > DGEN_DEPS_POST; > + print "getdev: $(call remove_quotes, $(PTXCONF_PROJECT_DEVPKGDIR))/$(" this_PKG "_DEVPKG)" > DGEN_DEPS_POST; > + print "endif" > DGEN_DEPS_POST; > + print "endif" > DGEN_DEPS_POST; > + print "endif" > DGEN_DEPS_POST; > } > > function write_deps_pkg_active(this_PKG, this_pkg, prefix) { > diff --git a/scripts/lib/ptxd_make_get.sh b/scripts/lib/ptxd_make_get.sh > index f4d7922..1ce913f 100644 > --- a/scripts/lib/ptxd_make_get.sh > +++ b/scripts/lib/ptxd_make_get.sh > @@ -285,7 +285,7 @@ ptxd_make_get() { > argv[${#argv[@]}]="${url}" > mrd=true > ;; > - ${PTXCONF_SETUP_PTXMIRROR}/*) > + ${PTXCONF_SETUP_PTXMIRROR}/*|${PTXCONF_PROJECT_DEVMIRROR}/*) I moved this to where you asked me to, but now since mrd is conditionally set, it is always replacing PTXCONF_SETUP_PTXMIRROR for the DEVMIRROR. When I had it on the previous case in the switch, it would not do that. This brings me back to the other issue I'm having http://article.gmane.org/gmane.comp.embedded.ptxdist.devel/10980 > # if mirror is given us to download, add it, but only once > if ! ${mrd}; then > argv[${#argv[@]}]="${url}" > @@ -397,11 +397,12 @@ ptxd_make_get() { > esac > done > > - echo > - echo "Could not download package" > - echo "URL: ${orig_argv[@]}" > - echo > - exit 1 > + if [ "${ptxd_make_get_nofail}" != "y" ]; then > + echo > + echo "Could not download package" > + echo "URL: ${orig_argv[@]}" > + echo > + exit 1 > + fi > } > - > export -f ptxd_make_get > -- > 1.7.10.4 > -- ptxdist mailing list ptxdist@pengutronix.de