hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radar Da lei <r...@pivotal.io>
Subject Re: Replace git submodule with git clone + file with commit number?
Date Wed, 06 Jul 2016 13:03:29 GMT
There might be a better way, but I don't think let user run a script before
make is a good idea.

This makefile is not so complex yet so I feel this way is ok.

Thanks.

Regards,
Radar

On Wed, Jul 6, 2016 at 7:35 PM, Gmail <xunzhangthu@gmail.com> wrote:

> I think the method using git clone is fine.
>
> But I suggest we'd better keep the makefile readable. I mean we should not
> add too trivial shell logic inside makefile itself. For example, write a
> shell or Python script for users. Users should run the script before
> building HAWQ if they need to install this libraries.
>
> I also wonder what's the typical solution for similar problems of other
> Apache projects. Do they use git sub module? How do they solve this in
> their release?
>
> xunzhang
>
> Send from my iPhone
>
> > 在 2016年6月29日,18:18,Guo Gang <paulguo@gmail.com> 写道:
> >
> > I'm proposing this change because:
> >
> > 1) We are ready to release the first apache release with "source
> tarball",
> > but
> >   submodule is not friendly to source tarball since git submodule
> >  require a git parent.
> >
> > 2) With more and more development, I found that submodule mechanism
> >   is not that friendly for development, e.g.
> >
> >   If the commit number of one submodule is modified, it is hard to detect
> >   this for Makefile. We need to manually update it in an old repo. If
> >   using "git clone", we could easily detect update by set a commit number
> > file
> >   as dependency and thus easily update the code.
> >
> >  Some developers have complained the annoying output in "git status"
> >  after building submodules. With "git clone" we can easily mask those
> >  directories via .gitignore.
> >
> >  It is hard for developers who is not familiar with submodule (Frankly
> > speaking
> >  I really do not think submodule is friendly) to manipulate related
> > directories
> >  when necessary.
> >
> > While with the "git clone" solution, we save the commit of previous
> > submodule in a file,
> > and the related Makefile code change is rather simple, e.g. for
> gp-xerces.
> >
> > $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp:
> > $(ORCA_SRC_PATH)/gp-xerces.commit
> >   rm -f $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp
> >
> > gp-xerces_prepare: $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp
> >   if [ ! -f $(ORCA_BLD_PATH)/gp-xerces_prepare_timestamp ]; then \
> >       [ "x$(gp_xerces_commit)" != "x" ] || exit 1; \
> >       cd $(abs_top_srcdir)/$(subdir); mkdir -p gp-xerces; cd gp-xerces; \
> >       [ ! -d .git ] && git clone
> > https://github.com/greenplum-db/gp-xerces.git .; \
> >       git reset --hard $(gp_xerces_commit) || exit 2; \
> >       touch $(ORCA_BLD_PATH)/gp_xerces_prepare_timestamp; \
> >   fi
> >
> > With above code change, if I update gp-xerces commit number in the commit
> > file
> > gp-xerces.commit make will trigger an auto-build, If I messed up the
> > gp-xerces directory
> > I can easily remove the whole gp-xerces, or just remove the timestamp
> file
> > gp-xerces_prepare_timestamp to trigger an auto build.
> >
> > Any suggestion? Thanks.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message