[Buildroot] customize package: odd copy construction

Michael S. Zick minimod at morethan.org
Thu Jan 5 16:27:02 UTC 2012


On Thu January 5 2012, Thomas Petazzoni wrote:
> Le Thu, 5 Jan 2012 16:23:23 +0100,
> Thomas De Schampheleire <patrickdepinguin+buildroot at gmail.com> a écrit :
> 
> > The customize uses an odd copy construction that I can't really explain:
> > 
> >         rm -f $(BUILD_DIR)/series
> >         (cd $(CUST_DIR); \
> >          /bin/ls -d * > $(BUILD_DIR)/series || \
> >          touch $(BUILD_DIR)/series )
> >         for f in `cat $(BUILD_DIR)/series`; do \
> >                 cp -af $(CUST_DIR)/$$f $(TARGET_DIR); \
> >         done
> >         rm -f $(BUILD_DIR)/series
> > 
> > This was changed from:
> >         -cp -af $(CUST_DIR)/* $(TARGET_DIR)/
> > 
> > in the following commit:
> > http://git.buildroot.org/buildroot/commit/?id=06cc62f9cfbe43e9d31a07667a6af905b5f34a42
> > 
> > Why would you create a series file first if you're removing it
> > immediately afterwards?
> > Doesn't the original copy statement do exactly the same?
> 

It looks to me as if the intent was in the handling of symbolic links.
ls -d * does not dereference symbolic links.

Mike
> I don't know, but I'm not sure this customize package is good example
> these days. It should probably be removed, or changed to something
> saner that uses the package infrastructure.
> 
> Thomas





More information about the buildroot mailing list