[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 2/3] adt-run: add --upgrade-to option for upgrade tests



On Sat, Jun 28, 2014 at 04:26:11PM +0200, Martin Pitt wrote:
> Hello Antonio,
> 
> Antonio Terceiro [2014-06-27 21:17 -0300]:
> > +        add_sources = '''awk 'BEGIN { done = 0 } /^deb / { if (done==0) { $3 = "%s"; print; done=1 }}' ''' \
> > +            '''/etc/apt/sources.list > /etc/apt/sources.list.d/%s.list''' % (suite, suite)
> 
> This must not only apply to the first line, but to all lines which
> contain the current release. OTOH this must ignore apt sources which
> do *not* apply to the currently running release code name, such as any
> third-party or local or backports source or sources which already
> apply to a different release. E. g. it's not uncommon to have a
> deb-src for unstable on a wheezy machine for easy building of
> backports with apt-get source -b.
> 
> Supposedly this should call lsb_release or parse /etc/lsb-release
> (although this counts as an implementation detail). Unfortunately the
> code name of the currently running release isn't in /etc/os-release.

Right. I will look into it.

> > +        upgrade = '((apt-get update || (sleep 15; apt-get update)) && apt-get dist-upgrade -y -o Dpkg::Options::="--force-confnew") 2>&1'
> 
> Aren't conffile prompts for unmodified packages something which
> upgrade tests ought to detect? That's a rather important part of the
> upgrade tests that we do in Ubuntu, as often config files become
> conffiles (and cause a prompt), or vice-versa conffiles become
> orphaned. At least the first case ought to be caught as conffile
> prompts for (humanly) unmodified files are a nuisance and confusing.

TBH that bit was more or less just copied and pasted from what the
--apt-upgrade option does so I didn't put much thought into this part
yet. I should probably just drop the -o I guess?

> > +        global testbed
> > +        testbed.needs_reset()
> 
> Just "self.needs-reset()" will do. :-)

oh yes, it is right there 2 lines below ? *facepalm*

-- 
Antonio Terceiro <terceiro at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20140628/79a2199a/attachment.sig>


Reply to: