Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 689728

Summary: app-portage/pfl-3.0.1: e-file syntax error when sh is a symlink to dash
Product: Portage Development Reporter: Ilya Trukhanov <lahvuun>
Component: Third-Party ToolsAssignee: Daniel Pielmeier <billie>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    

Description Ilya Trukhanov 2019-07-12 15:29:30 UTC
On my system `/bin/sh` is a symlink to `dash`. This causes the `e-file` shell script to fail with a syntax error once app-portage/pfl is updated to 3.0.1. This doesn't happen with 3.0-r2.

When `/bin/sh` is set to `bash`, `e-file` functions as expected.

If ran with bash, e.g. `bash e-file` (with `/bin/sh` symlinked to `dash`), the script functions as expected.

Reproducible: Always

Steps to Reproduce:
1. emerge dash
2. eselect sh set dash
3. emerge "=pfl-3.0.1"
4. e-file
Actual Results:  
```
/usr/bin/e-file: 9: /usr/bin/e-file: Syntax error: "(" unexpected
```

Expected Results:  
```
You need to pass one search term.
This is e-file (20110906)
Usage: e-file   [-c] [-h] filename
  -c color output could be either [always|never|auto]
  -h Print help
```

Portage 2.3.69 (python 3.6.8-final-0, default/linux/amd64/17.1/desktop, gcc-9.1.0, glibc-2.29-r2, 5.2.0-gentoo-rt1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.2.0-gentoo-rt1-x86_64-AMD_Ryzen_7_1700_Eight-Core_Processor-with-gentoo-2.6
KiB Mem:    32928560 total,    234268 free
KiB Swap:    8358208 total,   8358208 free
Timestamp of repository gentoo: Thu, 11 Jul 2019 10:00:01 +0000
Head commit of repository gentoo: e9917b14076ffa6a28ec420b8ee1b89284f186d4
Timestamp of repository dotnet: Wed, 10 Jul 2019 07:06:44 +0000
Head commit of repository dotnet: 85de9c915c59cf16d4b7b657658a84f4020f2529

Timestamp of repository guru: Fri, 05 Jul 2019 18:23:53 +0000
Head commit of repository guru: 49b59f840bb16b19839bb97ead4814210eba30d1

Head commit of repository nightdragon_layman: 9c63646b08f26b795fe57ed180d7b656cfa6b521

Timestamp of repository steam-overlay: Sun, 23 Jun 2019 09:13:23 +0000
Head commit of repository steam-overlay: e23c781f228a3abbded5e4305994e53fab234de3

sh dash 0.5.10.2
ld GNU ld (Gentoo 2.32 p2) 2.32.0
ccache version 3.7.1 [disabled]
app-shells/bash:          5.0_p7::gentoo
dev-lang/perl:            5.30.0::gentoo
dev-lang/python:          2.7.16::gentoo, 3.5.7::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/ccache:          3.7.1::gentoo
dev-util/cmake:           3.14.5::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            9.1.0-r1::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

dotnet
    location: /var/db/repos/dotnet
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/dotnet.git
    masters: gentoo

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

nightdragon_layman
    location: /var/db/repos/nightdragon_layman
    sync-type: git
    sync-uri: https://github.com/NightDragon1/nightdragon_layman.git
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

crossdev
    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

Installed sets: @witchertsu
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe -march=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=native"
GENTOO_MIRRORS="http://ftp.fi.muni.cz/pub/linux/gentoo/ ftp://ftp.fi.muni.cz/pub/linux/gentoo/ http://mirror.dkm.cz/gentoo/ https://mirror.dkm.cz/gentoo/ ftp://mirror.dkm.cz/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo caps cdda cdr cli crypt cxx dbus discord-presence dri dts dvd dvdr elogind emboss encode exif fam flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 jpeg lcms ldap libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline realtime sdl seccomp spell ssl staging startup-notification svg tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan wxwidgets x264 xattr xcb xinerama xml xv xvid zlib zsh-completion" 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" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a 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="libinput mouse keyboard wacom" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="arm x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" 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"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

app-portage/pfl-3.0.1::gentoo was built with the following:
USE="network-cron" ABI_X86="(64)" PYTHON_TARGETS="python3_6 -python3_5"
Comment 1 Daniel Pielmeier gentoo-dev 2019-07-13 12:47:19 UTC
Thanks for the report.

This should be fixed in Git with pfl-3.0.1-r1. Please reopen if there is still a problem.