sys-apps/smartmontools: Fixed installation with USE=minimal.
authorLars Wendler <polynomial-c@gentoo.org>
Tue, 19 Apr 2016 06:01:56 +0000 (08:01 +0200)
committerLars Wendler <polynomial-c@gentoo.org>
Tue, 19 Apr 2016 06:01:56 +0000 (08:01 +0200)
Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
sys-apps/smartmontools/smartmontools-6.4-r1.ebuild

index b000e3b6484a2f51fa5fb0da7324fe3f79a555a6..dc78a90f42376b944df7c2e3aeb73000fbb0a72f 100644 (file)
@@ -70,27 +70,29 @@ src_install() {
                default
                newinitd "${FILESDIR}"/smartd-r1.rc smartd
                newconfd "${FILESDIR}"/smartd.confd smartd
-       fi
 
-       # Move drivedb.h file out of PM's sight (bug #575292)
-       mv "${ED}"${db_path}/drivedb.h "${T}" || die
-       keepdir ${db_path}
+               # Move drivedb.h file out of PM's sight (bug #575292)
+               mv "${ED}"${db_path}/drivedb.h "${T}" || die
+               keepdir ${db_path}
 
-       exeinto /etc/cron.monthly
-       doexe "${FILESDIR}"/${PN}-update-drivedb
+               exeinto /etc/cron.monthly
+               doexe "${FILESDIR}"/${PN}-update-drivedb
+       fi
 }
 
 pkg_postinst() {
-       local db_path="/var/db/${PN}"
+       if ! use minimal ; then
+               local db_path="/var/db/${PN}"
 
-       if [[ -f "${db_path}/drivedb.h" ]] ; then
-               ewarn "WARNING! The drive database file has been replaced with the version that"
-               ewarn "got shipped with this release of ${PN}. You may want to update the"
-               ewarn "database by running the following command as root:"
-               ewarn ""
-               ewarn "/usr/sbin/update-smart-drivedb"
-       fi
+               if [[ -f "${db_path}/drivedb.h" ]] ; then
+                       ewarn "WARNING! The drive database file has been replaced with the version that"
+                       ewarn "got shipped with this release of ${PN}. You may want to update the"
+                       ewarn "database by running the following command as root:"
+                       ewarn ""
+                       ewarn "/usr/sbin/update-smart-drivedb"
+               fi
 
-       # Move drivedb.h to /var/db/${PN} (bug #575292)
-       mv "${T}"/drivedb.h ${db_path} || die
+               # Move drivedb.h to /var/db/${PN} (bug #575292)
+               mv "${T}"/drivedb.h ${db_path} || die
+       fi
 }