]> git.saurik.com Git - apt.git/blame_incremental - test/integration/test-security-no-remote-status
Merge pull request julian-klode/apt#3 from adrian17/master
[apt.git] / test / integration / test-security-no-remote-status
... / ...
CommitLineData
1#!/bin/sh
2#
3# Test that packages from remote sources cannot set the Status field.
4#
5set -e
6
7TESTDIR="$(readlink -f "$(dirname "$0")")"
8. "$TESTDIR/framework"
9setupenvironment
10configarchitecture 'amd64'
11
12TMPDIR=$(readlink -f .)
13
14insertpackage 'unstable' 'pretends-installed' 'all' '1' 'Status: install ok installed'
15insertinstalledpackage 'really-installed' 'all' '1'
16setupaptarchive
17
18testequal "pretends-installed:
19 Installed: (none)
20 Candidate: 1
21 Version table:
22 1 500
23 500 file:${TMPDIR}/aptarchive unstable/main all Packages" aptcache policy pretends-installed
24
25testequal "really-installed:
26 Installed: 1
27 Candidate: 1
28 Version table:
29 *** 1 100
30 100 ${TMPDIR}/rootdir/var/lib/dpkg/status" aptcache policy really-installed