Update command generating fish completions

Between a laptop and a desktop, there are different behaviors with the update command. They both use bash rather than fish, but only the desktop (mango) tries to generate fish completions at the end of the update. The laptop (kangaroo) has never done it once. Why is it not behaving the same way? I don't think it should waste time or power generating fish completions in the first place since I don't use fish.


Install dates:

[tech@mango ~]$ stat / | grep "Birth" | sed 's/Birth: //g' | cut -b 2-11
2021-06-18
[tech@kangaroo ~]$ stat / | grep "Birth" | sed 's/Birth: //g' | cut -b 2-11
2022-01-11

Desktop

[tech@mango ~]$ garuda-inxi
System:
Kernel: 5.16.10-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
root=UUID=1748cca7-e422-4ed9-bd5c-3d12856f8671 rw rootflags=subvol=@
quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
systemd.unified_cgroup_hierarchy=1
resume=UUID=dbb7a323-f52a-40d2-8ad1-ca512a750c83 loglevel=3
sysrq_always_enabled=1
Desktop: KDE Plasma 5.24.2 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASRock model: X570 Taichi serial: <superuser required>
UEFI: American Megatrends v: P4.30 date: 04/14/2021
CPU:
Info: model: AMD Ryzen 9 3900XT bits: 64 type: MT MCP arch: Zen 2
family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701021
Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 6 MiB desc: 12x512 KiB
L3: 64 MiB desc: 4x16 MiB
Speed (MHz): avg: 2200 high: 2204 min/max: 2200/4776 boost: enabled
scaling: driver: acpi-cpufreq governor: powersave cores: 1: 2199 2: 2200
3: 2200 4: 2200 5: 2200 6: 2200 7: 2200 8: 2200 9: 2197 10: 2200 11: 2200
12: 2200 13: 2198 14: 2204 15: 2200 16: 2203 17: 2201 18: 2200 19: 2200
20: 2200 21: 2199 22: 2200 23: 2200 24: 2200 bogomips: 182406
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
STIBP: conditional, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT / 6800M] vendor: ASRock
driver: amdgpu v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 ports:
active: DP-1, DP-2, DP-3, HDMI-A-1 empty: none bus-ID: 0f:00.0
chip-ID: 1002:73df class-ID: 0300
Device-2: Logitech C922 Pro Stream Webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 5-3:3 chip-ID: 046d:085c
class-ID: 0102 serial: <filter>
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: amdgpu,ati unloaded: modesetting,radeon alternate: fbdev,vesa
gpu: amdgpu display-ID: :0.0 screens: 1
Screen-1: 0 s-res: 7424x2070 s-dpi: 96 s-size: 1964x547mm (77.3x21.5")
s-diag: 2039mm (80.3")
Monitor-1: DisplayPort-0 mapped: DP-1 pos: 2-2 model: Acer G246HL
serial: <filter> built: 2013 res: 1920x1080 hz: 60 dpi: 92 gamma: 1.2
size: 531x299mm (20.9x11.8") diag: 609mm (24") ratio: 16:9 modes:
max: 1920x1080 min: 720x400
Monitor-2: DisplayPort-1 mapped: DP-2 pos: 3-1 model: Samsung SyncMaster
serial: <filter> built: 2006 res: 1024x1280 hz: 75 dpi: 86 gamma: 1.2
size: 301x376mm (11.9x14.8") diag: 482mm (19") ratio: 5:4 modes:
max: 1280x1024 min: 720x400
Monitor-3: DisplayPort-2 mapped: DP-3 pos: primary,1-3
model: LG (GoldStar) QHD serial: <filter> built: 2021 res: 2560x1440
hz: 144 dpi: 93 gamma: 1.2 size: 697x392mm (27.4x15.4")
diag: 800mm (31.5") ratio: 16:9 modes: max: 2560x1440 min: 640x480
Monitor-4: HDMI-A-0 mapped: HDMI-A-1 pos: 4-4 model: LCD TV built: 2011
res: 1920x1080 hz: 60 dpi: 3048 gamma: 1.2 size: 16x9mm (0.6x0.4")
diag: 6mm (0.2") ratio: 15:9 modes: max: 1920x1080 min: 640x480
OpenGL: renderer: AMD Radeon RX 6700 XT (NAVY_FLOUNDER DRM 3.44.0
5.16.10-zen1-1-zen LLVM 13.0.1)
v: 4.6 Mesa 21.3.6 direct render: Yes
Audio:
Device-1: AMD Navi 21 HDMI Audio [Radeon RX 6800/6800 XT / 6900 XT]
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 0f:00.1 chip-ID: 1002:ab28 class-ID: 0403
Device-2: AMD Starship/Matisse HD Audio vendor: ASRock
driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
bus-ID: 11:00.4 chip-ID: 1022:1487 class-ID: 0403
Device-3: C-Media USB PnP Sound Device type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 3-4:3 chip-ID: 0d8c:013a
class-ID: 0300
Device-4: Logitech C922 Pro Stream Webcam type: USB
driver: snd-usb-audio,uvcvideo bus-ID: 5-3:3 chip-ID: 046d:085c
class-ID: 0102 serial: <filter>
Sound Server-1: ALSA v: k5.16.10-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.47 running: yes
Network:
Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
speed: 5 GT/s lanes: 1 bus-ID: 05:00.0 chip-ID: 8086:2723 class-ID: 0280
IF: wlp5s0 state: down mac: <filter>
Device-2: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 07:00.0
chip-ID: 8086:1539 class-ID: 0200
IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: tailscale0 state: unknown speed: 10 Mbps duplex: full mac: N/A
IF-ID-2: virbr0 state: down mac: <filter>
Bluetooth:
Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8
bus-ID: 3-2:2 chip-ID: 8087:0029 class-ID: e001
Report: bt-adapter ID: hci0 rfk-id: 0 state: down
bt-service: enabled,running rfk-block: hardware: no software: no
address: <filter>
Drives:
Local Storage: total: 2.27 TiB used: 1.49 TiB (65.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: SSD 970 EVO Plus 2TB size: 1.82 TiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXM7 temp: 45.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 840 EVO 500GB
size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s
type: SSD serial: <filter> rev: DB6Q scheme: GPT
Partition:
ID-1: / raw-size: 1.75 TiB size: 1.75 TiB (100.00%) used: 1.49 TiB (85.0%)
fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-2: /boot/efi raw-size: 256 MiB size: 252 MiB (98.46%)
used: 546 KiB (0.2%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
ID-3: /home raw-size: 1.75 TiB size: 1.75 TiB (100.00%)
used: 1.49 TiB (85.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-4: /var/log raw-size: 1.75 TiB size: 1.75 TiB (100.00%)
used: 1.49 TiB (85.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
ID-5: /var/tmp raw-size: 1.75 TiB size: 1.75 TiB (100.00%)
used: 1.49 TiB (85.0%) fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: partition size: 69.07 GiB used: 0 KiB (0.0%)
priority: -2 dev: /dev/nvme0n1p3 maj-min: 259:3
ID-2: swap-2 type: zram size: 62.79 GiB used: 2.5 MiB (0.0%)
priority: 100 dev: /dev/zram0
Sensors:
System Temperatures: cpu: 33.5 C mobo: 36.0 C gpu: amdgpu temp: 57.0 C
mem: 56.0 C
Fan Speeds (RPM): fan-1: 0 fan-2: 954 fan-3: 0 fan-4: 1354 fan-5: 1085
fan-6: 2093 fan-7: 0 gpu: amdgpu fan: 0
Info:
Processes: 690 Uptime: 11h 17m wakeups: 0 Memory: 62.79 GiB
used: 16.82 GiB (26.8%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.2.0 clang: 13.0.1 Packages: pacman: 2745 lib: 616 flatpak: 0
Shell: Bash v: 5.1.16 running-in: yakuake inxi: 3.3.13
Garuda (2.5.5-1):
System install date:     2021-06-18
Last full system update: 2022-02-24
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       No/Undetected
Snapshots:               Snapper
Failed units:            aur-thumbsup.service [email protected]

Laptop

[tech@kangaroo ~]$ garuda-inxi
System:
Kernel: 5.16.10-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.2.0
parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=9c65131a-1fe0-4685-9200-500758a3284b
rw rootflags=subvol=@ quiet splash rd.udev.log_priority=3 vt.global_cursor_default=0
resume=UUID=555cc6db-f386-4367-8615-ba8a9794e697 loglevel=3
Console: pty pts/1 DM: LightDM 1.30.0 Distro: Garuda Linux base: Arch Linux
Machine:
Type: Laptop System: TOSHIBA product: Satellite L855D v: PSKAYU-008007
serial: <superuser required>
Mobo: TOSHIBA model: Portable PC v: MP serial: <superuser required> UEFI-[Legacy]: Insyde
v: 6.20 date: 11/07/2012
Battery:
ID-1: BAT0 charge: 41.3 Wh (100.0%) condition: 41.3/48.6 Wh (85.0%) volts: 10.8 min: 10.8
model: PA5024U-1BRS type: Li-ion serial: <filter> status: Full
CPU:
Info: model: AMD A8-4500M APU with Radeon HD Graphics bits: 64 type: MT MCP arch: Piledriver
family: 0x15 (21) model-id: 0x10 (16) stepping: 1 microcode: 0x6001119
Topology: cpus: 1x cores: 4 smt: enabled cache: L1: 192 KiB desc: d-4x16 KiB; i-2x64 KiB
L2: 4 MiB desc: 2x2 MiB
Speed (MHz): avg: 1827 high: 1894 min/max: 1400/1900 boost: enabled scaling:
driver: acpi-cpufreq governor: performance cores: 1: 1894 2: 1864 3: 1767 4: 1786
bogomips: 15173
Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: AMD Trinity [Radeon HD 7640G] vendor: Toshiba driver: radeon v: kernel
alternate: amdgpu ports: active: LVDS-1,VGA-1 empty: HDMI-A-1 bus-ID: 00:01.0
chip-ID: 1002:9903 class-ID: 0300
Device-2: Importek TOSHIBA Web Camera type: USB driver: uvcvideo bus-ID: 2-4:2
chip-ID: 10f1:1a3d class-ID: 0e02 serial: <filter>
Display: server: X.org v: 1.21.1.3 compositor: xfwm driver: X: loaded: ati,radeon
unloaded: modesetting alternate: fbdev,vesa gpu: radeon tty: 228x67
Monitor-1: LVDS-1 model: LG built: 2012 res: 1366x768 dpi: 101 gamma: 1.2
size: 344x194mm (13.5x7.6") diag: 395mm (15.5") ratio: 16:9 modes: max: 1366x768 min: 640x480
Monitor-2: VGA-1 model: Acer AL1706 serial: <filter> built: 2006 res: 1280x1024 dpi: 96
gamma: 1.2 size: 338x270mm (13.3x10.6") diag: 433mm (17") ratio: 5:4 modes: max: 1280x1024
min: 720x400
Message: GL data unavailable in console. Try -G --display
Audio:
Device-1: AMD Trinity HDMI Audio vendor: Toshiba driver: snd_hda_intel v: kernel
bus-ID: 00:01.1 chip-ID: 1002:9902 class-ID: 0403
Device-2: AMD FCH Azalia vendor: Toshiba driver: snd_hda_intel v: kernel bus-ID: 00:14.2
chip-ID: 1022:780d class-ID: 0403
Sound Server-1: ALSA v: k5.16.10-zen1-1-zen running: yes
Sound Server-2: PulseAudio v: 15.0 running: no
Sound Server-3: PipeWire v: 0.3.47 running: yes
Network:
Device-1: Qualcomm Atheros AR8162 Fast Ethernet vendor: Toshiba driver: alx v: kernel pcie:
gen: 1 speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 01:00.0 chip-ID: 1969:1090 class-ID: 0200
IF: enp1s0 state: down mac: <filter>
Device-2: Realtek RTL8188CE 802.11b/g/n WiFi Adapter driver: rtl8192ce v: kernel pcie: gen: 1
speed: 2.5 GT/s lanes: 1 port: 2000 bus-ID: 02:00.0 chip-ID: 10ec:8176 class-ID: 0280
IF: wlp2s0 state: down mac: <filter>
Device-3: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152 bus-ID: 7-2:3
chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
IF: enp0s16f0u2 state: up speed: 1000 Mbps duplex: full mac: <filter>
IF-ID-1: tailscale0 state: unknown speed: 10 Mbps duplex: full mac: N/A
Drives:
Local Storage: total: 238.47 GiB used: 143.71 GiB (60.3%)
SMART Message: Required tool smartctl not installed. Check --recommends
ID-1: /dev/sda maj-min: 8:0 vendor: A-Data model: SU800 size: 238.47 GiB block-size:
physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 7ANR scheme: MBR
Partition:
ID-1: / raw-size: 229.67 GiB size: 229.67 GiB (100.00%) used: 143.71 GiB (62.6%) fs: btrfs
dev: /dev/sda1 maj-min: 8:1
ID-2: /home raw-size: 229.67 GiB size: 229.67 GiB (100.00%) used: 143.71 GiB (62.6%)
fs: btrfs dev: /dev/sda1 maj-min: 8:1
ID-3: /var/log raw-size: 229.67 GiB size: 229.67 GiB (100.00%) used: 143.71 GiB (62.6%)
fs: btrfs dev: /dev/sda1 maj-min: 8:1
ID-4: /var/tmp raw-size: 229.67 GiB size: 229.67 GiB (100.00%) used: 143.71 GiB (62.6%)
fs: btrfs dev: /dev/sda1 maj-min: 8:1
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 5.27 GiB used: 596.2 MiB (11.0%) priority: 100 dev: /dev/zram0
ID-2: swap-2 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda2
maj-min: 8:2
Sensors:
System Temperatures: cpu: 65.8 C mobo: N/A gpu: radeon temp: 63.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 244 Uptime: 4d 14h 31m wakeups: 2 Memory: 5.27 GiB used: 2.26 GiB (42.9%)
Init: systemd v: 250 tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages:
pacman: 1514 lib: 438 Shell: Bash v: 5.1.16 running-in: pty pts/1 (SSH) inxi: 3.3.13
Garuda (2.5.5-1):
System install date:     2022-01-11
Last full system update: 2022-02-24
Is partially upgraded:   No
Relevant software:       NetworkManager
Windows dual boot:       <superuser required>
Snapshots:               Snapper
Failed units:            bluetooth-autoconnect.service

Snippet of desktop completion generation

( 8/11) Checking which packages need to be rebuilt
( 9/11) Updating the desktop file MIME type cache...
(10/11) Performing snapper post snapshots for the following configurations...
==> root: 6377
(11/11) Syncing all file systems...

~/.config/fish/config.fish (line 1): $(...) is not supported. In fish, please use '(pyenv)'.
eval "$(pyenv init -)"
^
from sourcing file ~/.config/fish/config.fish
called during startup
source: Error while reading file “/home/tech/.config/fish/config.fish”
Parsing man pages and writing completions to /home/tech/.local/share/fish/generated_completions/
11896 / 11896 : zramctl.8.gz

Checking for plugin updates
Nothing to install / update

System updated! 🐧

I’m not a developer, so I might not get the full picture here.
This is the interested piece of update code:

# Update fish completions
if [ -x /usr/bin/fish ] && [ ! -z “$SUDO_UID” ]; then
echo “”
sudo -u “#$SUDO_UID” fish -c fish_update_completions
fi

I think the completion command is executed, but in a bash shell fails due to the different syntax.
The easist thing would be probably to simply remove fish from the desktop if you don’t need it / like It.
Most likely there could be something else…

No, it doesn’t fail.

You should uninstall it then :slight_smile:

1 Like

Sure, fail was the wrong word. It is just doing its job. I Just wanted to end up saying to remove / uninstall as well :wink:

1 Like

I wish I could without fear of breaking things!
I hoped it would see my shell as not fish and know better, but if I can somehow remove fish that'll be a perfectly valid solution.

[tech@mango ~]$ pacman -Qi fish
Name            : fish
Version         : 3.3.1-1
Description     : Smart and user friendly shell intended mostly for interactive use
Architecture    : x86_64
URL             : https://fishshell.com/
Licenses        : GPL2
Groups          : None
Provides        : None
Depends On      : glibc  gcc-libs  ncurses  pcre2
Optional Deps   : python: man page completion parser / web config tool [installed]
pkgfile: command-not-found hook [installed]
Required By     : fish-autopair  garuda-fish-config
Optional For    : fzf  mcfly
Conflicts With  : None
Replaces        : None
Installed Size  : 17.07 MiB
Packager        : Felix Yan <[email protected]>
Build Date      : Thu 08 Jul 2021 09:52:26 AM EDT
Install Date    : Fri 16 Jul 2021 11:14:42 PM EDT
Install Reason  : Installed as a dependency for another package
Install Script  : Yes
Validated By    : Signature

[tech@mango ~]$ pacman -Qi garuda-fish-config
Name            : garuda-fish-config
Version         : 1.4.4-1
Description     : Fish configuration of Garuda Linux
Architecture    : any
URL             : https://gitlab.com/garuda-linux/themes-and-settings/settings/garuda-fish-config
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : bat  exa  expac  find-the-command-git  fish  fish-autopair  fzf  garuda-starship-prompt  mcfly
nerd-fonts-fantasque-sans-mono  pkgfile  tealdeer
Optional Deps   : None
Required By     : garuda-dr460nized
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 18.40 KiB
Packager        : Chaotic-AUR Wild Bear Node <[email protected]>
Build Date      : Sat 01 Jan 2022 12:46:18 AM EST
Install Date    : Tue 04 Jan 2022 09:26:17 PM EST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
[tech@mango ~]$ sudo pacman -Rs fish
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing fish breaks dependency 'fish' required by fish-autopair
:: removing fish breaks dependency 'fish' required by garuda-fish-config
[tech@mango ~]$ sudo pacman -Rs garuda-fish-config
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing garuda-fish-config breaks dependency 'garuda-fish-config' required by garuda-dr460nized

Okayyy fair enough you got me there >.>
Anyway, fish completions being generated shouldn't be thaaaat big of an issue hah

2 Likes

I would agree if I didn't update so frequently. It actually does take a while to generate 12k completions for 2.8k packages. All those minute waits will add up to wasted hours someday!

Alright, I'll add an environment variable you can add to garuda-update's config file later today.

5 Likes

@dr460nf1r3 sorry to ping, but you seem to have moved garuda-fish-config from stable to archive, is there some manual intervention required here? PKGBUILD/garuda-fish-config · master · Garuda Linux / Archive · GitLab

This is the current one:

5 Likes

I just wanted to suggest this, nice.

@Technetium the above linked repo contains the actual used files, so no need to intervene :slight_smile:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

So I did end up forgetting about the environment variable >.>
Well anyway, I don't think there's a need now, since I've kicked generating the fish completions into a background systemd unit from now on.

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.