Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 688366 | Differences between
and this patch

Collapse All | Expand All

(-)plasma-workspace-5.17.2.ebuild (-15 / +36 lines)
Lines 123-128 Link Here
123
123
124
RESTRICT+=" test"
124
RESTRICT+=" test"
125
125
126
# used for agent scripts migration
127
OLDST=/etc/plasma/startup/10-agent-startup.sh
128
NEWST=/etc/xdg/plasma-workspace/env/10-agent-startup.sh
129
OLDSH=/etc/plasma/shutdown/10-agent-shutdown.sh
130
NEWSH=/etc/xdg/plasma-workspace/shutdown/10-agent-shutdown.sh
131
126
src_prepare() {
132
src_prepare() {
127
	kde5_src_prepare
133
	kde5_src_prepare
128
134
Lines 149-173 Link Here
149
	kde5_src_configure
155
	kde5_src_configure
150
}
156
}
151
157
152
src_install() {
158
pkg_preinst () {
153
	kde5_src_install
159
	kde5_pkg_preinst
154
155
	# startup and shutdown scripts
156
	insinto /etc/plasma/startup
157
	doins "${FILESDIR}/10-agent-startup.sh"
158
160
159
	insinto /etc/plasma/shutdown
161
	# migrate existing agent startup/shutdown scripts to new places
160
	doins "${FILESDIR}/10-agent-shutdown.sh"
162
	# use FILESDIR/ scripts otherwise
163
	mkdir -p "${ED}"$(dirname ${NEWST}) || die
164
	if [[ -r "${EROOT}"${OLDST} ]]; then
165
		cp "${EROOT}"${OLDST} "${ED}"${NEWST} || die
166
		elog "${EROOT}${OLDST} has been migrated to ${EROOT}${NEWST}, please delete old file."
167
	else
168
		cp "${FILESDIR}"/$(basename ${OLDST}) "${ED}"${NEWST} || die
169
	fi
170
	mkdir -p "${ED}"$(dirname ${NEWSH}) || die
171
	if [[ -r "${EROOT}"${OLDSH} ]]; then
172
		cp "${EROOT}"${OLDSH} "${ED}"${NEWSH} || die
173
		elog "${EROOT}${OLDSH} has been migrated to ${EROOT}${NEWSH}, please delete old file."
174
	else
175
		cp "${FILESDIR}"/$(basename ${OLDSH}) "${ED}"${NEWSH} || die
176
	fi
177
	chmod +x "${ED}"${NEWSH} || die
161
}
178
}
162
179
163
pkg_postinst () {
180
pkg_postinst () {
164
	kde5_pkg_postinst
181
	kde5_pkg_postinst
165
182
166
	elog "To enable gpg-agent and/or ssh-agent in Plasma sessions, do the following:"
183
	# warn about any leftover user scripts
167
	elog " * Copy the necessary files to your home directory:"
184
	if [[ -d "${EROOT}"/etc/plasma/startup && -n "$(ls "${EROOT}"/etc/plasma/startup)" ]] || \
168
	elog "   - cp /etc/plasma/startup/10-agent-startup.sh ~/.config/plasma-workspace/env/"
185
	[[ -d "${EROOT}"/etc/plasma/shutdown && -n "$(ls "${EROOT}"/etc/plasma/shutdown)" ]]; then
169
	elog "   - cp /etc/plasma/shutdown/10-agent-shutdown.sh ~/.config/plasma-workspace/shutdown/"
186
		elog "You appear to have scripts in ${EROOT}/etc/plasma/{startup,shutdown}."
170
	elog " * Edit 10-agent-startup.sh and uncomment the lines enabling ssh-agent."
187
		elog "They will no longer work since plasma-workspace-5.17"
171
	elog " * In 10-agent-shutdown.sh uncomment the respective lines to properly kill"
188
	fi
172
	elog "   the agent when the session ends."
189
190
	elog " * Edit ${EROOT}${NEWST} and uncomment"
191
	elog "   the lines enabling ssh-agent."
192
	elog " * Edit ${EROOT}${NEWSH} uncomment"
193
	elog "   the respective lines to properly kill the agent when the session ends."
173
}
194
}

Return to bug 688366