depends: revert to functional style
commit2e0099f969144871891f30792000ac38b01bfe39
authorAlad Wenter <alad@archlinux.org>
Mon, 18 Sep 2023 13:31:35 +0000 (18 15:31 +0200)
committerAlad Wenter <alad@archlinux.org>
Mon, 18 Sep 2023 13:44:26 +0000 (18 15:44 +0200)
treef8263c259839dd20fff736b226cbea6735221611
parentefaedb676d885bf4ab7db55be7f59cfc55a2548e
depends: revert to functional style

When iterating over the package results, an entry can be a `pkgname`, a
`provides`, or both. Return to the functional style in aurutils <=17.3
using `map` (iteration variable `$_`) to reflect this.

Compared to the old code using `map`:

1. the `Self` dependency is added in `chain_mod` instead of `chain`
2. `None` dependencies are only added if either `--show-all` is set,
   or they are a virtual target (provided by an AUR target in some
   dependency level)
3. `RequiredBy` is a flat dictionary as in v18.x

Issue #1112
lib/aur-depends
tests/depends
tests/issue/1112 [new file with mode: 0755]