]>
git.saurik.com Git - apt.git/blob - test/integration/test-allow
   3 # Test for --allow-remove-essential and friends replacing --force-yes 
   7 TESTDIR
="$(readlink -f "$(dirname $0)")" 
  10 configarchitecture 'amd64' 
  12 insertpackage 'unstable' 'downgrade' 'all' '1' 
  13 insertinstalledpackage 'downgrade' 'all' '2' 
  15 insertpackage 'unstable' 'hold' 'all' '2' 
  16 insertinstalledpackage 'hold' 'all' '1' 
  18 insertinstalledpackage 'essential' 'all' '1' 'Essential: yes' 
  22 testsuccess aptmark hold hold 
  24 # Test --allow-remove--essential 
  26 testfailureequal 'Reading package lists... 
  27 Building dependency tree... 
  28 The following packages will be REMOVED: 
  30 WARNING: The following essential packages will be removed. 
  31 This should NOT be done unless you know exactly what you are doing! 
  33 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. 
  34 E: Essential packages were removed and -y was used without --allow-remove-essential.' aptget remove essential -y -s 
  36 testsuccessequal 'Reading package lists... 
  37 Building dependency tree... 
  38 The following packages will be REMOVED: 
  40 WARNING: The following essential packages will be removed. 
  41 This should NOT be done unless you know exactly what you are doing! 
  43 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. 
  44 Remv essential [1]' aptget remove essential -y --allow-remove-essential -s 
  46 # Test --allow-change-held-packages (should not influence dist-upgrade, but an install) 
  48 testsuccessequal 'Reading package lists... 
  49 Building dependency tree... 
  50 Calculating upgrade... 
  51 The following packages have been kept back: 
  53 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.' aptget dist-upgrade --allow-change-held-packages -s 
  55 testfailureequal 'Reading package lists... 
  56 Building dependency tree... 
  57 The following held packages will be changed: 
  59 The following packages will be upgraded: 
  61 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
  62 E: Held packages were changed and -y was used without --allow-change-held-packages.' aptget install hold -y -s 
  64 testfailureequal 'Reading package lists... 
  65 Building dependency tree... 
  66 The following held packages will be changed: 
  68 The following packages will be upgraded: 
  70 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
  71 E: Held packages were changed and -y was used without --allow-change-held-packages.' aptget install hold -y  -s 
  73 testsuccessequal 'Reading package lists... 
  74 Building dependency tree... 
  75 The following held packages will be changed: 
  77 The following packages will be upgraded: 
  79 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 
  80 Inst hold [1] (2 unstable [all]) 
  81 Conf hold (2 unstable [all])' aptget install hold -y  -s --allow-change-held-packages 
  83 # Test --allow-downgrades 
  85 testfailureequal 'Reading package lists... 
  86 Building dependency tree... 
  87 The following packages will be DOWNGRADED: 
  89 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded. 
  90 E: Packages were downgraded and -y was used without --allow-downgrades.' aptget install downgrade=1 -y -s 
  92 testsuccessequal 'Reading package lists... 
  93 Building dependency tree... 
  94 The following packages will be DOWNGRADED: 
  96 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 1 not upgraded. 
  97 Inst downgrade [2] (1 unstable [all]) 
  98 Conf downgrade (1 unstable [all])' aptget install downgrade=1 --allow-downgrades -y -s