[pacman-dev] [PATCH 2/5] Tests: Sync group which includes ignored pkgs

Dan McGee dpmcgee at gmail.com
Mon Sep 27 11:32:40 EDT 2010


On Sat, Sep 25, 2010 at 4:40 AM, Jakob Gruber <jakob.gruber at gmail.com> wrote:
> See also
> FS#19854 (--ignore is ignored with groups)
> http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html (operation aborts when a package from a group is ignored/and user chooses not to install it)
>
> If a group member is ignored, we expect
> a) a question whether to install
> b) after saying 'no' to a), the ignored member not to be installed
> c) all other group members to be installed
> d) pacman to execute successfully
>
> Signed-off-by: Jakob Gruber <jakob.gruber at gmail.com>

I'm assuming this fails now. Please include this in the original
commit of the test so one can bisect without problems:
+
+self.expectfailure = True

And then remove that line in the commit that actually fixes it. See
the history for test/pacman/tests/sync023.py for an example of this.

> ---
>  test/pacman/tests/ignore007.py |   21 +++++++++++++++++++++
>  1 files changed, 21 insertions(+), 0 deletions(-)
>  create mode 100644 test/pacman/tests/ignore007.py
>
> diff --git a/test/pacman/tests/ignore007.py b/test/pacman/tests/ignore007.py
> new file mode 100644
> index 0000000..bb5efdc
> --- /dev/null
> +++ b/test/pacman/tests/ignore007.py
> @@ -0,0 +1,21 @@
> +self.description = "Sync group with ignored packages"
> +
> +pkg1 = pmpkg("package1")
> +pkg1.groups = ["grp"]
> +self.addpkg2db("sync", pkg1)
> +
> +pkg2 = pmpkg("package2")
> +pkg2.groups = ["grp"]
> +self.addpkg2db("sync", pkg2)
> +
> +pkg3 = pmpkg("package3")
> +pkg3.groups = ["grp"]
> +self.addpkg2db("sync", pkg3)
> +
> +self.option["IgnorePkg"] = ["package1"]
> +self.args = "--ask=1 -S grp"
> +
> +self.addrule("PACMAN_RETCODE=0")
> +self.addrule("!PKG_EXIST=%s" % pkg1.name)
> +self.addrule("PKG_EXIST=%s" % pkg2.name)
> +self.addrule("PACMAN_OUTPUT=IgnorePkg")
> --
> 1.7.3


More information about the pacman-dev mailing list