From 8d8201cd5e8e03e82111137aab9e07ffca2fb6ee Mon Sep 17 00:00:00 2001 From: Pawel Pekala Date: Fri, 4 Mar 2016 17:04:51 +0000 Subject: [PATCH] Mistkenly some positions in pkg-plist were created as directories instead of empty files. Fix this and use @sample keyword for they removal management in place of install/deinstall scripts. PR: 207527 Reported by: amdmi3 --- archivers/dpkg/Makefile | 8 +++----- archivers/dpkg/files/pkg-deinstall.in | 17 ----------------- archivers/dpkg/files/pkg-install.in | 17 ----------------- archivers/dpkg/pkg-plist | 8 ++++---- 4 files changed, 7 insertions(+), 43 deletions(-) delete mode 100644 archivers/dpkg/files/pkg-deinstall.in delete mode 100644 archivers/dpkg/files/pkg-install.in diff --git a/archivers/dpkg/Makefile b/archivers/dpkg/Makefile index 7d69160811ec..25102688c269 100644 --- a/archivers/dpkg/Makefile +++ b/archivers/dpkg/Makefile @@ -3,6 +3,7 @@ PORTNAME= dpkg PORTVERSION= 1.18.4 +PORTREVISION= 1 CATEGORIES= archivers sysutils MASTER_SITES= DEBIAN_POOL DISTNAME= dpkg_${PORTVERSION} @@ -24,9 +25,6 @@ WRKSRC= ${WRKDIR}/dpkg-${PORTVERSION} DPKGDIR?= /var/db/dpkg PLIST_SUB+= DPKGDIR=${DPKGDIR} -SUB_FILES= pkg-install pkg-deinstall -SUB_LIST+= DPKGDIR=${DPKGDIR} - CONFIGURE_ARGS+=--with-admindir=${DPKGDIR} --libdir=${PREFIX}/libexec \ --with-libintl-prefix=${LOCALBASE} \ --with-logdir=/var/log @@ -39,7 +37,7 @@ NLS_CONFIGURE_ENABLE= nls NLS_USES= gettext post-install: - (cd ${STAGEDIR}${DPKGDIR} && ${MKDIR} available diversions \ - statoverride status) + (cd ${STAGEDIR}${DPKGDIR} && ${TOUCH} available.sample \ + diversions.sample statoverride.sample status.sample) .include diff --git a/archivers/dpkg/files/pkg-deinstall.in b/archivers/dpkg/files/pkg-deinstall.in deleted file mode 100644 index b72aac996bcb..000000000000 --- a/archivers/dpkg/files/pkg-deinstall.in +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -DPKGDIR="%%DPKGDIR%%" - -case $2 in -DEINSTALL) - # Delete available, diversions, statoverride, and status in ${DPKGDIR} - # if they are empty files. - for file in available diversions statoverride status; do - path=${DPKGDIR}/$file - if [ -e $path -a ! -s $path ]; then - rm -f $path - fi - done - ;; -esac diff --git a/archivers/dpkg/files/pkg-install.in b/archivers/dpkg/files/pkg-install.in deleted file mode 100644 index cc1111d69361..000000000000 --- a/archivers/dpkg/files/pkg-install.in +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# $FreeBSD$ - -LOCALBASE="%%LOCALBASE%%" -DPKGDIR="%%DPKGDIR%%" - -case $2 in -POST-INSTALL) - if [ -d ${LOCALBASE}/var/dpkg -a ${LOCALBASE}/var/dpkg != ${DPKGDIR} ]; then - echo "" - echo "If you wish to keep the databases from a previous dpkg" - echo "installation, move the contents of ${LOCALBASE}/var/dpkg" - echo "to ${DPKGDIR}." - echo "" - fi - ;; -esac diff --git a/archivers/dpkg/pkg-plist b/archivers/dpkg/pkg-plist index cd09408da983..de90ce9834d4 100644 --- a/archivers/dpkg/pkg-plist +++ b/archivers/dpkg/pkg-plist @@ -541,13 +541,15 @@ sbin/start-stop-daemon %%NLS%%share/locale/zh_CN/LC_MESSAGES/dselect.mo %%NLS%%share/locale/zh_TW/LC_MESSAGES/dpkg.mo %%NLS%%share/locale/zh_TW/LC_MESSAGES/dselect.mo +@sample %%DPKGDIR%%/available.sample +@sample %%DPKGDIR%%/diversions.sample +@sample %%DPKGDIR%%/statoverride.sample +@sample %%DPKGDIR%%/status.sample %%NLS%%@dir man/hu/man8 %%NLS%%@dir man/hu/man1 @dir etc/dpkg/dselect.cfg.d @dir etc/dpkg/dpkg.cfg.d @dir %%DPKGDIR%%/updates -@dir %%DPKGDIR%%/status -@dir %%DPKGDIR%%/statoverride @dir %%DPKGDIR%%/parts @dir %%DPKGDIR%%/methods/multicd @dir %%DPKGDIR%%/methods/mnt @@ -556,7 +558,5 @@ sbin/start-stop-daemon @dir %%DPKGDIR%%/methods/disk @dir %%DPKGDIR%%/methods @dir %%DPKGDIR%%/info -@dir %%DPKGDIR%%/diversions -@dir %%DPKGDIR%%/available @dir %%DPKGDIR%%/alternatives @dir %%DPKGDIR%%