fosskers / aura

A multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
GNU General Public License v3.0
1.74k stars 112 forks source link

Aur search can't handle dashes in the search term #869

Closed RubenKelevra closed 1 month ago

RubenKelevra commented 1 month ago

I'm currently using Aura 4.0.0, and I noticed that Aura can't handle dashes in the search term, if searching the AUR:

$ aura -Ss firefox-extension
extra/firefox-extension-mailvelope 5.1.2-1 (firefox-addons)
    Browser extension for OpenPGP encryption with Webmail
extra/firefox-extension-passff 1.17.0-1 (firefox-addons)
    zx2c4 pass manager addon for firefox

$ aura -As firefox-extension

Despite there being search results:

aura -As firefox | grep extension
aur/firefox-extension-video-download-helper 9.0.2.12-1 (3 | 0.00) 
    Adds a 'firefox'-symlink for 'firefox-developer-edition'. Also symlinks extensions, icon- and .desktop-files.
aur/firefox-extension-undo-close-tab-button 1.7-1 (1 | 0.00) 
    Browser extension that adds toolbar buttons for quick access to undo the closing of tabs
aur/firefox-extension-gooreplacer 3.13.0-2 (1 | 0.00) 
    A browser extension to modify HTTP requests
aur/firefox-extension-canvasblocker-bin 1.10.1-2 (1 | 0.09) 
aur/firefox-extension-facebook-container 2.3.9-1 (1 | 0.00) 
    Firefox extension that enables interacting with Ethereum Virtual Machine networks enabled websites
aur/extension-downloader-git v0.1.0.r7.gf683f75-1 (0 | 0.00) 
    Download browser extensions for Firefox and Chromium-based browsers
aur/firefox-esr-extension-download-with-aria2 4.10.0.2702-1 (0 | 0.00) 
aur/firefox-esr-extension-privacybadger 2024.6.14-1 (0 | 0.00) 
aur/firefox-extension-enhancer-for-youtube-bin 2.0.126-2 (0 | 0.00) 
aur/firefox-extension-overbitenx 0.9.2.1-1 (0 | 0.00) 
aur/firefox-extension-violentmonkey-bin 2.19.0-1 (0 | 0.00) 
aur/firefox-extension-return-youtube-dislike-bin 3.0.0.13-1 (0 | 0.00) 
xfzv commented 1 month ago

Maybe unrelated but

% aura -As firefox --reverse | tail -n 20

results are strange, considering search results are sorted by votes by default:

aur/firefox-esr-i18n-sr 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-pl 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-gd 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-da 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-zh-cn 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-gn 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-cs 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-i18n-ff 128.0-1 (49 | 1.52)
    Standalone web browser from mozilla.org, Extended Support Release
aur/firefox-esr-bin 128.0-1 (162 | 1.01)
    Standalone web browser from mozilla.org - Extended Support Release
aur/firefox-kde-opensuse 127.0-1 (334 | 0.00)
    Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE

comparison with

% paru -Ss firefox | tail -n 20
aur/lastpass 4.125.0.4-1 [+94 ~0.00]
    The Universal LastPass installer for Firefox, Chrome, and Opera
aur/librewolf 128.0.3-1 [+131 ~8.65]
    Community-maintained fork of Firefox, focused on privacy, security and freedom.
aur/palemoon 1:33.2.1-1 [+141 ~0.00]
    Open source web browser based on Firefox focusing on efficiency.
aur/firefox-esr-bin 128.0-1 [+162 ~1.01]
    Standalone web browser from mozilla.org - Extended Support Release
aur/palemoon-bin 1:33.2.0-1 [+196 ~0.50] [Out-of-date: 2024-07-16]
    Open source web browser based on Firefox focusing on efficiency.
aur/icecat 115.12.0-1 [+250 ~0.17] [Out-of-date: 2024-07-09]
    GNU version of the Firefox ESR browser
aur/firefox-kde-opensuse 127.0-1 [+334 ~0.00] [Out-of-date: 2024-07-27]
    Standalone web browser from mozilla.org with OpenSUSE patch, integrate better with KDE
aur/librewolf-bin 128.0.3-1 [+372 ~16.54]
    Community-maintained fork of Firefox, focused on privacy, security and freedom.
aur/firefox-beta-bin 129.0rc1-1 [+398 ~0.01]
    Standalone web browser from mozilla.org - Beta
aur/firefox-nightly 130.0a1+20240723.1+h17630c12ac58-1 [+609 ~0.16]
    Fast, Private & Safe Web Browser (Nightly version)
aur/tor-browser-bin 13.5.1-1 [+1281 ~2.07]
    Tor Browser Bundle: anonymous browsing using Firefox and Tor

I'd expect to see firefox-nightly, firefox-beta-bin, librewolf-bin before firefox-esr-bin considering they have many more votes, but they're not even listed (even without | tail -n 20).

fosskers commented 1 month ago

Aura can't handle dashes in the search term

For that, search by each term individually.

> aura -As firefox extension --limit 5
aur/firefox-extension-arch-search 1.0.5-2 (18 | 0.02) 
    A set of Web Extensions that adds ArchLinux (bug tracker, forum, packages, wiki, AUR) as a search engine to the Firefox browser.
aur/firefox-extension-greasemonkey 4.11-1 (17 | 0.00) 
    Customize the way a web page displays or behaves, by using small bits of JavaScript.
aur/chrome-token-signing 1:1.1.5.547-1 (15 | 0.00) 
    Chrome and Firefox extension for signing with your eID on the web
aur/firefox-extension-keepassxc-browser 1.9.1.1-1 (12 | 0.00) 
    Official browser plugin for the KeePassXC password manager.
aur/firefox-extension-plasma-integration-bin 1.9.1-2 (7 | 0.12) 
    Multitask efficiently by controlling browser functions from the Plasma desktop.

aura -As firefox --reverse | tail -n 20

You can use --limit instead of a manual tail.

I'd expect to see firefox-nightly, firefox-beta-bin, librewolf-bin before firefox-esr-bin

Confirmed. This isn't Aura's fault per se but something in the Faur. I'll look into it.

RubenKelevra commented 1 month ago

For that, search by each term individually.

Errrr the issue here is not, that you can't do something different, the issue is, that it breaks the principle of the least astonishment. One should be able to search for a package name, without having to remove the dashes.

Apart from that, it's not the same thing, because the order of the search words is not preserved:

$ paru -Ss --aur extension-firefox
$ aura -As extension firefox --limit 5
aur/firefox-extension-arch-search 1.0.5-2 (18 | 0.02) 
    A set of Web Extensions that adds ArchLinux (bug tracker, forum, packages, wiki, AUR) as a search engine to the Firefox browser.
aur/firefox-extension-greasemonkey 4.11-1 (17 | 0.00) 
    Customize the way a web page displays or behaves, by using small bits of JavaScript.
aur/chrome-token-signing 1:1.1.5.547-1 (15 | 0.00) 
    Chrome and Firefox extension for signing with your eID on the web
aur/firefox-extension-keepassxc-browser 1.9.1.1-1 (12 | 0.00) 
    Official browser plugin for the KeePassXC password manager.
aur/firefox-extension-plasma-integration-bin 1.9.1-2 (7 | 0.12) 
    Multitask efficiently by controlling browser functions from the Plasma desktop.

This leads to wildly different search results, depending on the term:

``` paru -Ss --aur linux-headers aur/linux-xanmod-lts-linux-headers-bin-x64v4 6.6.43-1 [+0 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (LTS) - Prebuilt version - x64v4 aur/linux-xanmod-lts-linux-headers-bin-x64v2 6.6.43-1 [+0 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (LTS) - Prebuilt version - x64v2 aur/linux-xanmod-lts-linux-headers-bin-x64v1 6.6.43-1 [+0 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (LTS) - Prebuilt version - x64v1 aur/linux-xanmod-edge-linux-headers-bin-x64v4 6.10.2-1 [+0 ~0.00] The Linux kernel and modules with Xanmod patches - Rolling Release (EDGE) - Prebuilt version - x64v4 aur/linux-xanmod-edge-linux-headers-bin-x64v2 6.10.2-1 [+0 ~0.00] The Linux kernel and modules with Xanmod patches - Rolling Release (EDGE) - Prebuilt version - x64v2 aur/linux-xanmod-lts-linux-headers-bin-x64v3 6.6.43-1 [+1 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (LTS) - Prebuilt version - x64v3 aur/linux-xanmod-linux-headers-bin-x64v4 6.9.12-1 [+1 ~0.01] The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v4 aur/peak-linux-headers 8.12.0-1 [+2 ~0.00] [Out-of-date: 2024-01-02] Linux headers for PEAK CAN adapter aur/linux-xanmod-linux-headers-bin-x64v1 6.9.12-1 [+2 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v1 aur/linux-xanmod-linux-headers-bin-x64v2 6.9.12-1 [+3 ~0.00] The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v2 aur/linux-xanmod-edge-linux-headers-bin-x64v3 6.10.2-1 [+3 ~0.09] The Linux kernel and modules with Xanmod patches - Rolling Release (EDGE) - Prebuilt version - x64v3 aur/linux-xanmod-linux-headers-bin-x64v3 6.9.12-1 [+14 ~0.78] The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v3 aur/zfs-linux-headers 2.2.4_6.9.7.arch1.1-1 [+270 ~1.36] [Out-of-date: 2024-07-08] Kernel headers for the Zettabyte File System. ``` ``` ❯ aura -As linux headers aur/linux-ck-headers 6.9.10-1 (458 | 0.15) Headers and scripts for building modules for Linux-ck kernel aur/linux-mainline-headers 6.11rc1-1 (275 | 3.64) Headers and scripts for building modules for the Linux Mainline kernel aur/zfs-linux-headers 2.2.4_6.9.7.arch1.1-1 (270 | 1.36) Kernel headers for the Zettabyte File System. aur/linux-lqx-headers 6.9.12.lqx1-1 (159 | 0.90) Headers and scripts for building modules for the Linux Liquorix kernel aur/zfs-linux-lts-headers 2.2.4_6.6.36.1-1 (79 | 0.82) Kernel headers for the Zettabyte File System. aur/linux-vfio-headers 6.10.2-1 (73 | 0.00) Headers and scripts for building modules for the Linux kernel (ACS override and i915 VGA arbiter patches) aur/linux-clear-headers 6.9.8-1 (71 | 0.77) Headers and scripts for building modules for the Clear Linux kernel aur/linux-macbook-headers 5.9.9.arch1-1 (45 | 0.00) Header files and scripts for building modules for Linux-macbook kernel aur/arm-linux-gnueabihf-linux-api-headers 6.8.9-1 (37 | 0.09) Kernel headers sanitized for use in userspace aur/linux-amd-headers 6.8.v.8-2 (31 | 0.85) Header files and scripts for building modules for Linux kernel aimed at the ZNVER4/MZEN4 AMD CPU based hardware aur/linux-zen-git-headers 6.6.10+1219797+g0c2d40dc6a85-1 (28 | 0.00) Featureful kernel including various new features, code and optimizations to better suit desktops aur/linux-amd-staging-drm-next-headers-git 6.3.r1177048.5e4d5d939dd6-1 (24 | 0.00) Headers and scripts for building modules for the Linux kernel with bleeding-edge AMDGPU drivers kernel aur/linux-cachyos-headers 6.10.1-2 (21 | 0.56) Headers and scripts for building modules for the Linux SCHED-EXT + BORE + Cachy Sauce Kernel by CachyOS with other patches and improvements kernel aur/linux-next-git-headers 20240718.r0.g73399b58e5e5-2 (17 | 0.00) Headers and scripts for building modules for the Linux NEXT kernel aur/linux-vfio-lts-headers 6.6.43-1 (15 | 0.00) Headers and scripts for building modules for the LTS Linux kernel (ACS override and i915 VGA arbiter patches) aur/zfs-linux-zen-headers 2.2.4_6.9.7.zen1.1-1 (13 | 0.37) Kernel headers for the Zettabyte File System. aur/linux-xanmod-lts-headers 6.6.43-1 (13 | 0.00) Headers and scripts for building modules for the Linux Xanmod - Long Term Support [LTS] kernel aur/linux-covolunablu-gaming-headers 6.1.12.arch1-1 (11 | 0.00) Headers and scripts for building modules for the linux-covolunablu-gaming kernel aur/selinux-refpolicy-arch 20231002-1 (11 | 0.02) Modular SELinux reference policy including headers and docs with Arch Linux patches aur/linux-lts61-headers 6.1.102-1 (11 | 1.47) Headers and scripts for building modules for the LTS Linux kernel aur/linux-amd-znver3-headers 6.10.v.2-1 (11 | 0.90) Header files and scripts for building modules for the linux-amd-znver3 kernel aur/linux-amd-raven-headers 6.8.v.8-1 (11 | 0.00) Header files and scripts for building modules for Linux kerel with working amdgpu for Raven Ridge hardware aur/linux-lts510-headers 5.10.223-1 (10 | 0.16) Headers and scripts for building modules for the LTS 5.10 Linux kernel aur/linux-nitrous-headers 6.10.2-1 (10 | 0.00) Header files and scripts for building modules for Linux kernel (tagged git version) aur/linux-g14-headers 6.10.2.arch1-1 (9 | 0.13) Headers and scripts for building modules for the Linux-g14 kernel aur/linux-xanmod-anbox-headers 6.9.12-1 (8 | 0.05) Headers and scripts for building modules for the Linux Xanmod with ashmem and binder enabled for Anbox - Stable Mainline [MAIN] kernel aur/linux-xanmod-rt-headers 6.6.43-1 (8 | 0.18) Headers and scripts for building modules for the Linux Xanmod real-time version kernel aur/linux-xanmod-rog-headers 5.16.11.xanmod0-1 (7 | 0.00) Headers and scripts for building modules for the Linux Xanmod kernel aur/linux-amd-headers-git 6.7.r1233502.699d392903c3-1 (7 | 0.00) Headers and scripts for building modules for the Linux kernel with bleeding-edge AMDGPU drivers kernel aur/linux-cachyos-bore-headers 6.10.1-1 (7 | 0.17) Headers and scripts for building modules for the Linux BORE + Cachy Sauce scheduler Kernel by CachyOS with other patches and improvements kernel aur/linux-rc-headers 6.10rc1-1 (5 | 0.00) Headers and scripts for building modules for the linux-rc package aur/arm-frc-linux-gnueabi-linux-api-headers 4.4-1 (4 | 0.00) Kernel headers sanitized for use in userspace (arm-frc-linux-gnueabi) aur/linux-tt-headers 6.5.9-2 (4 | 0.00) Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel aur/linux-lts-versioned-headers-bin 6.6.42-1 (4 | 0.00) Metapackage depending on linux6.6.42-1-lts-headers-bin aur/linux-xanmod-edge-headers 6.10.2-1 (3 | 1.01) Headers and scripts for building modules for the Linux Xanmod - Rolling Release [EDGE] kernel aur/linux-baytrail49-headers 4.9.330.315.057159bf2-1 (3 | 0.00) Header files and scripts for building modules for Linux-baytrail49 kernel with baytrail freeze fixes aur/linux-clear-preempt-rt-headers 6.1.95-1 (3 | 0.00) Headers and scripts for building modules for the Clear Linux Preempt-RT kernel aur/linux-cachyos-tt-headers 6.5.9-2 (3 | 0.00) Headers and scripts for building modules for the Linux TT scheduler Kernel by CachyOS with other patches and improvements kernel aur/linux-cachyos-bmq-headers 6.5.9-2 (3 | 0.00) Headers and scripts for building modules for the Linux BMQ scheduler Kernel by CachyOS with other patches and improvements kernel aur/linux-clear-ltscurrent-headers 6.1.77-1 (3 | 1.00) Headers and scripts for building modules for the Clear Linux ltscurrent kernel aur/linux6.10.2.zen1-1-zen-headers-bin 6.10.2.zen1-1 (3 | 0.00) Headers and scripts for building modules for the Linux ZEN kernel 6.10.2-zen1-1-zen aur/linux-clear-lts2018-headers 4.19.295-1 (3 | 0.00) Headers and scripts for building modules for the Clear Linux lts2018 kernel aur/linux-xanmod-edge-linux-headers-bin-x64v3 6.10.2-1 (3 | 0.09) The Linux kernel and modules with Xanmod patches - Rolling Release (EDGE) - Prebuilt version - x64v3 aur/linux-neptune-65-headers 6.5.0.valve13-1 (2 | 0.71) Headers and scripts for building modules for the SteamOS linux-neptune 6.5 mirrored from Valve kernel aur/mips64-linux-gnu-linux-api-headers 5.19.2-1 (2 | 0.00) Kernel headers sanitized for use in userspace (MIPS64 target, for the toolchain with GNU C library and multilib ABI) aur/linux-beacon-headers 5.16.11.arch1-1 (2 | 0.00) Headers and scripts for building modules for the Linux kernel aur/linux-xanmod-git-headers 6.9.9.xanmod1.r0.gebfe66c6a439-1 (2 | 0.00) Headers and scripts for building modules for the Linux Xanmod - git version kernel aur/linux-shmilee-headers 6.6.34-1 (2 | 0.00) Headers and scripts for building modules for the Linux-shmilee x64v3 kernel aur/linux-xanmod-linux-headers-bin-x64v1 6.9.12-1 (2 | 0.00) The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v1 aur/linux-mini-headers 6.0.9-1 (2 | 0.00) Headers and scripts for building modules for the Linux kernel and modules with minimal configuration kernel aur/linux-xanmod-bin 6.9.12-1 (2 | 0.00) The Linux kernel, modules and headers with Xanmod patches - Prebuilt version aur/linux-rust-headers 6.9.9.arch1-1 (2 | 0.57) Headers and scripts for building modules for the Rust Linux kernel aur/linux-kamakiri-headers 6.6.1.arch1-1 (1 | 0.01) Headers and scripts for building modules for the Linux Kamakiri kernel aur/linux-clear-ltsprev-headers 6.1.102-1 (1 | 1.00) Headers and scripts for building modules for the Clear Linux ltsprev kernel aur/linux-clear-lts2021-headers 5.15.134-1 (1 | 0.00) Headers and scripts for building modules for the Clear Linux lts2021 kernel aur/linux-llvm-headers 6.10.1-1 (1 | 0.00) Headers and scripts for building modules for the linux-llvm package aur/linux-clear-lts2020-headers 5.10.197-1 (1 | 0.00) Headers and scripts for building modules for the Clear Linux lts2020 kernel aur/linux-cachyos-eevdf-headers 6.10.1-1 (1 | 0.02) Headers and scripts for building modules for the Linux EEVDF scheduler + Cachy Sauce Kernel by CachyOS with other patches and improvements kernel aur/linux-zen-bmq-headers 6.10.1.zen1-1 (1 | 1.00) Headers and scripts for building modules for the linux-zen-bmq kernel aur/linux-nitrous-fire-headers 6.2.13-1 (1 | 0.00) Header files and scripts for building modules for Linux kernel (tagged git version) aur/linux-cachyos-hardened-headers 6.10.1-2 (1 | 0.00) Headers and scripts for building modules for the Linux BORE scheduler and hardened Kernel by CachyOS with other patches and improvements kernel aur/linux-cachyos-rt-headers 6.8.9-4 (1 | 0.00) Headers and scripts for building modules for the Linux RT + Cachy Sauce Kernel by CachyOS with other patches and improvements kernel aur/armv7l-linux-api-headers 6.6.32-1 (1 | 0.65) Kernel headers sanitized for use in armv7l userspace aur/linux-hardened-versioned-headers-bin 6.10.2.hardened1-1 (1 | 0.14) Metapackage depending on linux6.10.2.hardened1-1-hardened-headers-bin aur/linux-sgx-headers 5.19.0..sgx1-1 (1 | 0.00) Headers and scripts for building modules for the Linux kernel aur/linux-xanmod-linux-headers-bin-x64v4 6.9.12-1 (1 | 0.01) The Linux kernel and modules with Xanmod patches - Current Stable (MAIN) - Prebuilt version - x64v4 aur/linux-clear-cjktty-zfs-headers 6.8.7-1 (0 | 0.00) Clear Linux内核,带有zfs和cjktty并开启kexec aur/linux-rkbsp-joshua-git-headers 6.1.25.r1256322.b9b3be430754-1 (0 | 0.00) Headers and scripts for building modules for the linux-rockchip kernel, with patches picked by Joshua Riek focusing on RK3588 aur/powerpc64-linux-gnu-linux-api-headers 6.8-1 (0 | 0.00) Kernel headers sanitized for use in userspace (powerpc64-linux-gnu) aur/kernel-headers-musl-arm 4.19.88-1 (0 | 0.00) Linux kernel headers sanitized for use with musl libc (arm) aur/linux-clear-cjktty-headers 6.8.7-1 (0 | 0.00) Clear Linux内核,带有cjktty并开启kexec aur/linux-cachyos-cfs-headers 6.5.9-2 (0 | 0.00) Headers and scripts for building modules for the Linux CFS scheduler Kernel by CachyOS with other patches and improvements kernel aur/riscv64-linux-uclibc-linux-api-headers 5.8-1 (0 | 0.00) Kernel headers sanitized for use in userspace (riscv64-linux-uclibc) aur/linux-xanmod-headers-bin 6.2.12-1 (0 | 0.00) Headers and scripts for building modules for the Linux Xanmod - Prebuilt version aur/linux-ruisu-headers 4.4.0_47-1 (0 | 0.00) Header files and scripts for building modules for Linux-ruisu kernel aur/linux-amd-drm-next-headers 6.9.2024.03.08.1-1 (0 | 0.00) Headers and scripts for building modules for the Linux kernel next with bleeding edge AMD DRM drivers kernel aur/linux-tip-git-headers 6.6.0.r1215533.g96c6ffc69c32-1 (0 | 0.00) Headers and scripts for building modules for the Linux Kernel based on the tip branch kernel aur/linux-bnx2x-2.5g-headers 6.10.2.arch1-1 (0 | 0.00) Headers and scripts for building modules for the Linux kernel with 2.5G patch for bnx2x module aur/linux-mainline-git-headers v6.9.rc7.r56.45db3ab70092-1 (0 | 0.00) Headers and scripts for building modules for the Linus Torvalds' Mainline Linux kernel aur/linux-echo-headers 6.9.0-1 (0 | 0.00) Headers and scripts for building modules for the linux-echo package aur/mips64el-linux-gnu-linux-api-headers 5.19.2-1 (0 | 0.00) Kernel headers sanitized for use in userspace (MIPS64EL target, for the toolchain with GNU C library and multilib ABI) aur/linux-ck-lts-headers 5.10.157-2 (0 | 0.00) Headers and scripts for building modules for Linux-ck-lts kernel aur/linux-rangho-headers 6.4.7.rangho1-1 (0 | 0.00) Headers and scripts for building modules for the Linux ZEN with RangHo's local patches kernel aur/linux-parallella-headers 5.4.8-1 (0 | 0.00) aur/linux-opi-headers 6.1.43-1 (0 | 0.00) Linux kernel package targeting to pretest 6.1 merges for opi aur/powerpc-linux-gnu-glibc-headers 2.29-1 (0 | 0.00) GNU C Library headers (powerpc-linux-gnu) aur/linux-lts-bnx2x-2.5g-headers 6.6.24-1 (0 | 0.00) Headers and scripts for building modules for the LTS Linux kernel with 2.5G patch for bnx2x module aur/linux-galliumos-headers-bin 4.16.18-1 (0 | 0.00) GalliumOS kernel for most Chromebooks and Chromeboxes, version: 4.16.18 aur/linux-cachyos-echo-headers 6.9.9-1 (0 | 0.00) Headers and scripts for building modules for the Linux ECHO scheduler + Cachy Sauce Kernel by CachyOS with other patches and improvements kernel aur/linux-intel-alderlake-headers 6.10.1-1 (0 | 0.00) Headers and scripts for building modules for the linux-intel-alderlake package aur/linux-hardened-cf-headers 6.8.4.hardened1-1 (0 | 0.00) Headers and scripts for building modules for the Security-Hardened Linux with Cloudflare Patches kernel aur/loongarch64-linux-gnu-linux-api-headers 5.19.0-1 (0 | 0.00) Kernel headers sanitized for use in userspace (loongarch64-linux-gnu) aur/ia64-linux-gnu-linux-api-headers 6.9_epic2-1 (0 | 0.00) Kernel headers sanitized for use in userspace (IA64) (from linux-ia64 project) aur/linux-xanmod-edge-linux-headers-bin-x64v4 6.10.2-1 (0 | 0.00) The Linux kernel and modules with Xanmod patches - Rolling Release (EDGE) - Prebuilt version - x64v4 aur/linux-yoga9-headers 5.19.9.arch1-1 (0 | 0.00) Headers and scripts for building modules for the Linux for Lenovo Yoga9 kernel aur/linux-xanmod-lts-linux-headers-bin-x64v4 6.6.43-1 (0 | 0.00) The Linux kernel and modules with Xanmod patches - Current Stable (LTS) - Prebuilt version - x64v4 aur/linux-huawei-amd-audio-headers 6.4.2.arch1-1 (0 | 0.00) Headers and scripts for building modules for the Linux with patch for huawei amd devices from https://github.com/codepayne/pop- os-linux kernel aur/linux-amd-drm-fixes-headers 6.11.2024.07.27-1 (0 | 0.00) Headers and scripts for building modules for the Linux kernel fixes with bleeding edge AMD DRM drivers kernel aur/powerpc-linux-gnu-linux-api-headers 5.1-1 (0 | 0.00) Kernel headers sanitized for use in userspace (powerpc-linux-gnu) aur/powerpc64-linux-gnu-glibc-headers 2.39-1 (0 | 0.00) GNU C Library headers (powerpc64-linux-gnu) ```
fosskers commented 1 month ago

As mentioned above, Aura 4 uses its own metadata server. From the faur README:

Caveat: by=desc is term-based, not regex based. This is for performance reasons. So, packages?names=aura&by=desc will match on aura-bin but not on auralcap.

To vastly improve performance in the term-based search case, regex/substring-based searching is not possible. I realise this may be surprising and I apologise for that. The difference is simply due to the other package managers calling the AUR API directly. The Faur does other things that the AUR API does not, but to enable those this sacrifice was made.

fosskers commented 1 month ago

The issue of firefox-nightly etc. not appearing in the search terms has been fixed on the Faur side. If you try the search again you should be able to see that in your current version of Aura.

ultimatespirit commented 1 month ago

As mentioned above, Aura 4 uses its own metadata server. From the faur README:

Caveat: by=desc is term-based, not regex based. This is for performance reasons. So, packages?names=aura&by=desc will match on aura-bin but not on auralcap.

To vastly improve performance in the term-based search case, regex/substring-based searching is not possible. I realise this may be surprising and I apologise for that. The difference is simply due to the other package managers calling the AUR API directly. The Faur does other things that the AUR API does not, but to enable those this sacrifice was made.

Can we get a fallback option then? It's for all intents and purposes a regression to be incapable of searching for a direct package name at all. At least let a search reach out to the normal AUR api which seems to be stronger here if the user asks for it.

fosskers commented 1 month ago

If you search for a direct package name, it will find it. More specifically, if you pass multiple terms, like:

aura -As nintendo switch

Then any package which contains both nintendo and switch anywhere in its name, description, or keywords will be returned. Package names are split on - and _ for individual terms. There is then a cleaning process that strips off various symbols and filters out terms that are too short, etc. What remains form "indexes" by which future lookups are very fast, especially for compound searches as shown above. This is basically the main sell of the Faur, along with its ability to do "provides"-based lookups for dependency resolution.

The downside of this, as shown already, is that a search like aura -As nint will not yield Nintendo-related packages.

RubenKelevra commented 1 month ago

To vastly improve performance in the term-based search case, regex/substring-based searching is not possible. I realise this may be surprising and I apologise for that. The difference is simply due to the other package managers calling the AUR API directly. The Faur does other things that the AUR API does not, but to enable those this sacrifice was made.

I read about this, and I can see the benefit of using a dedicated server for this. But I can't really follow your argument why it can't search for full package names or substrings of that, if they contain a minus.

I mean, just do it like grep: By default search for the string byte-wise or basic regex, and if the user wants to use Regex he/she can specify '-E':

   Pattern Syntax
       -E, --extended-regexp
              Interpret PATTERNS as extended regular expressions (EREs, see below).

       -F, --fixed-strings
              Interpret PATTERNS as fixed strings, not regular expressions.

       -G, --basic-regexp
              Interpret PATTERNS as basic regular expressions (BREs, see below).  This is the default.

Btw grep has no issue with minus even if searching with extended regex:

$ paru -Ss firefox | /usr/bin/grep --basic-regexp "firefox-nightly" | head -n 10
aur/firefox-nightly-en-gb 115.0a1.20230517.153544-1 [+1 ~0.00] [Orphaned]
aur/firefox-nightly-i18n-zh-tw 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-zh-cn 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-xh 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-vi 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-uz 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-ur 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-uk 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-trs 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-tr 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]

$ paru -Ss firefox | /usr/bin/grep --extended-regexp "firefox-nightly" | head -n 10
aur/firefox-nightly-en-gb 115.0a1.20230517.153544-1 [+1 ~0.00] [Orphaned]
aur/firefox-nightly-i18n-zh-tw 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-zh-cn 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-xh 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-vi 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-uz 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-ur 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-uk 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-trs 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
aur/firefox-nightly-i18n-tr 106.0a1.20220827.173411-1 [+10 ~0.09] [Out-of-date: 2023-04-11] [Orphaned]
RubenKelevra commented 1 month ago

Then any package which contains both nintendo and switch anywhere in its name, description, or keywords will be returned. Package names are split on - and _ for individual terms.

Why not also add sections of multiple words to the index?

Like firefox-nightly-i18n-xh is adding these instead of just the individual words:

firefox
nightly
i18n
xh
firefox-nightly
firefox-nightly-i18n
firefox-nightly-i18n-xh
i18n-xh
nightly-i18n-xh
nightly-i18n
fosskers commented 1 month ago

One easy compromise is for Aura, on its end, to split the search input and send the split query to the Faur instead. So:

aura -As firefox-extension

would yield the same results as

aura -As firefox extension
fosskers commented 1 month ago

As discussed, the above two searches now yield the same results.

fosskers commented 1 month ago

I've released 4.0.1, I'm going to close this. Thanks again for reporting the issue.