kewlfft / ansible-aur

Ansible module to manage packages from the AUR
GNU General Public License v3.0
299 stars 47 forks source link

aurman fails if you have not read archlinux.org news #13

Closed gliech closed 6 years ago

gliech commented 6 years ago
SUMMARY

The aurman AUR-helper has recently been updated with a feature that displays news articles from archlinux.org and requires the user to confirm that they have read them. This causes the aur module to fail on systems where aurman was not executed interactively before using it as part of the module, or after a new article was posted on archlinux.org. Also this confirmation does not get suppressed by using the '--noconfirm' option. Thankfully a '--skip_news' option exists in aurman, that can be used instead.

STEPS TO REPRODUCE

On a fresh install (like an 'archlinux/archlinux' Vagrant Box) run:

- name: Install aurman
  aur:
    name: aurman
    use: makepkg
    skip_pgp_check: yes

- name: Install aurman again
  aur:
    name: aurman
    use: aurman
    skip_pgp_check: yes
EXPECTED RESULTS

The first use of the aur module should install aurman and report the status 'changed'. The second use of the aur module should do nothing and report the status 'ok'.

ACTUAL RESULTS

The second use of the aur module fails because it requires user input.

TASK [Install aurman] **********************************************************
changed: [aur-test]

TASK [Install aurman again] ****************************************************
fatal: [aur-test]: FAILED! => {"changed": false, "cmd": "env LC_ALL=C aurman -S --noconfirm --noedit --needed aurman", "msg": "2018-07-17 08:49:40,924 - main - main - ERROR - \nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main\n    process(argv[1:])\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process\n    show_unread_news()\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news\n    ), False, True):\n  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user\n    old_settings = termios.tcgetattr(fd)\ntermios.error: (25, 'Inappropriate ioctl for device')", "rc": 1, "stderr": "2018-07-17 08:49:40,924 - main - main - ERROR - \nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main\n    process(argv[1:])\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process\n    show_unread_news()\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news\n    ), False, True):\n  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user\n    old_settings = termios.tcgetattr(fd)\ntermios.error: (25, 'Inappropriate ioctl for device')\n", "stderr_lines": ["2018-07-17 08:49:40,924 - main - main - ERROR - ", "Traceback (most recent call last):", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main", "    process(argv[1:])", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process", "    show_unread_news()", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news", "    ), False, True):", "  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user", "    old_settings = termios.tcgetattr(fd)", "termios.error: (25, 'Inappropriate ioctl for device')"], "stdout": "\n:: Phasing out i686 support [Wed, 25 Jan 2017 18:23:33 +0000]\nDue to the decreasing popularity of i686 among the developers and the\ncommunity, we have decided to phase out the support of this architecture.\nThe decision means that February ISO will be the last that allows to\ninstall 32 bit Arch Linux. The next 9 months are deprecation period,\nduring which i686 will be still receiving upgraded packages. Starting\nfrom November 2017, packaging and repository tools will no longer\nrequire that from maintainers, effectively making i686 unsupported.\nHowever, as there is still some interest in keeping i686 alive, we would\nlike to encourage the community to make it happen with our guidance. The\narch-ports mailing list and #archlinux-ports IRC channel on Freenode\nwill be used for further coordination.\nThe [multilib] repository will not be affected by this change.\n\n:: mesa  with libglvnd support is now in testing [Mon, 27 Feb 2017 20:15:02 +0000]\nmesa-17.0.0-3 can now be installed side-by-side with nvidia-378.13 driver without any libgl/libglx hacks, and with the help of Fedora and upstream xorg-server patches.\n\n\nFirst step was to remove the libglx symlinks with xorg-server-1.19.1-3 and associated mesa/nvidia drivers through the removal of various libgl packages. It was a tough moment because it was breaking optimus system, xorg-server configuration needs manual updating.\n\n\nThe second step is now here, with an updated 10-nvidia-drm-outputclass.conf  file that should help to have an \"out-of-the-box\" working xorg-server experience with optimus system.\n\n\nPlease test this extensively and post your feedback in this forum thread or in our bugtracker.\n\n:: ca-certificates-utils 20170307-1 upgrade requires manual intervention [Wed, 15 Mar 2017 21:27:54 +0000]\nThe upgrade to ca-certificates-utils 20170307-1 requires manual intervention because a symlink which used to be generated post-install has been moved into the package proper.\nAs deleting the symlink may leave you unable to download packages, perform this upgrade in three steps:\n# pacman -Syuw                           # download packages\n# rm /etc/ssl/certs/ca-certificates.crt  # remove conflicting file\n# pacman -Su                             # perform upgrade\n\n\n:: Deprecation of ABS tool and rsync endpoint [Mon, 15 May 2017 10:55:50 +0000]\nDue to high maintenance cost of scripts related to the Arch Build\nSystem, we have decided to deprecate the abs tool and thus rsync\nas a way of obtaining PKGBUILDs.\nThe asp tool, available in [extra], provides similar functionality to\nabs.  asp export pkgname can be used as direct alternative; more\ninformation about its usage can be found in the documentation.\nAdditionally Subversion sparse checkouts, as described here, can\nbe used to achieve a similar effect.  For fetching all PKGBUILDs, the\nbest way is cloning the svntogit mirrors.\nWhile the extra/abs package has been already dropped, the rsync\nendpoint (rsync://rsync.archlinux.org/abs) will be disabled by the end\nof the month.\n\n:: Perl library path change [Sat, 02 Sep 2017 11:44:22 +0000]\nThe perl package now uses a versioned path for compiled modules. This means\nthat modules built for a non-matching perl version will not be loaded any more\nand must be rebuilt. \nA pacman hook warns about affected modules during the upgrade by showing output\nlike this:\nWARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 143 packages which will NOT be used by the installed perl interpreter.\n -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl'\n\nYou must rebuild all affected packages against the new perl package before you\ncan use them again. The change also affects modules installed directly via\nCPAN. Rebuilding will also be necessary again with future major perl updates\nlike 5.28 and 5.30.\nPlease note that rebuilding was already required for major updates prior to\nthis change, however now perl will no longer try to load the modules and then fail in strange ways.\nIf the build system of some software does not detect the change automatically,\nyou can use perl -V:vendorarch in your PKGBUILD to query perl for the\ncorrect path. There is also sitearch for software that is not packaged with\npacman.\n\n:: The end of i686 support [Wed, 08 Nov 2017 13:39:10 +0000]\nFollowing 9 months of deprecation period, support for the i686\narchitecture effectively ends today. By the end of November, i686\npackages will be removed from our mirrors and later from the packages\narchive. The [multilib] repository is not affected.\nFor users unable to upgrade their hardware to x86_64, an alternative is\na community maintained fork named Arch Linux 32. See their website\nfor details on migrating existing installations.\n\n:: zita-resampler 1.6.0-1 -> 2 update requires manual intervention [Thu, 22 Feb 2018 07:57:11 +0000]\nThe zita-resampler 1.6.0-1 package was missing a library symlink that has been readded in 1.6.0-2. If you installed 1.6.0-1, ldconfig would have created this symlink at install time, and it will conflict with the one included in 1.6.0-2. In that case, remove /usr/lib/libzita-resampler.so.1 manually before updating.\n\n:: glibc 2.27-2 and pam 1.3.0-2 may require manual intervention [Fri, 20 Apr 2018 07:45:46 +0000]\nThe new version of glibc removes support for NIS and NIS+. The default\n/etc/nsswitch.conf file provided by filesystem package already\nreflects this change. Please make sure to merge pacnew file if it exists\nprior to upgrade.\nNIS functionality can still be enabled by installing libnss_nis\npackage. There is no replacement for NIS+ in the official repositories.\npam 1.3.0-2 no longer ships pam_unix2 module and pam_unix_*.so\ncompatibility symlinks. Before upgrading, review PAM configuration files\nin the /etc/pam.d directory and replace removed modules with\npam_unix.so. Users of pam_unix2 should also reset their passwords\nafter such change. Defaults provided by pambase package do not need\nany modifications.\n\n:: js52 52.7.3-2 upgrade requires intervention [Fri, 04 May 2018 20:27:33 +0000]\nDue to the SONAME of /usr/lib/libmozjs-52.so not matching its file name, ldconfig created an untracked file /usr/lib/libmozjs-52.so.0. This is now fixed and both files are present in the package.\nTo pass the upgrade, remove /usr/lib/libmozjs-52.so.0 prior to upgrading.\n\n:: libutf8proc>=2.1.1-3 update requires manual intervention [Sat, 14 Jul 2018 16:55:19 +0000]\nThe libutf8proc package prior to version 2.1.1-3 had an incorrect soname link. This has been fixed in 2.1.1-3, so the upgrade will need to overwrite the untracked soname link created by ldconfig. If you get an error\nlibutf8proc: /usr/lib/libutf8proc.so.2 exists in filesystem\nwhen updating, use\npacman -Suy --overwrite usr/lib/libutf8proc.so.2\nto perform the upgrade.\n\n?? Have you read the 10 unread article(s) from archlinux.org? N/y: ", "stdout_lines": ["", ":: Phasing out i686 support [Wed, 25 Jan 2017 18:23:33 +0000]", "Due to the decreasing popularity of i686 among the developers and the", "community, we have decided to phase out the support of this architecture.", "The decision means that February ISO will be the last that allows to", "install 32 bit Arch Linux. The next 9 months are deprecation period,", "during which i686 will be still receiving upgraded packages. Starting", "from November 2017, packaging and repository tools will no longer", "require that from maintainers, effectively making i686 unsupported.", "However, as there is still some interest in keeping i686 alive, we would", "like to encourage the community to make it happen with our guidance. The", "arch-ports mailing list and #archlinux-ports IRC channel on Freenode", "will be used for further coordination.", "The [multilib] repository will not be affected by this change.", "", ":: mesa  with libglvnd support is now in testing [Mon, 27 Feb 2017 20:15:02 +0000]", "mesa-17.0.0-3 can now be installed side-by-side with nvidia-378.13 driver without any libgl/libglx hacks, and with the help of Fedora and upstream xorg-server patches.", "", "", "First step was to remove the libglx symlinks with xorg-server-1.19.1-3 and associated mesa/nvidia drivers through the removal of various libgl packages. It was a tough moment because it was breaking optimus system, xorg-server configuration needs manual updating.", "", "", "The second step is now here, with an updated 10-nvidia-drm-outputclass.conf  file that should help to have an \"out-of-the-box\" working xorg-server experience with optimus system.", "", "", "Please test this extensively and post your feedback in this forum thread or in our bugtracker.", "", ":: ca-certificates-utils 20170307-1 upgrade requires manual intervention [Wed, 15 Mar 2017 21:27:54 +0000]", "The upgrade to ca-certificates-utils 20170307-1 requires manual intervention because a symlink which used to be generated post-install has been moved into the package proper.", "As deleting the symlink may leave you unable to download packages, perform this upgrade in three steps:", "# pacman -Syuw                           # download packages", "# rm /etc/ssl/certs/ca-certificates.crt  # remove conflicting file", "# pacman -Su                             # perform upgrade", "", "", ":: Deprecation of ABS tool and rsync endpoint [Mon, 15 May 2017 10:55:50 +0000]", "Due to high maintenance cost of scripts related to the Arch Build", "System, we have decided to deprecate the abs tool and thus rsync", "as a way of obtaining PKGBUILDs.", "The asp tool, available in [extra], provides similar functionality to", "abs.  asp export pkgname can be used as direct alternative; more", "information about its usage can be found in the documentation.", "Additionally Subversion sparse checkouts, as described here, can", "be used to achieve a similar effect.  For fetching all PKGBUILDs, the", "best way is cloning the svntogit mirrors.", "While the extra/abs package has been already dropped, the rsync", "endpoint (rsync://rsync.archlinux.org/abs) will be disabled by the end", "of the month.", "", ":: Perl library path change [Sat, 02 Sep 2017 11:44:22 +0000]", "The perl package now uses a versioned path for compiled modules. This means", "that modules built for a non-matching perl version will not be loaded any more", "and must be rebuilt. ", "A pacman hook warns about affected modules during the upgrade by showing output", "like this:", "WARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 143 packages which will NOT be used by the installed perl interpreter.", " -> Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl'", "", "You must rebuild all affected packages against the new perl package before you", "can use them again. The change also affects modules installed directly via", "CPAN. Rebuilding will also be necessary again with future major perl updates", "like 5.28 and 5.30.", "Please note that rebuilding was already required for major updates prior to", "this change, however now perl will no longer try to load the modules and then fail in strange ways.", "If the build system of some software does not detect the change automatically,", "you can use perl -V:vendorarch in your PKGBUILD to query perl for the", "correct path. There is also sitearch for software that is not packaged with", "pacman.", "", ":: The end of i686 support [Wed, 08 Nov 2017 13:39:10 +0000]", "Following 9 months of deprecation period, support for the i686", "architecture effectively ends today. By the end of November, i686", "packages will be removed from our mirrors and later from the packages", "archive. The [multilib] repository is not affected.", "For users unable to upgrade their hardware to x86_64, an alternative is", "a community maintained fork named Arch Linux 32. See their website", "for details on migrating existing installations.", "", ":: zita-resampler 1.6.0-1 -> 2 update requires manual intervention [Thu, 22 Feb 2018 07:57:11 +0000]", "The zita-resampler 1.6.0-1 package was missing a library symlink that has been readded in 1.6.0-2. If you installed 1.6.0-1, ldconfig would have created this symlink at install time, and it will conflict with the one included in 1.6.0-2. In that case, remove /usr/lib/libzita-resampler.so.1 manually before updating.", "", ":: glibc 2.27-2 and pam 1.3.0-2 may require manual intervention [Fri, 20 Apr 2018 07:45:46 +0000]", "The new version of glibc removes support for NIS and NIS+. The default", "/etc/nsswitch.conf file provided by filesystem package already", "reflects this change. Please make sure to merge pacnew file if it exists", "prior to upgrade.", "NIS functionality can still be enabled by installing libnss_nis", "package. There is no replacement for NIS+ in the official repositories.", "pam 1.3.0-2 no longer ships pam_unix2 module and pam_unix_*.so", "compatibility symlinks. Before upgrading, review PAM configuration files", "in the /etc/pam.d directory and replace removed modules with", "pam_unix.so. Users of pam_unix2 should also reset their passwords", "after such change. Defaults provided by pambase package do not need", "any modifications.", "", ":: js52 52.7.3-2 upgrade requires intervention [Fri, 04 May 2018 20:27:33 +0000]", "Due to the SONAME of /usr/lib/libmozjs-52.so not matching its file name, ldconfig created an untracked file /usr/lib/libmozjs-52.so.0. This is now fixed and both files are present in the package.", "To pass the upgrade, remove /usr/lib/libmozjs-52.so.0 prior to upgrading.", "", ":: libutf8proc>=2.1.1-3 update requires manual intervention [Sat, 14 Jul 2018 16:55:19 +0000]", "The libutf8proc package prior to version 2.1.1-3 had an incorrect soname link. This has been fixed in 2.1.1-3, so the upgrade will need to overwrite the untracked soname link created by ldconfig. If you get an error", "libutf8proc: /usr/lib/libutf8proc.so.2 exists in filesystem", "when updating, use", "pacman -Suy --overwrite usr/lib/libutf8proc.so.2", "to perform the upgrade.", "", "?? Have you read the 10 unread article(s) from archlinux.org? N/y: "]}
    to retry, use: --limit @/mnt/work/aur-bootstrap/vagrant/playbook.retry

PLAY RECAP *********************************************************************
aur-test                   : ok=0    changed=1    unreachable=0    failed=1