{"action":"opened","issue":{"url":"https://api.github.com/repos/oshazard/apacman/issues/80","repository_url":"https://api.github.com/repos/oshazard/apacman","labels_url":"https://api.github.com/repos/oshazard/apacman/issues/80/labels{/name}","comments_url":"https://api.github.com/repos/oshazard/apacman/issues/80/comments","events_url":"https://api.github.com/repos/oshazard/apacman/issues/80/events","html_url":"https://github.com/oshazard/apacman/issues/80","id":193644244,"number":80,"title":"Failure to echo package matches","user":{"login":"miblodelcarpio","id":12488998,"avatar_url":"https://avatars.githubusercontent.com/u/12488998?v=3","gravatar_id":"","url":"https://api.github.com/users/miblodelcarpio","html_url":"https://github.com/miblodelcarpio","followers_url":"https://api.github.com/users/miblodelcarpio/followers","following_url":"https://api.github.com/users/miblodelcarpio/following{/other_user}","gists_url":"https://api.github.com/users/miblodelcarpio/gists{/gist_id}","starred_url":"https://api.github.com/users/miblodelcarpio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miblodelcarpio/subscriptions","organizations_url":"https://api.github.com/users/miblodelcarpio/orgs","repos_url":"https://api.github.com/users/miblodelcarpio/repos","events_url":"https://api.github.com/users/miblodelcarpio/events{/privacy}","received_events_url":"https://api.github.com/users/miblodelcarpio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-05T23:50:10Z","updated_at":"2016-12-05T23:50:10Z","closed_at":null,"body":"Package matches fail to be `echo`'d when running `apacman -S` on a package name that contains an underscore and has alternative packages suffixed `-*` in the AUR, e.g. `get_iplayer (get_iplayer-git)`, `acd_cli (acd_cli-git)`, `check_mk (check_mk-agent check_mk-git)`.\r\n\r\n```bash\r\nbash -x apacman -S get_iplayer\r\n\r\n+ version=3.1\r\n+ [[ -n '' ]]\r\n+ PACMAN=pacman\r\n+ pacmanbin=/usr/bin/pacman\r\n+ makepkgconf=/etc/makepkg.conf\r\n+ usermakepkgconf=/home/matt/.makepkg.conf\r\n+ pacmanconf=/etc/pacman.conf\r\n+ apacmanconf=/etc/apacman.conf\r\n+ gpgconf=/etc/pacman.d/gnupg/gpg.conf\r\n+ downdir=/var/cache/pacman/pkg\r\n+ savedir=/var/cache/apacman/pkg\r\n+ database=/var/lib/apacman\r\n+ pacmandb=/var/lib/pacman/sync/aur.db\r\n+ pkgfiledb=/var/cache/pkgfile/aur.files\r\n+ localrepo=aur\r\n+ builddir=/tmp/pkgbuild-1000\r\n+ tmpdir=/tmp/apacmantmp-1000\r\n+ testdir=/tmp/apacman-testing\r\n+ editor=vi\r\n+ [[ -n vim ]]\r\n+ editor=vim\r\n+ pager='less -R'\r\n+ [[ -n /bin/vimpager ]]\r\n+ pager=/bin/vimpager\r\n+ RPCURL='https://aur.archlinux.org/rpc/?v=5&type'\r\n+ PKGURL=https://aur.archlinux.org\r\n+ WEBURL=https://www.archlinux.org\r\n+ ABSURL=rsync.archlinux.org\r\n+ legacy=0\r\n+ [[ -t 1 ]]\r\n+ [[ ! '' = \\N\\O ]]\r\n+ COLOR1='\\e[1;39m'\r\n+ COLOR2='\\e[1;32m'\r\n+ COLOR3='\\e[1;35m'\r\n+ COLOR4='\\e[1;36m'\r\n+ COLOR5='\\e[1;34m'\r\n+ COLOR6='\\e[1;33m'\r\n+ COLOR7='\\e[1;31m'\r\n+ ENDCOLOR='\\e[0m'\r\n+ S='\\\\'\r\n++ stty size\r\n++ cut -d ' ' -f 2\r\n+ _WIDTH=166\r\n+ trap ctrlc INT\r\n+ export gpgconf\r\n+ export -f checkpgpkeys\r\n+ export -f askpgpkeys\r\n+ export -f addpgpkeys\r\n+ export -f removepgpkeys\r\n+ export -f proceed\r\n+ loadconfig -S get_iplayer\r\n+ for flag in $@\r\n+ [[ '' = 1 ]]\r\n+ [[ -S = \\-\\-\\c\\o\\n\\f\\i\\g ]]\r\n+ [[ -S = --config* ]]\r\n+ for flag in $@\r\n+ [[ '' = 1 ]]\r\n+ [[ get_iplayer = \\-\\-\\c\\o\\n\\f\\i\\g ]]\r\n+ [[ get_iplayer = --config* ]]\r\n+ sourceapacmanconf\r\n+ [[ -r /etc/apacman.conf ]]\r\n+ . /etc/apacman.conf\r\n++ progress=1\r\n++ editor=vim\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ export keepkeys noconfirm COLOR1 COLOR2 COLOR3 COLOR4 COLOR5 COLOR6 COLOR7 ENDCOLOR\r\n+ [[ -n -S ]]\r\n+ packageargs=()\r\n+ [[ -n -S ]]\r\n+ case \"$1\" in\r\n+ option=install\r\n+ shift\r\n+ [[ -n get_iplayer ]]\r\n+ case \"$1\" in\r\n+ packageargs+=(\"$1\")\r\n+ shift\r\n+ [[ -n '' ]]\r\n+ rm -rf /tmp/apacmantmp-1000\r\n+ mkdir -p /tmp/apacmantmp-1000\r\n+ olddir=/home/matt\r\n+ cd\r\n++ grep '^CARCH=' /etc/makepkg.conf\r\n++ sed 's/^=\"//'\r\n++ grep -o -e '=.*[0-9A-Za-z]'\r\n+ makearch=x86_64\r\n+ [[ '' == 1 ]]\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ [[ install = list ]]\r\n+ [[ '' = 1 ]]\r\n+ [[ -n '' ]]\r\n+ [[ -n install ]]\r\n+ [[ '' != 1 ]]\r\n+ [[ -z get_iplayer ]]\r\n+ [[ -n '' ]]\r\n+ [[ install = install ]]\r\n+ for pkg in ${packageargs[@]}\r\n++ echo get_iplayer\r\n++ tr -dc '0-9a-z-.\\n'\r\n+ regexmatch=getiplayer\r\n+ [[ get_iplayer =~ ^/ ]]\r\n+ [[ '' = 1 ]]\r\n+ [[ get_iplayer != \\g\\e\\t\\i\\p\\l\\a\\y\\e\\r ]]\r\n+ regex=1\r\n+ echo -e '\\e[1;33mnotice:\\e[0m enabling regex mode (get_iplayer)'\r\nnotice: enabling regex mode (get_iplayer)\r\n+ installhandling get_iplayer\r\n+ packageargs=(\"$@\")\r\n+ getignoredpackages\r\n+ IFS=,\r\n+ read -ra ignoredpackages\r\n+ ignoredpackages+=($(grep '^ *IgnorePkg' \"$pacmanconf\" | cut -d '=' -f 2-))\r\n++ grep '^ *IgnorePkg' /etc/pacman.conf\r\n++ cut -d = -f 2-\r\n+ sourcemakepkgconf\r\n+ . /etc/makepkg.conf\r\n++ export CC=clang\r\n++ CC=clang\r\n++ export CXX=clang++\r\n++ CXX=clang++\r\n++ DLAGENTS=('ftp::/usr/bin/curl -fC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u' 'http::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' 'https::/usr/bin/curl -fLC - --retry 3 --retry-delay 3 -o %o %u' 'rsync::/usr/bin/rsync --no-motd -z %u %o' 'scp::/usr/bin/scp -C %u %o')\r\n++ VCSCLIENTS=('bzr::bzr' 'git::git' 'hg::mercurial' 'svn::subversion')\r\n++ CARCH=x86_64\r\n++ CHOST=x86_64-unknown-linux-gnu\r\n++ CPPFLAGS=-D_FORTIFY_SOURCE=2\r\n++ CFLAGS='-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'\r\n++ CXXFLAGS='-march=native -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2'\r\n++ LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro\r\n++ MAKEFLAGS=-j4\r\n++ DEBUG_CFLAGS='-g -fvar-tracking-assignments'\r\n++ DEBUG_CXXFLAGS='-g -fvar-tracking-assignments'\r\n++ BUILDENV=(!distcc color !ccache check !sign)\r\n++ OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !optipng !upx !debug)\r\n++ INTEGRITY_CHECK=(md5)\r\n++ STRIP_BINARIES=--strip-all\r\n++ STRIP_SHARED=--strip-unneeded\r\n++ STRIP_STATIC=--strip-debug\r\n++ MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})\r\n++ DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})\r\n++ PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)\r\n++ PACKAGER='Matt Mascarenhas <miblodelcarpio@gmail.com>'\r\n++ COMPRESSGZ=(gzip -c -f -n)\r\n++ COMPRESSBZ2=(bzip2 -c -f)\r\n++ COMPRESSXZ=(xz -c -z -)\r\n++ COMPRESSLRZ=(lrzip -q)\r\n++ COMPRESSLZO=(lzop -q)\r\n++ COMPRESSZ=(compress -c -f)\r\n++ PKGEXT=.pkg.tar.xz\r\n++ SRCEXT=.src.tar.gz\r\n+ [[ -r /home/matt/.makepkg.conf ]]\r\n+ for package in \"${packageargs[@]}\"\r\n+ [[ -n '' ]]\r\n+ existsinpacman get_iplayer\r\n+ chosenpkg=get_iplayer\r\n+ [[ 1 = 1 ]]\r\n++ selectprovider\r\n++ virtpkg=\r\n++ shift\r\n++ virtual=($@)\r\n++ virtnum=0\r\n++ [[ 0 -eq 0 ]]\r\n++ return 1\r\n+ chosenpkg=\r\n+ /usr/bin/pacman -Si -- ''\r\n+ [[ -n '' ]]\r\n+ existsinpacmangroup get_iplayer\r\n++ /usr/bin/pacman -Sgq get_iplayer\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ providedinpacman get_iplayer\r\n+ unset providepkg\r\n+ IFS='\r\n'\r\n+ read -rd '' -a providepkg\r\n++ /usr/bin/pacman -Ssq -- '^get_iplayer$'\r\n+ selectprovider get_iplayer\r\n+ virtpkg=get_iplayer\r\n+ shift\r\n+ virtual=($@)\r\n+ virtnum=0\r\n+ [[ 0 -eq 0 ]]\r\n+ return 1\r\n+ [[ -n '' ]]\r\n+ [[ -n '' ]]\r\n+ existsinaur get_iplayer package\r\n++ echo get_iplayer\r\n++ sed 's/\\~$//'\r\n++ awk -F == '{print $1}'\r\n+ chosenpkg=get_iplayer\r\n+ val=get_iplayer\r\n++ echo get_iplayer\r\n++ tr -dc '0-9a-z-.\\n'\r\n+ regexmatch=getiplayer\r\n+ [[ get_iplayer != getiplayer ]]\r\n++ aurpkglist get_iplayer\r\n++ [[ -f /tmp/apacmantmp-1000/packages.lst ]]\r\n++ curl -Lfs https://aur.archlinux.org/packages.gz\r\n++ gunzip\r\n++ grep -E get_iplayer /tmp/apacmantmp-1000/packages.lst\r\n++ sort\r\n+ matches='get_iplayer\r\nget_iplayer-git'\r\n+ selectprovider get_iplayer get_iplayer get_iplayer-git\r\n+ virtpkg=get_iplayer\r\n+ shift\r\n+ virtual=($@)\r\n+ virtnum=2\r\n+ [[ 2 -eq 0 ]]\r\n+ [[ 2 -eq 1 ]]\r\n+ [[ 2 -gt 1 ]]\r\n+ provmsg=provide\r\n+ [[ 1 = 1 ]]\r\n+ provmsg=match\r\n+ unset regex\r\n+ echo -e '\\e[1;34m:: \\e[1;39mThere are 2 packages that match get_iplayer:\\e[0m'\r\n:: There are 2 packages that match get_iplayer:\r\n++ pickone 2 get_iplayer get_iplayer-git\r\n++ n=1\r\n++ maxnum=2\r\n++ shift\r\n++ choices=($(echo $@))\r\n+++ echo get_iplayer get_iplayer-git\r\n++ for v in ${choices[@]}\r\n++ echo '1) get_iplayer'\r\n++ n=2\r\n++ for v in ${choices[@]}\r\n++ echo '2) get_iplayer-git'\r\n++ n=3\r\n++ echo\r\n++ echo -n 'Enter a selection (default=1): '\r\n++ read -r\r\n```\r\n\r\nIf I'm understanding the output correctly, the issue seems to be that the `echo` invocations near the end of the output (i.e. after the `pickone()` call) happen more than one / zero levels deep, thus their output never makes it to the terminal. I've tried to unwind that call stack a level, but just couldn't figure out how to do it, assuming that is the problem at all!"}}
{"actor":{"display_login":"miblodelcarpio"}}