adjust portcheck for @tag update-desktop-database

okay zhuk@
This commit is contained in:
espie 2018-06-28 14:52:28 +00:00
parent ff97f2677e
commit f5787bd498
5 changed files with 21 additions and 37 deletions

View File

@ -1,6 +1,6 @@
#!/bin/ksh
#
# $OpenBSD: portcheck,v 1.117 2017/12/22 22:59:53 zhuk Exp $
# $OpenBSD: portcheck,v 1.118 2018/06/28 14:52:28 espie Exp $
# Copyright (c) 2013 Vadim Zhukov
#
# Permission to use, copy, modify, and distribute this software for any
@ -914,10 +914,9 @@ sub_checks() {
# rm -f %D/share/icons/$theme/icon-theme.cache
#
# * If package adds a MIME type handler, it should have the
# devel/desktop-file-utils dependency and @exec/@unexec-delete with
# %D/bin/update-desktop-database . Unfortunately, it's hard to tell
# if there is a MIME type handler in .desktop file, so we just
# trigger if any .desktop files are added to
# devel/desktop-file-utils dependency and @tag update-desktop-database .
# Unfortunately, it's hard to tell if there is a MIME type handler
# in .desktop file, so we just trigger if any .desktop files are added to
# ${PREFIX}/share/applications/ .
#
# * If package adds a MIME types package, it should have the
@ -969,8 +968,7 @@ check_plist() {
local mime_dep=false
local mime_dep_needed=false
local mime_exec_cnt=0
local mime_unexec_cnt=0
local mime_tag_cnt=0
local mimepkg_dep=false
local mimepkg_dep_needed=false
@ -1103,17 +1101,13 @@ check_plist() {
"@depend devel/desktop-file-utils"*)
mime_dep=true
;;
"@exec %D/bin/update-desktop-database")
((++mime_exec_cnt))
"@tag update-desktop-database")
((++mime_tag_cnt))
;;
"@unexec-delete %D/bin/update-desktop-database")
((++mime_unexec_cnt))
;;
@?(un)exec?(-delete|-update)" %D/bin/update-desktop-database"*)
err "${portref}incorrect update-desktop-database" \
@?(un)exec*" %D/bin/update-desktop-database"*)
err "${portref}obsolete update-desktop-database" \
"invocation: ${l#@* }"
;;
share/mime/packages/*.xml)
mimepkg_dep_needed=true
;;
@ -1313,19 +1307,13 @@ check_plist() {
[[ $fullpkgname != desktop-file-utils-* ]] &&
err "${portref}missing RDEP on devel/desktop-file-utils"
if $mime_dep_needed; then
((mime_exec_cnt--)) || true
((mime_unexec_cnt--)) || true
((mime_tag_cnt--)) || true
fi
if ((mime_exec_cnt > 0)) &&
if ((mime_tag_cnt > 0)) &&
[[ $fullpkgname != desktop-file-utils-* ]]; then
err "${portref}extra @exec of update-desktop-database"
elif ((mime_exec_cnt < 0)); then
err "${portref}missing @exec of update-desktop-database"
fi
if ((mime_unexec_cnt > 0)); then
err "${portref}extra @unexec-delete of update-desktop-database"
elif ((mime_unexec_cnt < 0)); then
err "${portref}missing @unexec-delete of update-desktop-database"
err "${portref}extra @tag update-desktop-database"
elif ((mime_tag_cnt < 0)); then
err "${portref}missing @tag update-desktop-database"
fi
# update-mime-database (same as previous)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2014/02/03 22:28:41 zhuk Exp $
@comment $OpenBSD: PLIST,v 1.2 2018/06/28 14:52:28 espie Exp $
@conflict kdeutils-<4
@bin bin/kcalc
lib/libkdeinit4_kcalc.so
@ -13,5 +13,4 @@ share/doc/HTML/en/kcalc/commands.docbook
share/doc/HTML/en/kcalc/common
share/doc/HTML/en/kcalc/index.cache.bz2
share/doc/HTML/en/kcalc/index.docbook
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@tag update-desktop-database

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2014/02/03 22:28:41 zhuk Exp $
@comment $OpenBSD: PLIST,v 1.2 2018/06/28 14:52:28 espie Exp $
@conflict kdeutils-<4
@bin bin/kcalc
lib/libkdeinit4_kcalc.so
@ -13,5 +13,4 @@ share/doc/HTML/en/kcalc/commands.docbook
share/doc/HTML/en/kcalc/common
share/doc/HTML/en/kcalc/index.cache.bz2
share/doc/HTML/en/kcalc/index.docbook
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@tag update-desktop-database

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2014/02/03 22:28:41 zhuk Exp $
@comment $OpenBSD: PLIST,v 1.2 2018/06/28 14:52:28 espie Exp $
@conflict kdeutils-<4
@bin bin/kcalc
lib/libkdeinit4_kcalc.so
@ -13,5 +13,4 @@ share/doc/HTML/en/kcalc/commands.docbook
share/doc/HTML/en/kcalc/common
share/doc/HTML/en/kcalc/index.cache.bz2
share/doc/HTML/en/kcalc/index.docbook
@exec %D/bin/update-desktop-database
@unexec-delete %D/bin/update-desktop-database
@tag update-desktop-database

View File

@ -7,8 +7,7 @@ extra file: patches/patch-xyz.orig
extra file: patches/qwerty
extra file: pkg/qwerty
kdeui WANTLIB without x11/kde* in MODULES (check other libs, too!)
missing @exec of update-desktop-database
missing @unexec-delete of update-desktop-database
missing @tag update-desktop-database
missing RDEP on devel/desktop-file-utils
no distinfo in .
non-empty WANTLIB for arch-independent package