diff options
author | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2016-08-21 22:23:02 +0100 |
---|---|---|
committer | Amadeusz Żołnowski <aidecoe@gentoo.org> | 2016-08-21 22:26:44 +0100 |
commit | 7980fff798a450fd9c13b251259fb559f2888f56 (patch) | |
tree | fb7105eb1d30fd7ef1a741da74583a0e20006190 /app-admin/checkrestart | |
parent | www-plugins/google-talkplugin: version bump (diff) | |
download | gentoo-7980fff798a450fd9c13b251259fb559f2888f56.tar.gz gentoo-7980fff798a450fd9c13b251259fb559f2888f56.tar.bz2 gentoo-7980fff798a450fd9c13b251259fb559f2888f56.zip |
app-admin/checkrestart: Workaround a problem with finding pkg name
The output of qfile is used by checkrestart to get a list of programs
owning certain files. A feature of qfile is that its output is dependent
on the current working directory. Some of the files in its output aren't
programs and checkrestart crashed. This patch sets the cwd to / for the
qfile subprocess, so its output is as expected.
Thanks to Karl <karlc@keckec.com> for investigating the issue, providing
patch and explanation above.
This not a final soluation for the problem, but it's a good workaround
given there are not so many processes named after any directory in /.
Gentoo-Bug: 548920
Package-Manager: portage-2.3.0
Diffstat (limited to 'app-admin/checkrestart')
-rw-r--r-- | app-admin/checkrestart/checkrestart-0.47-r4.ebuild | 39 | ||||
-rw-r--r-- | app-admin/checkrestart/files/checkrestart-0.47-cwd.patch | 11 |
2 files changed, 50 insertions, 0 deletions
diff --git a/app-admin/checkrestart/checkrestart-0.47-r4.ebuild b/app-admin/checkrestart/checkrestart-0.47-r4.ebuild new file mode 100644 index 000000000000..1bf1b95ad575 --- /dev/null +++ b/app-admin/checkrestart/checkrestart-0.47-r4.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils python-single-r1 + +DESCRIPTION="the sysadmin's rolling upgrade tool" +HOMEPAGE="http://arcdraco.net/checkrestart" +SRC_URI="http://arcdraco.net/~dragon/${P}-sep.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~x86" +IUSE="" + +RDEPEND=" + ${PYTHON_DEPS} + sys-apps/lsb-release + app-portage/portage-utils + sys-process/lsof +" + +REQUIRED_USE=${PYTHON_REQUIRED_USE} + +S=${WORKDIR} + +src_prepare() { + epatch "${FILESDIR}"/${P}-list-comprehension-fix.patch + epatch "${FILESDIR}"/${P}-cwd.patch + python_fix_shebang ${PN} +} + +src_install() { + dosbin ${PN} +} diff --git a/app-admin/checkrestart/files/checkrestart-0.47-cwd.patch b/app-admin/checkrestart/files/checkrestart-0.47-cwd.patch new file mode 100644 index 000000000000..6d5fd50aa05f --- /dev/null +++ b/app-admin/checkrestart/files/checkrestart-0.47-cwd.patch @@ -0,0 +1,11 @@ +--- /usr/sbin/checkrestart 2016-02-22 08:08:34.000000000 -0800 ++++ /usr/sbin/checkrestarta 2016-02-22 08:19:16.013507231 -0800 +@@ -114,7 +114,7 @@ + def portage_fQuery(programs, packages): + + dpkgQuery = ["qfile", "-C"] + programs.keys() +- dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE) ++ dpkgProc = subprocess.Popen(dpkgQuery, stdout=subprocess.PIPE, cwd='/') + for line in dpkgProc.stdout.readlines(): + packagename, program = line[:-1].split(' ') + program = re.match('\((.*)\)', program).group(1) |