From c290bb70ac546a8629ffcf00c8cb0f5c64cef9aa Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 26 Jul 2011 14:19:56 +0100 Subject: [PATCH] adt-run: make apt install our binaries even if they're downgrades --- TODO | 2 -- runner/adt-run | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 2537e28..6be98c4 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ -- infinite priority to local repo - not needed for demo: - file bugs against pbuilder-satisfydepends diff --git a/runner/adt-run b/runner/adt-run index a1996e6..6bd2a21 100755 --- a/runner/adt-run +++ b/runner/adt-run @@ -1358,8 +1358,10 @@ END def apt_configs(b): return { - "Dir::Etc::sourcelist": b.dir.read(True)+'sources.list', "Debug::pkgProblemResolver": "true", + "APT::Get::force-yes" : "true", + "APT::Get::Assume-Yes" : "true", + "quiet" : "true", } def _configure_apt(b, tb): @@ -1369,9 +1371,19 @@ END for (k,v) in b.apt_configs().iteritems(): print >>f, '%s { "%s"; };' % (k, v) f.close() + config.read(True) + + prefs = OutputFile('apt-prefs','/etc/apt/preferences.d/90autopkgtest', + True) + print >>open(prefs.write(),'w'), ''' +Package: * +Pin: origin "" +Pin-Priority: 1002 +''' + prefs.read(True) def _apt_get(b): - ag = ['apt-get','-qy'] + ag = ['apt-get','-q'] for kv in b.apt_configs().iteritems(): ag += ['-o', '%s=%s' % kv] return ' '.join(ag) @@ -1436,8 +1448,7 @@ END script = ''' exec 3>&1 >&2 apt-key add archive-key.pgp - echo "deb file://'''+apt_source+''' /" >sources.list - cat /etc/apt/sources.list >>sources.list + echo "deb file://'''+apt_source+''' /" >/etc/apt/sources.list.d/autopkgtest.list if [ "x`ls /var/lib/dpkg/updates`" != x ]; then echo >&2 "/var/lib/dpkg/updates contains some files, aargh"; exit 1 fi -- 2.30.2