repkg: Check both types of dependencies before adding
The following repkg
recipe runs successfully:
add-optdepend foo: for fooing
add-depend foo
I expect the add-depend
to fail, stating that foo
is already an optional dependency.
Real-life example: current REPKGBUILD for pacman-contrib in the zuepfe-repkg
repo (adding diffutils
as a dependency).
The resulting package is currently:
$ pacman -Qi pacman-contrib
Name : pacman-contrib
Version : 1.4.0-3.1
Description : Contributed scripts and tools for pacman systems
Architecture : x86_64
URL : https://git.archlinux.org/pacman-contrib.git/about/
Licenses : GPL
Groups : None
Provides : pacman-contrib=1.4.0-3
Depends On : fakeroot pacman perl diffutils
Optional Deps : diffutils: for pacdiff [installed]
findutils: for pacdiff --find [installed]
mlocate: for pacdiff --locate
sudo: privilege elevation for several scripts [installed]
vim: default merge program for pacdiff [installed]
makepkg: updpkgsums [installed]
Required By : bundle-package-management
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 156.00 KiB
Packager : Tinu Weber <http://ayekat.ch>
Build Date : Thu 03 Jun 2021 22:56:22 CEST
Install Date : Sat 05 Jun 2021 22:14:46 CEST
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : Signature
(notice diffutils
being both in the dependencies and optional dependencies)