games-roguelike/nethack: Remove migration code
authorLuis Ressel <aranea@aixah.de>
Sun, 31 Jan 2016 19:30:07 +0000 (20:30 +0100)
committerLuis Ressel <aranea@aixah.de>
Sun, 7 Feb 2016 20:48:58 +0000 (21:48 +0100)
Remove the migration logic handling updates from <3.4.3-r3. It's been in
place for over six months, that should be enough.

games-roguelike/nethack/nethack-3.6.0-r2.ebuild

index c87adad7bfe4fd573ac1cd8c4581834f2cad719c..7f8d2befda1f7daedaf739a43a2bc6beacb3ee7a 100644 (file)
@@ -119,30 +119,9 @@ src_install() {
        fperms g+s "${HACKDIR}/nethack"
 }
 
-pkg_preinst() {
-       if has_version "<${CATEGORY}/${PN}-3.4.3-r3" ; then
-               migration=true
-
-               # preserve STATEDIR/{logfile,record}
-               # (previous ebuild rev mistakenly removes it)
-               for f in "${ROOT}/${STATEDIR}/"{logfile,record} ; do
-                       if [[ -e "$f" ]] ; then
-                               cp "$f" "$T" || die "Failed to preserve ${ROOT}/${STATEDIR} files"
-                       else
-                               touch "$T/$f" || die "Failed to preserve ${ROOT}/${STATEDIR} files"
-                       fi
-               done
-       fi
-}
-
 pkg_postinst() {
        cd "${ROOT}/${STATEDIR}" || die "Failed to enter ${STATEDIR} directory"
 
-       if [[ -v migration ]] ; then
-               cp "$T/"{logfile,record} . ||
-               die "Failed to preserve ${ROOT}/${STATEDIR} files"
-       fi
-
        touch logfile perm record xlogfile || die "Failed to create log files"
 
        chown -R root:"${NETHACK_GROUP}" . &&