Skip to content

Commit

Permalink
app-eselect/eselect-wine: don't fail if migration file exists
Browse files Browse the repository at this point in the history
May have been left there if other preinst commands failed
(like eselect wine unset --all which can be fickle).

Alternatively could cp -f, but best avoid clobbering more
files we don't own as much as possible. Guess a better
approach would've been to put it in ${T} and tell eselect
where to find it in postinst but at this point not going
to worry about due-to-be-removed cruft.

Signed-off-by: Ionen Wolkens <[email protected]>
  • Loading branch information
ionenwks committed Mar 3, 2023
1 parent 62a926d commit 86d3e17
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app-eselect/eselect-wine/eselect-wine-2.0.2.ebuild
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Gentoo Authors
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand Down Expand Up @@ -43,8 +43,10 @@ src_install() {
pkg_preinst() {
if has_version '<app-eselect/eselect-wine-2'; then
# keep copy of still-set 'active' to auto-select same slots
[[ ! -e ${EROOT}/etc/eselect/wine/active ]] ||
if [[ -e ${EROOT}/etc/eselect/wine/active &&
! -e ${EROOT}/etc/eselect/wine/eselect-wine-migration ]]; then
cp "${EROOT}"/etc/eselect/wine/{active,eselect-wine-migration} || die
fi

# managed differently, need cleanup
eselect wine unset --all || die
Expand Down

0 comments on commit 86d3e17

Please sign in to comment.