Skip to content

Feature suggestion: make wildcards in IgnorePkg work the same way as they do for pacman. #23

@gruenfron

Description

@gruenfron

I use pacaur over pacman ever since and only annoyance so far for me was the fact that wildcards in
IgnorePkg do not really work as expected.

E.g. I had virtualbox* ignored for a decent time which worked for the standard repositories but not for the AUR part. Also setting e.g. microchip-mplab* doesn't work at all.

So here is my proposal to fix that, it works for me and might be worth to be adopted after testing/reviewing it:

--- a/pacaur
+++ b/pacaur
@@ -206,12 +206,13 @@
 
     checkaurpkgsAver=($(GetJson "$json" "Version"))
     checkaurpkgsQver=($(expac -Q '%v' "${checkaurpkgs[@]}"))
+    ignoredpkgspattern=$(echo ${ignoredpkgs[@]} | sed 's/ /\|/g')
     for i in "${!checkaurpkgs[@]}"; do
         [[ -n "$(grep -E "\-(cvs|svn|git|hg|bzr|darcs|daily.*|nightly.*)$" <<< ${checkaurpkgs[$i]})" ]] && checkaurpkgsAver[$i]=$"latest"
     done
     for i in "${!checkaurpkgs[@]}"; do
         unset isignored
-        if [[ " ${ignoredpkgs[@]} " =~ " ${checkaurpkgs[$i]} " ]]; then
+        if [[ " ${checkaurpkgs[$i]} " =~ ${ignoredpkgspattern} ]]; then
             isignored=true
         elif [[ -n "${ignoredgrps[@]}" ]]; then
             unset checkaurpkgsAgrp checkaurpkgsQgrp

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions