# [Workaround] glsa-check generating stack trace

## lyallp

Part of my regular update script is a run of glsa-check.

This has started generating stack traces.

Tried re-installing portage and gentoolkit, re-syncing portage, to no avail.

Any suggestions on what is causing this and how I correct the problem?

```
root@Lyalls-PC ~

# glsa-check --verbose --test all

Traceback (most recent call last):

  File "/usr/lib/python-exec/python3.4/glsa-check", line 345, in <module>

    if myglsa.isVulnerable():

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 683, in isVulnerable

    or (None != getMinUpgrade([v,], path["unaff_atoms"]))

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 411, in getMinUpgrade

    u_installed = reduce(operator.add, [match(u, "vartree") for u in unaffectedList], [])

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 411, in <listcomp>

    u_installed = reduce(operator.add, [match(u, "vartree") for u in unaffectedList], [])

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 345, in match

    return revisionMatch(atom, db, match_type=match_type)

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 381, in revisionMatch

    r2 = portage.pkgsplit(revisionAtom[3:])[-1][1:]

TypeError: 'NoneType' object is not subscriptable

```

```

root@Lyalls-PC glsa

# emerge --info

Portage 2.3.8 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop, gcc-5.4.0, glibc-2.23-r4, 4.12.12-gentoo x86_64)

=================================================================

System uname: Linux-4.12.12-gentoo-x86_64-Intel-R-_Core-TM-_i7-7700_CPU_@_3.60GHz-with-gentoo-2.3

KiB Mem:    32884688 total,   5815048 free

KiB Swap:   33286140 total,  33286140 free

Timestamp of repository gentoo: Mon, 25 Sep 2017 08:00:01 +0000

Head commit of repository gentoo: 704cf26a19248aa3423b7216f9acc0f9efc9d914

sh bash 4.3_p48-r1

ld GNU ld (Gentoo 2.28.1 p1.0) 2.28.1

app-shells/bash:          4.3_p48-r1::gentoo

dev-java/java-config:     2.2.0-r3::gentoo

dev-lang/perl:            5.24.1-r2::gentoo

dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo

dev-util/cmake:           3.7.2::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.3::gentoo

sys-apps/openrc:          0.28::gentoo

sys-apps/sandbox:         2.10-r3::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.11.6-r1::gentoo, 1.15-r2::gentoo

sys-devel/binutils:       2.28.1::gentoo

sys-devel/gcc:            5.4.0-r3::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6-r3::gentoo

sys-devel/make:           4.2.1::gentoo

sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.23-r4::gentoo

Repositories:

gentoo

    location: /data/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

repo_name-local

    location: /data/portage/local

    masters: gentoo

    priority: 0

gamerlay

    location: /var/lib/layman/gamerlay

    masters: gentoo

    priority: 50

mva

    location: /var/lib/layman/mva

    masters: gentoo

    priority: 50

voyageur

    location: /var/lib/layman/voyageur

    masters: gentoo

    priority: 50

zugaina

    location: /var/lib/layman/zugaina

    masters: gentoo

    priority: 50

ABI="amd64"

ABI_X86="64"

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

ACCEPT_PROPERTIES="*"

ACCEPT_RESTRICT="*"

ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci"

ANT_HOME="/usr/share/ant"

APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias access_compat dumpio"

ARCH="amd64"

AUTOCLEAN="yes"

BOOTSTRAP_USE="cxx unicode internal-glib python_targets_python3_4 python_targets_python2_7 multilib"

BROWSER="/usr/bin/firefox"

CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-mtune=native -march=native -O2 -pipe"

CFLAGS_amd64="-m64"

CFLAGS_x32="-mx32"

CFLAGS_x86="-m32"

CHOST="x86_64-pc-linux-gnu"

CHOST_amd64="x86_64-pc-linux-gnu"

CHOST_x32="x86_64-pc-linux-gnux32"

CHOST_x86="i686-pc-linux-gnu"

CLEAN_DELAY="5"

COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog"

COLLISION_IGNORE="/lib/modules/* *.py[co] *$py.class */dropin.cache"

COLUMNS="132"

CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4 ssse3"

CXXFLAGS="-mtune=native -march=native -O2 -pipe"

DEFAULT_ABI="amd64"

DISPLAY=":0.0"

DISTDIR="/data/portage/distfiles"

EDITOR="/usr/bin/emacsclient"

ELIBC="glibc"

EMERGE_DEFAULT_OPTS="--jobs=3 --verbose --color=n --keep-going --with-bdeps=y --quiet-build=y"

EMERGE_WARNING_DELAY="10"

ENV="/root/.bashrc"

EPREFIX=""

EROOT="/"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FETCHCOMMAND="wget -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""

FETCHCOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""

FETCHCOMMAND_SFTP="bash -c "x=\${2#sftp://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; eval \"declare -a ssh_opts=(\${3})\" ; exec sftp \${port:+-P \${port}} \"\${ssh_opts[@]}\" \"\${host}:/\${x#*/}\" \"\$1\"" sftp "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""

FETCHCOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""

FFLAGS="-O2 -pipe"

GCC_SPECS=""

GENTOO_MIRRORS="ftp://ftp.swin.edu.au/gentoo http://ftp.swin.edu.au/gentoo http://mirror.internode.on.net/pub/gentoo ftp://mirror.pacific.net.au/linux/Gentoo"

GPG_TTY="/dev/pts/3"

GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx"

GRUB_PLATFORMS=""

GSETTINGS_BACKEND="dconf"

HOME="/root"

INFOPATH="/usr/share/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.28.1/info:/usr/share/info/emacs-25"

INPUT_DEVICES="keyboard mouse evdev"

INSIDE_EMACS="25.3.1,comint"

IUSE_IMPLICIT="abi_x86_64 prefix prefix-chain prefix-guest"

JAVAC="/etc/java-config-2/current-system-vm/bin/javac"

JAVA_HOME="/etc/java-config-2/current-system-vm"

JDK_HOME="/etc/java-config-2/current-system-vm"

KERNEL="linux"

L10N="en-AU en"

LANG="en_AU.utf8"

LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"

LC_MESSAGES="C"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

LDFLAGS_amd64="-m elf_x86_64"

LDFLAGS_x32="-m elf32_x86_64"

LDFLAGS_x86="-m elf_i386"

LD_LIBRARY_PATH="/etc/java-config-2/current-system-vm/jre/lib/amd64:/etc/java-config-2/current-system-vm/jre/lib/amd64/server"

LESS="-X -R"

LESSOPEN="|lesspipe %s"

LIBDIR_amd64="lib64"

LIBDIR_x32="libx32"

LIBDIR_x86="lib32"

LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer"

LINGUAS="en-AU en"

LOGNAME="root"

MAIL="/var/mail/root"

MAKEOPTS="-j9"

MANPAGER="manpager"

MANPATH="/etc/java-config-2/current-system-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/5.4.0/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.28.1/man:/etc/java-config-2/current-system-vm/man/:/usr/lib64/php5.6/man/:/usr/lib64/php7.0/man/"

MOZ_GMP_PATH="/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed"

MULTILIB_ABIS="amd64 x86"

MULTILIB_STRICT_DENY="64-bit.*shared object"

MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib"

MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)"

MULTIOSDIRS="../lib64:../lib32"

NETBEANS="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml"

NOCOLOR="true"

OFFICE_IMPLEMENTATION="libreoffice"

OPENCL_PROFILE="nvidia"

OPENGL_PROFILE="nvidia"

PAGER="/usr/bin/less"

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0"

PHP_TARGETS="php5-6 php7-0"

PKGDIR="/data/portage/packages"

PORTAGE_ARCHLIST="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 arm64-linux hppa ia64 m68k m68k-mint mips nios2 ppc ppc-aix ppc-macos ppc64 ppc64-linux riscv s390 sh sparc sparc-fbsd sparc-solaris sparc64-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt"

PORTAGE_BIN_PATH="/usr/lib/portage/python3.4"

PORTAGE_COMPRESS_EXCLUDE_SUFFIXES="css gif htm[l]? jp[e]?g js pdf png"

PORTAGE_CONFIGROOT="/"

PORTAGE_DEBUG="0"

PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"

PORTAGE_ELOG_CLASSES="warn error info log qa"

PORTAGE_ELOG_MAILFROM="portage@localhost"

PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"

PORTAGE_ELOG_MAILURI="root"

PORTAGE_ELOG_SYSTEM="save"

PORTAGE_FETCH_CHECKSUM_TRY_MIRRORS="5"

PORTAGE_FETCH_RESUME_MIN_SIZE="350K"

PORTAGE_GID="250"

PORTAGE_GPG_SIGNING_COMMAND="gpg --sign --digest-algo SHA256 --clearsign --yes --default-key "${PORTAGE_GPG_KEY}" --homedir "${PORTAGE_GPG_DIR}" "${FILE}""

PORTAGE_INST_GID="0"

PORTAGE_INST_UID="0"

PORTAGE_INTERNAL_CALLER="1"

PORTAGE_OVERRIDE_EPREFIX=""

PORTAGE_PYM_PATH="/usr/lib64/python3.4/site-packages"

PORTAGE_PYTHONPATH="/usr/lib64/python3.4/site-packages"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"

PORTAGE_RSYNC_RETRIES="-1"

PORTAGE_SYNC_STALE="30"

PORTAGE_TMPDIR="/tmp"

PORTAGE_VERBOSE="1"

PORTAGE_WORKDIR_MODE="0700"

PORTAGE_XATTR_EXCLUDE="btrfs.* security.evm security.ima    security.selinux system.nfs4_acl"

PORT_LOGDIR_CLEAN="find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +7 -delete"

POSTGRES_TARGETS="postgres9_5"

PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND"

PWD="/data/portage/metadata/glsa"

PYTHONDONTWRITEBYTECODE="1"

PYTHON_SINGLE_TARGET="python3_4"

PYTHON_TARGETS="python2_7 python3_4"

QT_GRAPHICSSYSTEM="raster"

QT_PLUGIN_PATH="/usr/lib64/kde4/plugins"

RESUMECOMMAND="wget -c -t 3 -T 60 --passive-ftp -O "${DISTDIR}/${FILE}" "${URI}""

RESUMECOMMAND_RSYNC="rsync -avP "${URI}" "${DISTDIR}/${FILE}""

RESUMECOMMAND_SSH="bash -c "x=\${2#ssh://} ; host=\${x%%/*} ; port=\${host##*:} ; host=\${host%:*} ; [[ \${host} = \${port} ]] && port= ; exec rsync --rsh=\"ssh \${port:+-p\${port}} \${3}\" -avP \"\${host}:/\${x#*/}\" \"\$1\"" rsync "${DISTDIR}/${FILE}" "${URI}" "${PORTAGE_SSH_OPTS}""

ROOT="/"

ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0"

RPMDIR="/usr/portage/rpm"

RUBY_TARGETS="ruby22"

R_HOME="/usr/lib64/R"

SHELL="/bin/bash"

SHLVL="3"

SSH_ASKPASS="/usr/bin/ssh-askpass-fullscreen"

SUDO_COMMAND="/bin/bash -c /usr/bin/xterm -j -cm"

SUDO_GID="1001"

SUDO_UID="1000"

SUDO_USER="lyall"

SYMLINK_LIB="yes"

TERM="dumb"

TERMCAP=""

TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"

UNINSTALL_IGNORE="/lib/modules/* /var/run /var/lock"

USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr emacs emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg lcms libnotify mad mng modules mp3 mp4 mpeg multilib mysql mysqli ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 qt5 readline sdl seccomp session spell ssl startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias access_compat dumpio" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="en-AU en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en-AU en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

USER="root"

USERLAND="GNU"

USERNAME="root"

USE_EXPAND="ABI_MIPS ABI_PPC ABI_S390 ABI_X86 ALSA_CARDS APACHE2_MODULES APACHE2_MPMS CALLIGRA_EXPERIMENTAL_FEATURES CALLIGRA_FEATURES CAMERAS COLLECTD_PLUGINS CPU_FLAGS_ARM CPU_FLAGS_X86 CROSSCOMPILE_OPTS CURL_SSL ELIBC ENLIGHTENMENT_MODULES FFTOOLS GPSD_PROTOCOLS GRUB_PLATFORMS INPUT_DEVICES KERNEL L10N LCD_DEVICES LIBREOFFICE_EXTENSIONS LINGUAS LIRC_DEVICES LLVM_TARGETS MONKEYD_PLUGINS NETBEANS_MODULES NGINX_MODULES_HTTP NGINX_MODULES_MAIL NGINX_MODULES_STREAM OFED_DRIVERS OFFICE_IMPLEMENTATION OPENMPI_FABRICS OPENMPI_OFED_FEATURES OPENMPI_RM PHP_TARGETS POSTGRES_TARGETS PYTHON_SINGLE_TARGET PYTHON_TARGETS QEMU_SOFTMMU_TARGETS QEMU_USER_TARGETS ROS_MESSAGES RUBY_TARGETS SANE_BACKENDS USERLAND UWSGI_PLUGINS VIDEO_CARDS VOICEMAIL_STORAGE XFCE_PLUGINS XTABLES_ADDONS"

USE_EXPAND_HIDDEN="ABI_MIPS ABI_PPC ABI_S390 CPU_FLAGS_ARM CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"

USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND"

USE_EXPAND_UNPREFIXED="ARCH"

USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm-linux arm64 hppa ia64 m68k m68k-mint mips nios2 ppc ppc64 ppc64-linux ppc-aix ppc-macos riscv s390 sh sparc sparc64-solaris sparc-fbsd sparc-solaris x64-cygwin x64-macos x64-solaris x86 x86-cygwin x86-fbsd x86-linux x86-macos x86-solaris x86-winnt"

USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mingw mintlib musl NetBSD OpenBSD SunOS uclibc Winnt"

USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt"

USE_EXPAND_VALUES_USERLAND="BSD GNU"

USE_ORDER="env:pkg:conf:defaults:pkginternal:repo:env.d"

VBOX_APP_HOME="/usr/lib64/virtualbox"

VIDEO_CARDS="nvidia vesa fbdev"

WINDOWID="41943053"

WWWBROWSER="/usr/bin/firefox"

XAUTHORITY="/home/lyall/.Xauthority"

XDG_CONFIG_DIRS="/etc/xdg"

XDG_DATA_DIRS="/usr/local/share:/usr/share"

XEDITOR="/usr/bin/emacsclient"

XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"

XTERM_LOCALE="en_AU.utf8"

XTERM_SHELL="/bin/bash"

XTERM_VERSION="XTerm(327)"

ftp="ftp -vip"

```

----------

## fedeliallalinea

Seems that glsa-check from gentoolkit is bugged, try to run glsa-check from portage

```
$ /usr/lib/portage/python2.7/glsa-check --verbose --test all
```

or

```
$ /usr/lib/portage/python3.4/glsa-check --verbose --test all
```

----------

## lyallp

Thanks for that!

 :Smile: 

----------

## jkroon

Same problem.  Except both glsa-check variants (/usr/bin/glsa-check from gentoolkit as well as /usr/lib/portage/python2.7/glsa-check --verbose --test all) gives me similar problems:

```
bender ~ # glsa-check -l

Traceback (most recent call last):

  File "/usr/lib/python-exec/python3.4/glsa-check", line 186, in <module>

    if myglsa.isVulnerable():

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 683, in isVulnerable

    or (None != getMinUpgrade([v,], path["unaff_atoms"]))

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 425, in getMinUpgrade

    avail_updates.update(match(u, "porttree"))

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 345, in match

    return revisionMatch(atom, db, match_type=match_type)

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 381, in revisionMatch

    r2 = portage.pkgsplit(revisionAtom[3:])[-1][1:]

TypeError: 'NoneType' object is not subscriptable
```

```
bender ~ # /usr/lib/portage/python2.7/glsa-check --verbose --test all

Traceback (most recent call last):

  File "/usr/lib/portage/python2.7/glsa-check", line 278, in <module>

    if myglsa.isVulnerable():

  File "/usr/lib64/python2.7/site-packages/portage/glsa.py", line 664, in isVulnerable

    self.portdbapi, self.vardbapi))

  File "/usr/lib64/python2.7/site-packages/portage/glsa.py", line 382, in getMinUpgrade

    avail_updates.update(match(u, portdbapi))

  File "/usr/lib64/python2.7/site-packages/portage/glsa.py", line 298, in match

    return revisionMatch(atom, dbapi, match_type=match_type)

  File "/usr/lib64/python2.7/site-packages/portage/glsa.py", line 334, in revisionMatch

    r2 = pkgsplit(revisionAtom[3:])[-1][1:]

TypeError: 'NoneType' object has no attribute '__getitem__'
```

```
 * Searching for gentoolkit ...

[IP-] [  ] app-portage/gentoolkit-0.3.3:0

 * Searching for portage ...

[IP-] [  ] sys-apps/portage-2.3.8:0

 * Searching for python ...

[IP-] [  ] dev-lang/python-2.7.12:2.7

[IP-] [  ] dev-lang/python-3.4.5:3.4/3.4m
```

I've got at least four machines with the same identical problem.  Versions of the above packages are all identical.

----------

## randalla

I'm having this same problem:

```
host ~ # glsa-check -t all

Traceback (most recent call last):

  File "/usr/lib/python-exec/python3.4/glsa-check", line 345, in <module>

    if myglsa.isVulnerable():

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 683, in isVulnerable

    or (None != getMinUpgrade([v,], path["unaff_atoms"]))

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 411, in getMinUpgrade

    u_installed = reduce(operator.add, [match(u, "vartree") for u in unaffectedList], [])

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 411, in <listcomp>

    u_installed = reduce(operator.add, [match(u, "vartree") for u in unaffectedList], [])

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 345, in match

    return revisionMatch(atom, db, match_type=match_type)

  File "/usr/lib64/python3.4/site-packages/gentoolkit/glsa/__init__.py", line 381, in revisionMatch

    r2 = portage.pkgsplit(revisionAtom[3:])[-1][1:]

TypeError: 'NoneType' object is not subscriptable
```

```
host ~ # /usr/lib/portage/python2.7/glsa-check -t all

This system is not affected by any of the listed GLSAs
```

```
host ~ # /usr/lib/portage/python3.4/glsa-check -t all

This system is not affected by any of the listed GLSAs
```

----------

## fedeliallalinea

Interesting, in my home system the problem not exists.

----------

## randalla

For me, it's glsa-201709-21.xml that is causing the issue. If I remove it, the problem goes away.

----------

## randalla

 *fedeliallalinea wrote:*   

> Interesting, in my home system the problem not exists.

 

In a VM, I removed everything PHP related, and ran glsa-check -t all. It worked without issue. For it to fail, it appears that php has to be installed.

----------

## GEDIK

 *randalla wrote:*   

>  *fedeliallalinea wrote:*   Interesting, in my home system the problem not exists. 
> 
> In a VM, I removed everything PHP related, and ran glsa-check -t all. It worked without issue. For it to fail, it appears that php has to be installed.

 

You are right.

removing /usr/portage/metadata/glsa/glsa-201709-21.xml on PHP enabled system solved the problem.

to avoid rsyncing glsa-201709-21.xml with emerge --sync:

```
# echo metadata/glsa/glsa-201709-21.xml >> /etc/portage/rsync_excludes

# echo 'PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes"' >> /etc/portage/make.conf
```

----------

## fedeliallalinea

 *GEDIK wrote:*   

>  *randalla wrote:*    *fedeliallalinea wrote:*   Interesting, in my home system the problem not exists. 
> 
> In a VM, I removed everything PHP related, and ran glsa-check -t all. It worked without issue. For it to fail, it appears that php has to be installed. 
> 
> You are right.
> ...

 

This is not the solution, for example in my system the problem is with glsa-201709-22.xml because I installed dev-java/icedtea-bin.

The problem seems that when atom has slot (ex: >=~dev-java/icedtea-bin-7.2.6.11:7 or >=~dev-lang/php-5.6.31:5.6), for this I create a patch for gentoolkit 0.3.3.

I'm definitely not sure if this is the real problem or if is the best solution but it seems to work

----------

## randalla

I spoke with the developer who fixed 201709-22 and he resolved 201709-21. It only happened if dev-lang/php was installed, which is why it was missed by a lot of people (including the developers)

This is the bug entered on both: https://bugs.gentoo.org/631968

----------

## fedeliallalinea

I thought that problem was in code, I didn't thought he might be xml files.

Thanks for report this.

----------

