[kteam-tools][PATCH 4/4] git-build-kernel: debuild source packages with suitable -vversion

Kamal Mostafa kamal at canonical.com
Wed Aug 1 17:49:26 UTC 2018


On Wed, Aug 01, 2018 at 06:03:25PM +0200, Kleber Souza wrote:
> On 07/19/18 21:50, Kamal Mostafa wrote:
> > Determine latest released package version in <series>-updates and supply
> > it to dpkg-genchanges via debuild -vversion.
> > 
> > Signed-off-by: Kamal Mostafa <kamal at canonical.com>
> > ---
> >  git-build-kernel/git-build-kernel | 18 ++++++++++++++++--
> >  1 file changed, 16 insertions(+), 2 deletions(-)
> > 
> > diff --git a/git-build-kernel/git-build-kernel b/git-build-kernel/git-build-kernel
> > index cfad062..0d5414a 100755
> > --- a/git-build-kernel/git-build-kernel
> > +++ b/git-build-kernel/git-build-kernel
> > @@ -95,6 +95,15 @@ then
> >      CHROOT="${CHROOT%.git}"
> >  fi
> >  
> > +### Find the appropriate -v{version} value for dpkg-genchanges
> > +[ $do_source_pkg = 1 ] && {
> > +    updates_version=$(rmadison -s ${DISTRO}-updates $SRCPKG | grep 'source$' | awk '{print $3}')
> > +    if [ -n "$updates_version" ]
> > +    then srcpkg_debopts="-v$updates_version"
> 
> There's a catch here with the backport packages. When the
> update-from-*-master script is run, it syncs the changelog of the
> backport tree with the master tree and adds the
> "~<target-series>.<build-number>" prefix to the current version number.
> That means we end up losing the previous  backported versions on the
> changelog. So when using the output from rmadision with backport
> packages, dpkg-genchanges will add more entries than we really want.
> 
> The fix would be to remove everything that comes after "~" with
> something like:
> 
> srcpkg_debopts="-v${updates_version%~*}"

Yup, I'll add a special-case for that in the [v2] submission.

Thanks!

 -Kamal




More information about the kernel-team mailing list