commit:     3c73a8c4682e8dc02d69cbbfe073af19da744d4b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 19 06:01:56 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Apr 19 06:01:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c73a8c4

sys-apps/smartmontools: Fixed installation with USE=minimal.

Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 sys-apps/smartmontools/smartmontools-6.4-r1.ebuild | 34 ++++++++++++----------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild 
b/sys-apps/smartmontools/smartmontools-6.4-r1.ebuild
index b000e3b..dc78a90 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
 }

Reply via email to