diff --git a/contrib/apt-conf/50appstream b/contrib/apt-conf/50appstream index 046a4622..d111ce99 100644 --- a/contrib/apt-conf/50appstream +++ b/contrib/apt-conf/50appstream @@ -44,5 +44,5 @@ Acquire::IndexTargets { # Refresh AppStream cache when APT's cache is updated (i.e. apt-cache update) APT::Update::Post-Invoke-Success { - "if /usr/bin/test -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi"; + "if /usr/bin/test $(id -u) -eq 0 -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi"; };