Cannot install all the optional packages for kontact

I am trying to install the Kontact Suite from KDE. When I had a look at the Kontact package in Arch Repositories, it lists the following packages as optional

  1. akregator
  2. kaddressbook
  3. kmail
  4. korganizer
  5. zanshin

When I try to install kcontact with pacman I do not have these 5 optional packages listed. Please see the output given below. How can I get these 5 optional packages installed?
I have tried the option –groups as well as –asdeps and –asexplicit. None of these options helped.

Blockquote
$ sudo pacman -S --verbose --needed --info kontact
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : kontact
Repository : extra
Name : kontact
Version : 24.12.3-1
Description : KDE Personal Information Manager
Architecture : x86_64
URL : https://apps.kde.org/kontact/
Licenses : GPL-2.0-or-later
Groups : kde-applications kde-pim
Provides : None
Depends On : gcc-libs glibc grantleetheme kcmutils kcolorscheme kconfig kconfigwidgets kcoreaddons kcrash ki18n kiconthemes kio kjobwidgets kontactinterface
kmail-account-wizard kparts kservice kwidgetsaddons kxmlgui libkdepim pimcommon qt6-base qt6-webengine
Optional Deps : akregator
kaddressbook
kmail
korganizer
zanshin
Conflicts With : None
Replaces : None
Download Size : 793.63 KiB
Installed Size : 1821.61 KiB
Packager : Antonio Rojas arojas@archlinux.org
Build Date : Tue 04 Mar 2025 14:45:38
Validated By : SHA-256 Sum Signature
$
$ sudo pacman -S --verbose --needed kontact
Root : /
Conf File : /etc/pacman.conf
DB Path : /var/lib/pacman/
Cache Dirs: /var/cache/pacman/pkg/
Hook Dirs : /usr/share/libalpm/hooks/ /etc/pacman.d/hooks/
Lock File : /var/lib/pacman/db.lck
Log File : /var/log/pacman.log
GPG Dir : /etc/pacman.d/gnupg/
Targets : kontact
resolving dependencies…
looking for conflicting packages…

Package (28) New Version Net Change Download Size

extra/akonadi 24.12.3-1 4.78 MiB 1.23 MiB
extra/akonadi-contacts 24.12.3-1 3.54 MiB 1.01 MiB
extra/akonadi-mime 24.12.3-1 1.84 MiB 0.60 MiB
extra/akonadi-search 24.12.3-1 3.34 MiB 1.00 MiB
extra/grantleetheme 24.12.3-1 0.42 MiB 0.20 MiB
extra/kcalendarcore 6.11.0-1 3.66 MiB 1.48 MiB
extra/kidentitymanagement 24.12.3-1 1.57 MiB 0.47 MiB
extra/kimap 24.12.3-1 1.72 MiB 0.69 MiB
extra/kldap 24.12.3-1 1.73 MiB 0.64 MiB
extra/kmail-account-wizard 24.12.3-1 0.61 MiB 0.16 MiB
extra/kmailtransport 24.12.3-1 1.55 MiB 0.48 MiB
extra/kmime 24.12.3-1 0.69 MiB 0.25 MiB
extra/kontactinterface 24.12.3-1 0.48 MiB 0.23 MiB
extra/kpimtextedit 24.12.3-1 1.27 MiB 0.44 MiB
extra/ksmtp 24.12.3-1 0.45 MiB 0.21 MiB
extra/ktextaddons 1.5.4-1 4.70 MiB 1.22 MiB
extra/ktexttemplate 6.11.0-1 2.49 MiB 1.35 MiB
extra/libakonadi 24.12.3-1 11.59 MiB 3.70 MiB
extra/libical 3.0.19-2 7.05 MiB 0.59 MiB
extra/libkdepim 24.12.3-1 0.73 MiB 0.31 MiB
extra/libkgapi 24.12.3-1 7.40 MiB 2.28 MiB
extra/mariadb 11.7.2-1 189.55 MiB 27.37 MiB
extra/mariadb-clients 11.7.2-1 31.76 MiB 1.81 MiB
extra/mariadb-libs 11.7.2-1 21.43 MiB 5.44 MiB
extra/pimcommon 24.12.3-1 2.91 MiB 0.93 MiB
extra/qtkeychain-qt6 0.15.0-1 0.24 MiB 0.07 MiB
extra/xapian-core 1:1.4.25-1 4.77 MiB 1.24 MiB
extra/kontact 24.12.3-1 1.78 MiB 0.78 MiB

Total Download Size: 56.18 MiB
Total Installed Size: 314.05 MiB

:: Proceed with installation? [Y/n] n
$

whats wrong with just typing them out? This is arch and like you said they are OPTIONAL which means you need to manually install.

1 Like

Do you have the package expac? If you have, you can list the optional dependencies for kontact with the command:

expac -Ss '%o' kontact

If you need them all, you can install kontact with all its optional dependencies:

sudo pacman -S kontact --needed --asdeps $(expac -Ss '%o' kontact)

with --asdeps you mark them as dependencies. If you remove kontact with pacman -Rs, these are removed too.

EDIT: Note that after running this command, you need to mark the original package (kontact) with
--asexplicit. The whole line:

sudo pacman -S kontact --needed --asdeps $(expac -Ss '%o' kontact) && sudo pacman -D --asexplicit kontact

Also, if your system is not updated, update it before installing new package.

Thanks to @dalto for correction!

2 Likes

Perhaps…
sudo pacman -S akregator kaddressbook kmail korganizer zanshin
or
yay -S akregator kaddressbook kmail korganizer zanshin

Yeah I have expac installed. And executing expac -Ss ‘%o’ kontact does list out all the 5 packages which are marked as optional. Will try this out and update the thread. Thanks in advance.

1 Like

I was wondering if there was a mechanism to get them together.

1 Like

Yeah if nothing else works will try this out.

pacman doesn’t support this natively.

Only by using bash tricks like @cactux already recommended above. The command he gave you should work for any package:

sudo pacman -Syu kontact --needed --asdeps $(expac -Ss '%o' kontact)
2 Likes

I seem to always learn something new here on the forum. I was unaware of that.

So, for example, if I install Elisa like this…

sudo pacman -Syu elisa --needed --asdeps $(expac -Ss '%o' elisa)

it will install Elisa and its dependencies as normal, and include optional packages as dependencies as well?

Yes, exactly

1 Like

Great to know! Thanks.

@cactux, thanks for that. Something I was unaware of.

2 Likes

added to my database :+1:

1 Like

same I’ve just always used a package list before I’ll be replacing that now.

1 Like

Actually, that command doesn’t work properly. It marks the original package as a dependency.

I think you need this instead:

sudo pacman -S kontact --needed --asdeps $(expac -Ss '%o' kontact) && pacman -D --asexplicit kontact

Alternatively, to make it so you only need the package name once:

pkg=kontact ; sudo pacman -S $pkg --needed --asdeps $(expac -Ss '%o' $pkg) && pacman -D --asexplicit $pkg
4 Likes

I missed that, thank you for the correction. I will edit my post.

2 Likes

Thanks for that. I updated my database.

1 Like

I understand the first part but what does this mean? From user account expac find and install all dependencies for elisa? :thinking:

expac is a tool for searching the package databases.

The $() says to run the command inside the parens.

expac -Ss ‘%o’ elisa finds all the optional dependencies for the package elisa. Of course, it is not the best example since elisa has no optional deps.

That explains it 100%

Thank You!

1 Like