mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH v3] Detect changes in package patch series
Date: Mon, 27 Aug 2018 19:13:01 +0200	[thread overview]
Message-ID: <20180827171301.qgacagsa3w4ifnbs@pengutronix.de> (raw)
In-Reply-To: <20180827155925.wvseamg2tnmdpltl@pengutronix.de>

On Mon, Aug 27, 2018 at 05:59:25PM +0200, Michael Olbrich wrote:
> On Fri, Aug 03, 2018 at 04:41:56AM -0400, jon@ringle.org wrote:
> > From: Jon Ringle <jringle@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	other threads:[~2018-08-27 17:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03  8:41 jon
2018-08-03  8:50 ` Uwe Kleine-König
2018-08-03  9:02   ` Jon Ringle
2018-08-03 10:01     ` Uwe Kleine-König
2018-08-27 15:59 ` Michael Olbrich
2018-08-27 17:13   ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180827171301.qgacagsa3w4ifnbs@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox