You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test-multiarch-foreign 11 KiB

implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
implement dpkgs vision of interpreting pkg:<arch> dependencies How the Multi-Arch field and pkg:<arch> dependencies interact was discussed at DebConf15 in the "MultiArch BoF". dpkg and apt (among other tools like dose) had a different interpretation in certain scenarios which we resolved by agreeing on dpkg view – and this commit realizes this agreement in code. As was the case so far libapt sticks to the idea of trying to hide MultiArch as much as possible from individual frontends and instead translates it to good old SingleArch. There are certainly situations which can be improved in frontends if they know that MultiArch is upon them, but these are improvements – not necessary changes needed to unbreak a frontend. The implementation idea is simple: If we parse a dependency on foo:amd64 the dependency is formed on a package 'foo:amd64' of arch 'any'. This package is provided by package 'foo' of arch 'amd64', but not by 'foo' of arch 'i386'. Both of those foo packages provide each other through (assuming foo is M-A:foreign) to allow a dependency on 'foo' to be satisfied by either foo of amd64 or i386. Packages can also declare to provide 'foo:amd64' which is translated to providing 'foo:amd64:any' as well. This indirection over provides was chosen as the alternative would be to teach dependency resolvers how to deal with architecture specific dependencies – which violates the design idea of avoiding resolver changes, especially as architecture-specific dependencies are a cornercase with quite a few subtil rules. Handling it all over versioned provides as we already did for M-A in general seems much simpler as it just works for them. This switch to :any has actually a "surprising" benefit as well: Even frontends showing a package name via .Name() [which doesn't show the architecture] will display the "architecture" for dependencies in which it was explicitely requested, while we will not show the 'strange' :any arch in FullName(true) [= pretty-print] either. Before you had to specialcase these and by default you wouldn't get these details shown. The only identifiable disadvantage is that this complicates error reporting and handling. apt-get's ShowBroken has existing problems with virtual packages [it just shows the name without any reason], so that has to be worked on eventually. The other case is that detecting if a package is completely unknown or if it was at least referenced somewhere needs to acount for this "split" – not that it makes a practical difference which error is shown… but its one of the improvements possible.
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. #!/bin/sh
  2. set -e
  3. TESTDIR="$(readlink -f "$(dirname "$0")")"
  4. . "$TESTDIR/framework"
  5. setupenvironment
  6. configarchitecture 'amd64' 'i386' 'armel'
  7. insertpackage 'unstable' 'cool-foo' 'amd64,i386' '1.0' 'Depends: foo'
  8. insertpackage 'unstable' 'cool-foo-x64' 'amd64' '1.0' 'Depends: foo:amd64'
  9. insertpackage 'unstable' 'cool-foo-x32' 'amd64' '1.0' 'Depends: foo:i386'
  10. insertpackage 'unstable' 'hates-foo' 'amd64,i386' '1.0' 'Conflicts: foo'
  11. insertpackage 'unstable' 'hates-foo-x64' 'amd64' '1.0' 'Conflicts: foo:amd64'
  12. insertpackage 'unstable' 'hates-foo-x32' 'amd64' '1.0' 'Conflicts: foo:i386'
  13. insertpackage 'unstable' 'foo' 'amd64,i386,armel' '1.0' 'Multi-Arch: foreign'
  14. insertpackage 'unstable' 'cool-bar' 'amd64,i386' '1.0' 'Depends: bar-provider'
  15. insertpackage 'unstable' 'cool-bar-x64' 'amd64' '1.0' 'Depends: bar-provider:amd64'
  16. insertpackage 'unstable' 'cool-bar-x32' 'amd64' '1.0' 'Depends: bar-provider:i386'
  17. insertpackage 'unstable' 'hates-bar' 'amd64,i386' '1.0' 'Conflicts: bar-provider'
  18. insertpackage 'unstable' 'hates-bar-x64' 'amd64' '1.0' 'Conflicts: bar-provider:amd64'
  19. insertpackage 'unstable' 'hates-bar-x32' 'amd64' '1.0' 'Conflicts: bar-provider:i386'
  20. insertpackage 'unstable' 'bar' 'amd64,i386,armel' '1.0' 'Provides: bar-provider
  21. Multi-Arch: foreign'
  22. setupaptarchive
  23. testsuccessequal 'Reading package lists...
  24. Building dependency tree...
  25. The following additional packages will be installed:
  26. foo
  27. The following NEW packages will be installed:
  28. cool-foo:i386 foo
  29. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  30. Inst foo (1.0 unstable [amd64])
  31. Inst cool-foo:i386 (1.0 unstable [i386])
  32. Conf foo (1.0 unstable [amd64])
  33. Conf cool-foo:i386 (1.0 unstable [i386])' aptget install cool-foo:i386 -s
  34. testsuccessequal 'Reading package lists...
  35. Building dependency tree...
  36. The following NEW packages will be installed:
  37. cool-foo foo:i386
  38. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  39. Inst foo:i386 (1.0 unstable [i386])
  40. Inst cool-foo (1.0 unstable [amd64])
  41. Conf foo:i386 (1.0 unstable [i386])
  42. Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:i386 -s
  43. testsuccessequal 'Reading package lists...
  44. Building dependency tree...
  45. The following NEW packages will be installed:
  46. cool-foo foo:armel
  47. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  48. Inst foo:armel (1.0 unstable [armel])
  49. Inst cool-foo (1.0 unstable [amd64])
  50. Conf foo:armel (1.0 unstable [armel])
  51. Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:armel -s
  52. testsuccessequal 'Reading package lists...
  53. Building dependency tree...
  54. The following additional packages will be installed:
  55. bar
  56. The following NEW packages will be installed:
  57. bar cool-bar:i386
  58. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  59. Inst bar (1.0 unstable [amd64])
  60. Inst cool-bar:i386 (1.0 unstable [i386])
  61. Conf bar (1.0 unstable [amd64])
  62. Conf cool-bar:i386 (1.0 unstable [i386])' aptget install cool-bar:i386 -s
  63. testsuccessequal 'Reading package lists...
  64. Building dependency tree...
  65. The following NEW packages will be installed:
  66. bar:i386 cool-bar
  67. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  68. Inst bar:i386 (1.0 unstable [i386])
  69. Inst cool-bar (1.0 unstable [amd64])
  70. Conf bar:i386 (1.0 unstable [i386])
  71. Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:i386 -s
  72. testsuccessequal 'Reading package lists...
  73. Building dependency tree...
  74. The following NEW packages will be installed:
  75. bar:armel cool-bar
  76. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  77. Inst bar:armel (1.0 unstable [armel])
  78. Inst cool-bar (1.0 unstable [amd64])
  79. Conf bar:armel (1.0 unstable [armel])
  80. Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:armel -s
  81. testsuccessequal "Reading package lists...
  82. Building dependency tree...
  83. Note, selecting 'bar:i386' instead of 'bar-provider:i386'
  84. The following NEW packages will be installed:
  85. bar:i386 cool-bar
  86. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  87. Inst bar:i386 (1.0 unstable [i386])
  88. Inst cool-bar (1.0 unstable [amd64])
  89. Conf bar:i386 (1.0 unstable [i386])
  90. Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider:i386 -s
  91. satisfiable_in_singlearch() {
  92. testsuccessequal 'Reading package lists...
  93. Building dependency tree...
  94. The following additional packages will be installed:
  95. foo
  96. The following NEW packages will be installed:
  97. cool-foo foo
  98. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  99. Inst foo (1.0 unstable [amd64])
  100. Inst cool-foo (1.0 unstable [amd64])
  101. Conf foo (1.0 unstable [amd64])
  102. Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 -s
  103. testsuccessequal 'Reading package lists...
  104. Building dependency tree...
  105. The following NEW packages will be installed:
  106. cool-foo foo
  107. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  108. Inst foo (1.0 unstable [amd64])
  109. Inst cool-foo (1.0 unstable [amd64])
  110. Conf foo (1.0 unstable [amd64])
  111. Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo:amd64 foo:amd64 -s
  112. testsuccessequal 'Reading package lists...
  113. Building dependency tree...
  114. The following additional packages will be installed:
  115. bar
  116. The following NEW packages will be installed:
  117. bar cool-bar
  118. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  119. Inst bar (1.0 unstable [amd64])
  120. Inst cool-bar (1.0 unstable [amd64])
  121. Conf bar (1.0 unstable [amd64])
  122. Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 -s
  123. testsuccessequal 'Reading package lists...
  124. Building dependency tree...
  125. The following NEW packages will be installed:
  126. bar cool-bar
  127. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  128. Inst bar (1.0 unstable [amd64])
  129. Inst cool-bar (1.0 unstable [amd64])
  130. Conf bar (1.0 unstable [amd64])
  131. Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar:amd64 bar:amd64 -s
  132. testsuccessequal "Reading package lists...
  133. Building dependency tree...
  134. Note, selecting 'bar' instead of 'bar-provider'
  135. The following NEW packages will be installed:
  136. bar cool-bar
  137. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  138. Inst bar (1.0 unstable [amd64])
  139. Inst cool-bar (1.0 unstable [amd64])
  140. Conf bar (1.0 unstable [amd64])
  141. Conf cool-bar (1.0 unstable [amd64])" aptget install cool-bar bar-provider -s
  142. testsuccessequal 'Reading package lists...
  143. Building dependency tree...
  144. The following additional packages will be installed:
  145. foo
  146. The following NEW packages will be installed:
  147. cool-foo-x64 foo
  148. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  149. Inst foo (1.0 unstable [amd64])
  150. Inst cool-foo-x64 (1.0 unstable [amd64])
  151. Conf foo (1.0 unstable [amd64])
  152. Conf cool-foo-x64 (1.0 unstable [amd64])' aptget install cool-foo-x64 -s
  153. }
  154. hatersgonnahate() {
  155. BADPREFIX='Reading package lists...
  156. Building dependency tree...
  157. Some packages could not be installed. This may mean that you have
  158. requested an impossible situation or if you are using the unstable
  159. distribution that some required packages have not yet been created
  160. or been moved out of Incoming.
  161. The following information may help to resolve the situation:
  162. '
  163. testfailureequal "$BADPREFIX
  164. The following packages have unmet dependencies:
  165. hates-foo : Conflicts: foo
  166. Conflicts: foo:i386
  167. Conflicts: foo:armel
  168. E: Unable to correct problems, you have held broken packages." aptget install $1 hates-foo -s
  169. testfailureequal "$BADPREFIX
  170. The following packages have unmet dependencies:
  171. $2 : Conflicts: foo:$4
  172. E: Unable to correct problems, you have held broken packages." aptget install $1 $2 -s
  173. testsuccessequal "Reading package lists...
  174. Building dependency tree...
  175. The following NEW packages will be installed:
  176. $1 $3
  177. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  178. Inst $1 (1.0 unstable [$4])
  179. Inst $3 (1.0 unstable [amd64])
  180. Conf $1 (1.0 unstable [$4])
  181. Conf $3 (1.0 unstable [amd64])" aptget install $1 $3 -s
  182. }
  183. hatersgonnahate 'foo' 'hates-foo-x64' 'hates-foo-x32' 'amd64'
  184. hatersgonnahate 'foo:i386' 'hates-foo-x32' 'hates-foo-x64' 'i386'
  185. testsuccessequal 'Reading package lists...
  186. Building dependency tree...
  187. The following additional packages will be installed:
  188. foo:i386
  189. The following NEW packages will be installed:
  190. cool-foo-x32 foo:i386
  191. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  192. Inst foo:i386 (1.0 unstable [i386])
  193. Inst cool-foo-x32 (1.0 unstable [amd64])
  194. Conf foo:i386 (1.0 unstable [i386])
  195. Conf cool-foo-x32 (1.0 unstable [amd64])' aptget install cool-foo-x32 -s
  196. testsuccessequal 'Reading package lists...
  197. Building dependency tree...
  198. The following additional packages will be installed:
  199. bar:i386
  200. The following NEW packages will be installed:
  201. bar:i386 cool-bar-x32
  202. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  203. Inst bar:i386 (1.0 unstable [i386])
  204. Inst cool-bar-x32 (1.0 unstable [amd64])
  205. Conf bar:i386 (1.0 unstable [i386])
  206. Conf cool-bar-x32 (1.0 unstable [amd64])' aptget install cool-bar-x32 -s
  207. testsuccessequal 'Reading package lists...
  208. Building dependency tree...
  209. The following additional packages will be installed:
  210. bar
  211. The following NEW packages will be installed:
  212. bar cool-bar-x64
  213. 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
  214. Inst bar (1.0 unstable [amd64])
  215. Inst cool-bar-x64 (1.0 unstable [amd64])
  216. Conf bar (1.0 unstable [amd64])
  217. Conf cool-bar-x64 (1.0 unstable [amd64])' aptget install cool-bar-x64 -s
  218. satisfiable_in_singlearch
  219. msgmsg 'switch to single architecture'
  220. configarchitecture 'amd64'
  221. satisfiable_in_singlearch
  222. msgmsg 'switch to multi-arch with barbarian architecture'
  223. insertinstalledpackage 'foo' 'armhf' '1.0' 'Multi-Arch: foreign'
  224. insertinstalledpackage 'bar' 'armhf' '1.0' 'Provides: bar-provider
  225. Multi-Arch: foreign'
  226. insertinstalledpackage 'bar-needer' 'armhf' '1.0' 'Depends: bar-provider'
  227. testsuccess aptget check
  228. testsuccessequal 'Reading package lists...
  229. Building dependency tree...
  230. The following additional packages will be installed:
  231. foo
  232. The following packages will be REMOVED:
  233. foo:armhf
  234. The following NEW packages will be installed:
  235. cool-foo foo
  236. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  237. Remv foo:armhf [1.0]
  238. Inst foo (1.0 unstable [amd64])
  239. Inst cool-foo (1.0 unstable [amd64])
  240. Conf foo (1.0 unstable [amd64])
  241. Conf cool-foo (1.0 unstable [amd64])' aptget install cool-foo -s
  242. testsuccessequal 'Reading package lists...
  243. Building dependency tree...
  244. The following additional packages will be installed:
  245. bar
  246. The following packages will be REMOVED:
  247. bar:armhf
  248. The following NEW packages will be installed:
  249. bar cool-bar
  250. 0 upgraded, 2 newly installed, 1 to remove and 0 not upgraded.
  251. Remv bar:armhf [1.0] [bar-needer:armhf ]
  252. Inst bar (1.0 unstable [amd64])
  253. Inst cool-bar (1.0 unstable [amd64])
  254. Conf bar (1.0 unstable [amd64])
  255. Conf cool-bar (1.0 unstable [amd64])' aptget install cool-bar -s
  256. # a barbarian doesn't satisfy another either
  257. insertinstalledpackage 'bar-needer2' 's390x' '1.0' 'Depends: bar-provider'
  258. testfailure aptget check