Cmnt: [{B, D, E, F}/master-next 1/2] UBUNTU: [Packaging] dkms -- try launchpad librarian for pool downloads

Andy Whitcroft apw at canonical.com
Wed Nov 6 17:22:45 UTC 2019


On Mon, Nov 04, 2019 at 01:48:36PM -0300, Marcelo Henrique Cerri wrote:
> On Fri, Nov 01, 2019 at 09:48:21PM +0000, Andy Whitcroft wrote:
> > When we build a kernel we capture the current dkms package versions.
> > This allows us to keep the versions syncronised in an entire SRU cycle
> > between the master and derivative kernels.  It also allows us to maintain
> > the same versions on respin.  This suffers from the issue that they may
> > expire from the archive pool if the dkms packages are revved.
> > 
> > The same packages are available in the launchpad librarian and indeed
> > (now) via well known names.  So when are attempting to download from the
> > archive pool first attempt to get the package from the primary archive
> > librarian first.  If this fails continue to do the pool scan as normal.
> > This increases the chance we will find an appropriate package regardless
> > of the currently published packages, whilst retaining the ability to build
> > in a more restricted environment (such as when we have no internet access).
> > 
> > BugLink: http://bugs.launchpad.net/bugs/1850958
> > Signed-off-by: Andy Whitcroft <apw at canonical.com>
> > ---
> >  debian/scripts/dkms-build | 98 ++++++++++++++++++++++++---------------
> >  1 file changed, 60 insertions(+), 38 deletions(-)
> > 
> > diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build
> > index 08c1a8fa1bd4..3c3c28f75c43 100755
> > --- a/debian/scripts/dkms-build
> > +++ b/debian/scripts/dkms-build
> > @@ -26,56 +26,78 @@ built_using_record()
> >  	sed -i -e "s/^\(linux:BuiltUsing=.*\)/\1$built_using, /" "$subst"
> >  }
> >  
> > +# ABI: returns present in $? and located path in lpackage_path when found.
> > +package_present()
> > +{
> > +	for lpackage_path in "$1"_*.deb
> 
> In general it looks good. I would make this variable local and use the
> opportunity to cleanup the shellcheck errors.

The variable is documented as one of the return values for this
function.  Making it local would break that.

I am trying to do as few changes as possible to the script in this
update.

-apw



More information about the kernel-team mailing list