"Fossies" - the Fresh Open Source Software Archive

Member "apt-1.9.4/test/integration/test-bug-767891-force-essential-important" (19 Sep 2019, 3481 Bytes) of package /linux/misc/apt-1.9.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 set -e
    3 
    4 TESTDIR="$(readlink -f "$(dirname "$0")")"
    5 . "$TESTDIR/framework"
    6 setupenvironment
    7 configarchitecture 'amd64' 'i386'
    8 
    9 insertinstalledpackage 'apt' 'amd64' '1'
   10 insertinstalledpackage 'foo' 'amd64,i386' '1' 'Multi-Arch: same'
   11 insertinstalledpackage 'bar' 'amd64' '1' 'Provides: foo'
   12 
   13 insertpackage 'unstable' 'foo2' 'amd64,i386' '1' 'Multi-Arch: same'
   14 
   15 setupaptarchive
   16 
   17 rm -f rootdir/var/cache/apt/*.bin
   18 testsuccessequal 'Reading package lists...
   19 Building dependency tree...
   20 The following packages will be REMOVED:
   21   apt* bar* foo* foo:i386*
   22 WARNING: The following essential packages will be removed.
   23 This should NOT be done unless you know exactly what you are doing!
   24   apt
   25 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
   26 Purg apt [1]
   27 Purg bar [1]
   28 Purg foo [1]
   29 Purg foo:i386 [1]' apt purge apt foo foo:i386 bar -s
   30 
   31 rm -f rootdir/var/cache/apt/*.bin
   32 testsuccessequal 'Reading package lists...
   33 Building dependency tree...
   34 The following packages will be REMOVED:
   35   apt* bar* foo* foo:i386*
   36 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
   37 Purg apt [1]
   38 Purg bar [1]
   39 Purg foo [1]
   40 Purg foo:i386 [1]' apt purge apt foo foo:i386 bar -s -o pkgCacheGen::ForceEssential=''
   41 
   42 msgmsg 'foo:i386 got the Important flag'
   43 rm -f rootdir/var/cache/apt/*.bin
   44 testsuccessequal 'Reading package lists...
   45 Building dependency tree...
   46 The following packages will be REMOVED:
   47   apt* bar* foo* foo:i386*
   48 WARNING: The following essential packages will be removed.
   49 This should NOT be done unless you know exactly what you are doing!
   50   foo foo:i386
   51 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
   52 Purg apt [1]
   53 Purg bar [1]
   54 Purg foo [1]
   55 Purg foo:i386 [1]' apt purge apt foo foo:i386 bar -s -o pkgCacheGen::ForceEssential='foo'
   56 
   57 rm -f rootdir/var/cache/apt/*.bin
   58 testsuccessequal 'Reading package lists...
   59 Building dependency tree...
   60 The following packages will be REMOVED:
   61   apt* bar* foo* foo:i386*
   62 WARNING: The following essential packages will be removed.
   63 This should NOT be done unless you know exactly what you are doing!
   64   apt foo foo:i386
   65 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
   66 Purg apt [1]
   67 Purg bar [1]
   68 Purg foo [1]
   69 Purg foo:i386 [1]' apt purge apt foo foo:i386 bar -s -o pkgCacheGen::ForceEssential::='foo'
   70 
   71 msgmsg 'essentials only from native'
   72 rm -f rootdir/var/cache/apt/*.bin
   73 testsuccessequal 'Reading package lists...
   74 Building dependency tree...
   75 Calculating upgrade...
   76 The following NEW packages will be installed:
   77   foo2
   78 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
   79 Inst foo2 (1 unstable [amd64])
   80 Conf foo2 (1 unstable [amd64])' apt full-upgrade -s -o pkgCacheGen::ForceEssential::='foo2'
   81 
   82 msgmsg 'important only effects installed'
   83 rm -f rootdir/var/cache/apt/*.bin
   84 testsuccessequal 'Reading package lists...
   85 Building dependency tree...
   86 The following packages will be REMOVED:
   87   apt* bar* foo* foo:i386*
   88 WARNING: The following essential packages will be removed.
   89 This should NOT be done unless you know exactly what you are doing!
   90   apt foo foo:i386
   91 0 upgraded, 0 newly installed, 4 to remove and 0 not upgraded.
   92 Purg apt [1]
   93 Purg bar [1]
   94 Purg foo [1]
   95 Purg foo:i386 [1]' apt purge apt foo foo:i386 bar -s -o pkgCacheGen::ForceImportant::='foo'
   96 rm -f rootdir/var/cache/apt/*.bin
   97 testsuccessequal 'Reading package lists...
   98 Building dependency tree...
   99 Calculating upgrade...
  100 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.' apt full-upgrade -s -o pkgCacheGen::ForceImportant::='foo2'