On Mon, Aug 27, 2018 at 05:59:25PM +0200, Michael Olbrich wrote:
> On Fri, Aug 03, 2018 at 04:41:56AM -0400, j...@ringle.org wrote:
> > From: Jon Ringle <jrin...@gridpoint.com>
> > 
> > For a long time it has bothered me that if a package's patches were changed
> > ptxdist would not detect this change and I would often have old versions of
> > *-dev.tar.gz packages that got used because the packages patches were
> > updated.
> > 
> > This commit solves this problem.
> > 
> > Here's how it works:
> > 1) In the package rule makefile add `${PKG}_SERIES_SHA256 :=`
> > 2) extract the package and from the packages src dir do `git ptx-patches`
> >    This will populate the rule makefile _SERIES_SHA256 value
> > 3) Anytime you make a patch change to a package and do `git ptx-patches`
> >    the series file gets updated with the `git rev-parse HEAD` value which
> >    causes the series file to have a new sha256 value and therefore a new
> >    value gets populated in the rule makefile, which then causes the package
> >    to be rebuilt and the *-dev.tar.gz package will have a different cfghash
> >    in the filename
> 
> This is rather limited. I've been thinking about a more general solution:
> 
> I'd like to hash all patches + series during extract and create a stamp
> file (like the one for the rules and options) during 'extract'. And save
> some data to recreate the hash:
> - list of all possible patch dirs (in case of new patches in the BSP)
> - relative paths to patches and series.
> 
> I think we can recreate the hashes for all enabled packages with this with
> reasonable startup overhead.
> 
> Then depend on the new stamp with the extract stage. This will need some
> extra checks, so we don't loose local changes:
> - make it optional
> - abort before deleting the source tree if there is a .git
> Stuff like this.
> 
> And of course add the hash to the config/rules hash for *-dev.tar.gz.

... and this last step won't work, because we cannot calculate the correct
hash without running 'extract' first :-/. I need to think about this some
more.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to