From: Lars Wendler Date: Tue, 19 Apr 2016 06:01:56 +0000 (+0200) Subject: sys-apps/smartmontools: Fixed installation with USE=minimal. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=3c73a8c4682e8dc02d69cbbfe073af19da744d4b;p=gentoo.git sys-apps/smartmontools: Fixed installation with USE=minimal. Package-Manager: portage-2.2.28 Signed-off-by: Lars Wendler --- diff --git a/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild index b000e3b6484a..dc78a90f4237 100644 --- a/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild +++ b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild @@ -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 }