chiark
/
gitweb
/
~ianmdlvl
/
autopkgtest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adt-run: make apt install our binaries even if they're downgrades
[autopkgtest.git]
/
runner
/
adt-run
diff --git
a/runner/adt-run
b/runner/adt-run
index a1996e670bba2af82940634db95aafc0dc3429ae..6bd2a21811de74bc74e9a28d0dc6058d7965480e 100755
(executable)
--- a/
runner/adt-run
+++ b/
runner/adt-run
@@
-1358,8
+1358,10
@@
END
def apt_configs(b):
return {
def apt_configs(b):
return {
- "Dir::Etc::sourcelist": b.dir.read(True)+'sources.list',
"Debug::pkgProblemResolver": "true",
"Debug::pkgProblemResolver": "true",
+ "APT::Get::force-yes" : "true",
+ "APT::Get::Assume-Yes" : "true",
+ "quiet" : "true",
}
def _configure_apt(b, tb):
}
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()
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):
def _apt_get(b):
- ag = ['apt-get','-q
y
']
+ ag = ['apt-get','-q']
for kv in b.apt_configs().iteritems():
ag += ['-o', '%s=%s' % kv]
return ' '.join(ag)
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
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
if [ "x`ls /var/lib/dpkg/updates`" != x ]; then
echo >&2 "/var/lib/dpkg/updates contains some files, aargh"; exit 1
fi