[pacman-dev] [PATCH 1/2] Add test to check for indirect optdepend removal
Allan McRae
allan at archlinux.org
Sat Dec 21 04:44:39 EST 2013
On 21/12/13 05:10, Chirantan Ekbote wrote:
> If package brown-sugar provides package sugar and package coffee
> optionally depends on sugar, pacman should print a warning when
> brown-sugar is removed.
>
That is fine. I will pull this when we get the event sorted.
For future reference, the test if added in a patch before the fix needs
to have:
self.expectfailure = True
at the bottom. This line is removed when the fix gets added.
> Signed-off-by: Chirantan Ekbote <chirantan.ekbote at gmail.com>
> ---
> test/pacman/tests/TESTS | 1 +
> test/pacman/tests/remove072.py | 14 ++++++++++++++
> 2 files changed, 15 insertions(+)
> create mode 100644 test/pacman/tests/remove072.py
>
> diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
> index fc6a7e8..6c56268 100644
> --- a/test/pacman/tests/TESTS
> +++ b/test/pacman/tests/TESTS
> @@ -112,6 +112,7 @@ TESTS += test/pacman/tests/remove052.py
> TESTS += test/pacman/tests/remove060.py
> TESTS += test/pacman/tests/remove070.py
> TESTS += test/pacman/tests/remove071.py
> +TESTS += test/pacman/tests/remove072.py
> TESTS += test/pacman/tests/replace100.py
> TESTS += test/pacman/tests/replace101.py
> TESTS += test/pacman/tests/replace102.py
> diff --git a/test/pacman/tests/remove072.py b/test/pacman/tests/remove072.py
> new file mode 100644
> index 0000000..0a29b39
> --- /dev/null
> +++ b/test/pacman/tests/remove072.py
> @@ -0,0 +1,14 @@
> +self.description = "Remove a package that provides an optdepend"
> +
> +p1 = pmpkg("brown-sugar")
> +p1.provides = ["sugar"]
> +self.addpkg2db("local", p1)
> +
> +p2 = pmpkg("coffee")
> +p2.optdepends = ["sugar"]
> +self.addpkg2db("local", p2)
> +
> +self.args = "-R %s" % p1.name
> +
> +self.addrule("PACMAN_RETCODE=0")
> +self.addrule("PACMAN_OUTPUT=coffee optionally requires sugar")
>
More information about the pacman-dev
mailing list