Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/rmlint/files/, app-misc/rmlint/
Date: Wed, 08 Sep 2021 21:43:19
Message-Id: 1631137142.f87696bda2d6580aac1762fd96c5cfc95b7090ce.sbraz@gentoo
1 commit: f87696bda2d6580aac1762fd96c5cfc95b7090ce
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 7 22:48:23 2021 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Wed Sep 8 21:39:02 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f87696bd
7
8 app-misc/rmlint: initial import, v2.10.1
9
10 Closes: https://bugs.gentoo.org/560390
11 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
12
13 app-misc/rmlint/Manifest | 1 +
14 app-misc/rmlint/files/rmlint-2.10.1-cflags.patch | 18 +++
15 .../rmlint/files/rmlint-2.10.1-fix-tests.patch | 135 +++++++++++++++++++++
16 app-misc/rmlint/files/rmlint-2.10.1-scons.patch | 93 ++++++++++++++
17 .../rmlint/files/rmlint-2.10.1-skip-tests.patch | 35 ++++++
18 .../rmlint/files/rmlint-2.10.1-x86-fix-size.patch | 30 +++++
19 app-misc/rmlint/metadata.xml | 12 ++
20 app-misc/rmlint/rmlint-2.10.1.ebuild | 135 +++++++++++++++++++++
21 8 files changed, 459 insertions(+)
22
23 diff --git a/app-misc/rmlint/Manifest b/app-misc/rmlint/Manifest
24 new file mode 100644
25 index 00000000000..09581c7bdc7
26 --- /dev/null
27 +++ b/app-misc/rmlint/Manifest
28 @@ -0,0 +1 @@
29 +DIST rmlint-2.10.1.tar.gz 2494474 BLAKE2B 40219ff64d54f0e2fc66a958c6ca51520152f77f9038e9756ab601da5180502528be7b2d750c85b5991c31db96c3eb7415841084b6c90db103dc212947864034 SHA512 a1281359798816dadaf3a1e706e671dc63edf8f7d176c114a924a1e03fc9ad6fa54d10de701b09b5e364a9a815e0d11bdbef3d16fb7fec74eb85af20a106db1a
30
31 diff --git a/app-misc/rmlint/files/rmlint-2.10.1-cflags.patch b/app-misc/rmlint/files/rmlint-2.10.1-cflags.patch
32 new file mode 100644
33 index 00000000000..6ddfd98d956
34 --- /dev/null
35 +++ b/app-misc/rmlint/files/rmlint-2.10.1-cflags.patch
36 @@ -0,0 +1,18 @@
37 +--- a/SConstruct
38 ++++ b/SConstruct
39 +@@ -724,7 +724,6 @@ if ARGUMENTS.get('DEBUG') == "1":
40 + O_value = ARGUMENTS.get('O', O_DEBUG)
41 + else:
42 + conf.env.Append(CCFLAGS=['-DG_DISABLE_ASSERT', '-DNDEBUG'])
43 +- conf.env.Append(LINKFLAGS=['-s'])
44 + O_value = ARGUMENTS.get('O', O_RELEASE)
45 +
46 + if O_value == 'debug':
47 +@@ -735,7 +734,6 @@ elif O_value == 'release':
48 + cc_O_option = '-O' + O_value
49 +
50 + print("Using compiler optimisation {} (to change, run scons with O=[0|1|2|3|s|fast])".format(cc_O_option))
51 +-conf.env.Append(CCFLAGS=[cc_O_option])
52 +
53 + if ARGUMENTS.get('SYMBOLS') == '1':
54 + print("Compiling with debugging symbols")
55
56 diff --git a/app-misc/rmlint/files/rmlint-2.10.1-fix-tests.patch b/app-misc/rmlint/files/rmlint-2.10.1-fix-tests.patch
57 new file mode 100644
58 index 00000000000..db43e366b38
59 --- /dev/null
60 +++ b/app-misc/rmlint/files/rmlint-2.10.1-fix-tests.patch
61 @@ -0,0 +1,135 @@
62 +--- a/tests/test_options/test_replay.py
63 ++++ b/tests/test_options/test_replay.py
64 +@@ -69,7 +69,7 @@ def test_replay_match_basename():
65 + create_file('xxx', 'test1/b')
66 + create_file('xxx', 'test2/a')
67 +
68 +- replay_path = '/tmp/replay.json'
69 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
70 +
71 + head, *data, footer = run_rmlint('-o json:{p}'.format(
72 + p=replay_path
73 +@@ -104,7 +104,7 @@ def test_replay_hidden():
74 + create_file('xxx', 'test/.a')
75 + create_file('xxx', 'test/.b')
76 +
77 +- replay_path = '/tmp/replay.json'
78 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
79 +
80 + head, *data, footer = run_rmlint('--hidden -o json:{p}'.format(
81 + p=replay_path
82 +@@ -130,7 +130,7 @@ def test_replay_must_match_tagged():
83 + create_file('xxx', 'test_a/a')
84 + create_file('xxx', 'test_b/a')
85 +
86 +- replay_path = '/tmp/replay.json'
87 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
88 +
89 + head, *data, footer = run_rmlint('-o json:{p}'.format(
90 + p=replay_path
91 +@@ -182,7 +182,7 @@ def test_sorting():
92 + (''.join(p) for p in permutations(all_opts, n_terms))
93 + )
94 +
95 +- replay_path = '/tmp/replay.json'
96 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
97 +
98 + for combo in combos:
99 + combo_str = '-y ' + combo
100 +@@ -218,7 +218,7 @@ def test_replay_no_dir():
101 +
102 + try:
103 + os.chdir(TESTDIR_NAME)
104 +- replay_path = '/tmp/replay.json'
105 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
106 + head, *data, footer = run_rmlint(
107 + '-o json:{p}'.format(p=replay_path),
108 + use_default_dir=False,
109 +@@ -242,7 +242,7 @@ def test_replay_unicode_fuckup():
110 + create_file('xxx', names[1])
111 + create_file('xxx', names[2])
112 +
113 +- replay_path = '/tmp/replay.json'
114 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
115 +
116 + head, *data, footer = run_rmlint('-o json:{p}'.format(p=replay_path))
117 + assert len(data) == 3
118 +@@ -260,8 +260,8 @@ def test_replay_tagged_order():
119 + create_file('xxx', 'b/1')
120 + create_file('xxx', 'b/2')
121 +
122 +- replay_path_a = '/tmp/replay-a.json'
123 +- replay_path_b = '/tmp/replay-b.json'
124 ++ replay_path_a = os.path.join(TESTDIR_NAME, 'replay-a.json')
125 ++ replay_path_b = os.path.join(TESTDIR_NAME, 'replay-b.json')
126 +
127 + # Create replay-a.json
128 + head, *data, footer = run_rmlint(
129 +@@ -326,7 +326,7 @@ def test_replay_duplicate_directory_size():
130 + create_file('xxx', 'a/xxx')
131 + create_file('xxx', 'b/xxx')
132 +
133 +- replay_path = '/tmp/replay.json'
134 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
135 + head, *data, footer = run_rmlint('-o json:{p} -S a'.format(p=replay_path))
136 + assert len(data) == 2
137 +
138 +@@ -427,7 +427,7 @@ def test_replay_pack_directories():
139 + create_pack_and_unpack_scenario()
140 +
141 + # Do a run without -D and pack it later during --replay.
142 +- replay_path = '/tmp/replay.json'
143 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
144 +
145 + head, *data, footer = run_rmlint('-o json:{p} -S ahD'.format(p=replay_path))
146 + assert len(data) == 13
147 +@@ -449,7 +449,7 @@ def test_replay_unpack_directories():
148 + create_pack_and_unpack_scenario()
149 +
150 + # Do a run with -D and pack it later during --replay.
151 +- replay_path = '/tmp/replay.json'
152 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
153 + head, *data, footer = run_rmlint('-o json:{p} -S ahD -D'.format(p=replay_path))
154 +
155 + assert len(data) == 21
156 +--- a/tests/test_options/test_size.py
157 ++++ b/tests/test_options/test_size.py
158 +@@ -90,7 +90,7 @@ def test_replay_size():
159 + create_file('yyy', 'b/yyy')
160 + create_testdir('empty_dir')
161 +
162 +- replay_path = '/tmp/replay.json'
163 ++ replay_path = os.path.join(TESTDIR_NAME, 'replay.json')
164 + head, *data, footer = run_rmlint('-o json:{p}'.format(
165 + p=replay_path
166 + ))
167 +--- a/tests/test_options/test_stdin.py
168 ++++ b/tests/test_options/test_stdin.py
169 +@@ -69,7 +69,6 @@ def test_path_starting_with_dash():
170 + os.chdir(TESTDIR_NAME)
171 + data = check_output(
172 + [cwd + '/rmlint', '-o', 'json', '-S', 'a', '--', subdir],
173 +- stderr=STDOUT
174 + )
175 + finally:
176 + os.chdir(cwd)
177 +--- a/tests/utils.py
178 ++++ b/tests/utils.py
179 +@@ -133,7 +133,7 @@ def run_rmlint_once(*args,
180 +
181 + cmd += shlex.split(' '.join(args))
182 + if with_json:
183 +- cmd += ['-o', 'json:/tmp/out.json', '-c', 'json:oneline']
184 ++ cmd += ['-o', 'json:' + os.path.join(TESTDIR_NAME, 'out.json'), '-c', 'json:oneline']
185 +
186 + for idx, output in enumerate(outputs or []):
187 + cmd.append('-o')
188 +@@ -168,7 +168,7 @@ def run_rmlint_once(*args,
189 + return output
190 +
191 + if with_json:
192 +- with open('/tmp/out.json', 'r') as f:
193 ++ with open(os.path.join(TESTDIR_NAME, 'out.json'), 'r') as f:
194 + json_data = json.loads(f.read())
195 + else:
196 + json_data = []
197
198 diff --git a/app-misc/rmlint/files/rmlint-2.10.1-scons.patch b/app-misc/rmlint/files/rmlint-2.10.1-scons.patch
199 new file mode 100644
200 index 00000000000..a60aafe1fa6
201 --- /dev/null
202 +++ b/app-misc/rmlint/files/rmlint-2.10.1-scons.patch
203 @@ -0,0 +1,93 @@
204 +--- a/SConstruct
205 ++++ b/SConstruct
206 +@@ -515,7 +515,7 @@ AddOption(
207 + action='store', metavar='DIR', help='libdir name (lib or lib64)'
208 + )
209 +
210 +-for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui']:
211 ++for suffix in ['libelf', 'gettext', 'fiemap', 'blkid', 'json-glib', 'gui', 'docs']:
212 + AddOption(
213 + '--without-' + suffix, action='store_const', default=False, const=False,
214 + dest='with_' + suffix
215 +@@ -804,7 +804,8 @@ env.Default(library)
216 +
217 + SConscript('tests/SConscript', exports='programs')
218 + SConscript('po/SConscript')
219 +-SConscript('docs/SConscript')
220 ++if GetOption("with_docs"):
221 ++ SConscript('docs/SConscript')
222 + SConscript('gui/SConscript')
223 +
224 +
225 +@@ -883,7 +884,6 @@ if 'config' in COMMAND_LINE_TARGETS:
226 + Find non-stripped binaries (needs libelf) : {libelf}
227 + Optimize using ioctl(FS_IOC_FIEMAP) (needs linux) : {fiemap}
228 + Support for SHA512 (needs glib >= 2.31) : {sha512}
229 +- Build manpage from docs/rmlint.1.rst : {sphinx}
230 + Support for caching checksums in file's xattr : {xattr}
231 + Support for reading json caches (needs json-glib) : {json_glib}
232 + Checking for proper support of big files >= 4GB : {bigfiles}
233 +@@ -898,6 +898,9 @@ if 'config' in COMMAND_LINE_TARGETS:
234 + (needs <locale.h> for compile side support) : {locale}
235 + (needs msgfmt to compile .po files) : {msgfmt}
236 +
237 ++ Enable GUI : {gui}
238 ++ Build docs : {docs}
239 ++
240 + {grey}The following constants will be used during the build:{end}
241 +
242 + Version information : {version}
243 +@@ -925,6 +928,8 @@ Type 'scons' to actually compile rmlint now. Good luck.
244 + bigfiles=yesno(env['HAVE_BIGFILES']),
245 + bigofft=yesno(env['HAVE_BIG_OFF_T']),
246 + bigstat=yesno(env['HAVE_BIG_STAT']),
247 ++ gui=yesno(GetOption("with_gui")),
248 ++ docs=yesno(GetOption("with_docs")),
249 + sphinx=COLORS['green'] + 'yes, using ' + COLORS['end'] + sphinx_bin if sphinx_bin else yesno(sphinx_bin),
250 + compiler=env['CC'],
251 + prefix=GetOption('prefix'),
252 +--- a/gui/setup.py
253 ++++ b/gui/setup.py
254 +@@ -37,7 +37,7 @@ def get_prefix():
255 + PREFIX = get_prefix()
256 +
257 +
258 +-class PrePlusPostInstall(install):
259 ++class PreInstall(install):
260 + def run(self):
261 + # Compile the resource bundle freshly
262 + print('==> Compiling resource bundle')
263 +@@ -59,24 +59,6 @@ class PrePlusPostInstall(install):
264 + # Run the usual distutils install routine:
265 + install.run(self)
266 +
267 +- # Make sure the schema file is updated.
268 +- # Otherwise the gui will trace trap.
269 +- print('==> Compiling GLib Schema files')
270 +-
271 +- try:
272 +- subprocess.call([
273 +- 'glib-compile-schemas',
274 +- os.path.join(PREFIX, 'share/glib-2.0/schemas')
275 +- ])
276 +- except subprocess.CalledProcessError as err:
277 +- print('==> Could not update schemas: ', err)
278 +- print('==> Please run the following manually:\n')
279 +- print(' sudo glib-compile-schemas {prefix}'.format(
280 +- prefix=os.path.join(PREFIX, 'share/glib-2.0/schemas')
281 +- ))
282 +- else:
283 +- print('==> OK!')
284 +-
285 +
286 + setup(
287 + name='Shredder',
288 +@@ -88,7 +70,7 @@ setup(
289 + url='https://rmlint.rtfd.org',
290 + license='GPLv3',
291 + platforms='any',
292 +- cmdclass={'install': PrePlusPostInstall},
293 ++ cmdclass={'install': PreInstall},
294 + packages=['shredder', 'shredder.views'],
295 + package_data={'': [
296 + 'resources/*.gresource'
297
298 diff --git a/app-misc/rmlint/files/rmlint-2.10.1-skip-tests.patch b/app-misc/rmlint/files/rmlint-2.10.1-skip-tests.patch
299 new file mode 100644
300 index 00000000000..f5f81fd6d0a
301 --- /dev/null
302 +++ b/app-misc/rmlint/files/rmlint-2.10.1-skip-tests.patch
303 @@ -0,0 +1,35 @@
304 +commit 566198730352f2353fd8332794409d7c9edf80e2
305 +Author: Louis Sautier <sautier.louis@×××××.com>
306 +Date: Wed Sep 8 00:53:28 2021 +0200
307 +
308 + tests: skip man and python2
309 +
310 + Those tests fail respectively when the documentation isn't built and when
311 + python2 isn't available (probably specific to Gentoo).
312 +
313 +diff --git a/tests/test_formatters/test_py.py b/tests/test_formatters/test_py.py
314 +index 92b17604..28d2dd42 100644
315 +--- a/tests/test_formatters/test_py.py
316 ++++ b/tests/test_formatters/test_py.py
317 +@@ -16,7 +16,7 @@ def _check_interpreter(interpreter):
318 + return False
319 +
320 +
321 +-@parameterized(["python2", "python3"])
322 ++@parameterized(["python3"])
323 + @with_setup(usual_setup_func, usual_teardown_func)
324 + def test_paranoia(interpreter):
325 + if not _check_interpreter(interpreter):
326 +diff --git a/tests/test_options/test_help.py b/tests/test_options/test_help.py
327 +index d934724a..60bc40a0 100644
328 +--- a/tests/test_options/test_help.py
329 ++++ b/tests/test_options/test_help.py
330 +@@ -17,7 +17,7 @@ def test_help():
331 +
332 +
333 + @with_setup(usual_setup_func, usual_teardown_func)
334 +-def test_man():
335 ++def _test_man():
336 + yelp = subprocess.check_output(
337 + ['./rmlint', '--show-man'], stderr=subprocess.STDOUT
338 + ).decode('utf-8')
339
340 diff --git a/app-misc/rmlint/files/rmlint-2.10.1-x86-fix-size.patch b/app-misc/rmlint/files/rmlint-2.10.1-x86-fix-size.patch
341 new file mode 100644
342 index 00000000000..b67c13f527e
343 --- /dev/null
344 +++ b/app-misc/rmlint/files/rmlint-2.10.1-x86-fix-size.patch
345 @@ -0,0 +1,30 @@
346 +commit 87c53a5cb0ec37412cf9fe748dc90dddc6812733
347 +Author: Louis Sautier <sautier.louis@×××××.com>
348 +Date: Wed Sep 8 19:39:07 2021 +0200
349 +
350 + Fix max sizes on x86, closes #522
351 +
352 + strtoull returns ULLONG_MAX, not ULONG_MAX.
353 +
354 +diff --git a/lib/cmdline.c b/lib/cmdline.c
355 +index 56141d94..36f48c1b 100644
356 +--- a/lib/cmdline.c
357 ++++ b/lib/cmdline.c
358 +@@ -351,7 +351,7 @@ static RmOff rm_cmd_size_string_to_bytes(const char *size_spec, GError **error)
359 + return 0;
360 + }
361 +
362 +- if(fraction_num == ULONG_MAX && errno == ERANGE) {
363 ++ if(fraction_num == ULLONG_MAX && errno == ERANGE) {
364 + g_set_error(error, RM_ERROR_QUARK, 0, _("Fraction is too big for uint64"));
365 + return 0;
366 + }
367 +@@ -371,7 +371,7 @@ static RmOff rm_cmd_size_string_to_bytes(const char *size_spec, GError **error)
368 + return 0;
369 + }
370 +
371 +- if(base_size == ULONG_MAX && errno == ERANGE) {
372 ++ if(base_size == ULLONG_MAX && errno == ERANGE) {
373 + g_set_error(error, RM_ERROR_QUARK, 0, _("Size is too big for uint64"));
374 + return 0;
375 + }
376
377 diff --git a/app-misc/rmlint/metadata.xml b/app-misc/rmlint/metadata.xml
378 new file mode 100644
379 index 00000000000..045b589e3cb
380 --- /dev/null
381 +++ b/app-misc/rmlint/metadata.xml
382 @@ -0,0 +1,12 @@
383 +<?xml version="1.0" encoding="UTF-8"?>
384 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
385 +<pkgmetadata>
386 + <maintainer type="person">
387 + <email>sbraz@g.o</email>
388 + <name>Louis Sautier</name>
389 + </maintainer>
390 + <upstream>
391 + <remote-id type="github">sahib/rmlint</remote-id>
392 + <bugs-to>https://github.com/sahib/rmlint/issues</bugs-to>
393 + </upstream>
394 +</pkgmetadata>
395
396 diff --git a/app-misc/rmlint/rmlint-2.10.1.ebuild b/app-misc/rmlint/rmlint-2.10.1.ebuild
397 new file mode 100644
398 index 00000000000..11a0d0b2e17
399 --- /dev/null
400 +++ b/app-misc/rmlint/rmlint-2.10.1.ebuild
401 @@ -0,0 +1,135 @@
402 +# Copyright 1999-2021 Gentoo Authors
403 +# Distributed under the terms of the GNU General Public License v2
404 +
405 +EAPI=7
406 +
407 +PYTHON_COMPAT=( python3_{8..9} )
408 +
409 +inherit gnome2-utils python-single-r1 scons-utils toolchain-funcs xdg-utils
410 +
411 +DESCRIPTION="Extremely fast tool to remove duplicates and other lint from your filesystem"
412 +HOMEPAGE="https://rmlint.readthedocs.io/"
413 +SRC_URI="https://github.com/sahib/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
414 +
415 +LICENSE="GPL-3+"
416 +SLOT="0"
417 +KEYWORDS="~amd64 ~x86"
418 +IUSE="doc gui nls test"
419 +REQUIRED_USE="${PYTHON_REQUIRED_USE}"
420 +RESTRICT="!test? ( test )"
421 +
422 +DEPEND="
423 + dev-libs/glib:2
424 + dev-libs/json-glib
425 + virtual/libelf:0=
426 +"
427 +RDEPEND="
428 + ${DEPEND}
429 + gui? (
430 + ${PYTHON_DEPS}
431 + x11-libs/gtksourceview:3.0
432 + $(python_gen_cond_dep '
433 + dev-python/colorlog[${PYTHON_MULTI_USEDEP}]
434 + dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}]
435 + ')
436 + )
437 +"
438 +BDEPEND="
439 + virtual/pkgconfig
440 + doc? (
441 + ${PYTHON_DEPS}
442 + $(python_gen_cond_dep '
443 + dev-python/sphinx[${PYTHON_MULTI_USEDEP}]
444 + dev-python/sphinx-bootstrap-theme[${PYTHON_MULTI_USEDEP}]
445 + ')
446 + )
447 + nls? ( sys-devel/gettext )
448 + test? (
449 + ${PYTHON_DEPS}
450 + app-shells/dash
451 + $(python_gen_cond_dep '
452 + dev-python/nose[${PYTHON_MULTI_USEDEP}]
453 + dev-python/parameterized[${PYTHON_MULTI_USEDEP}]
454 + dev-python/psutil[${PYTHON_MULTI_USEDEP}]
455 + dev-python/pyxattr[${PYTHON_MULTI_USEDEP}]
456 + ')
457 + )
458 +"
459 +
460 +DOCS=(CHANGELOG.md README.rst)
461 +PATCHES=(
462 + # The build system tries to override several CFLAGS
463 + "${FILESDIR}/${PN}-2.10.1-cflags.patch"
464 + # https://github.com/sahib/rmlint/pull/520
465 + "${FILESDIR}/${PN}-2.10.1-scons.patch"
466 + # https://github.com/sahib/rmlint/pull/521
467 + "${FILESDIR}/${PN}-2.10.1-fix-tests.patch"
468 + # Skip problematic tests
469 + "${FILESDIR}/${PN}-2.10.1-skip-tests.patch"
470 + # https://github.com/sahib/rmlint/pull/523
471 + "${FILESDIR}/${PN}-2.10.1-x86-fix-size.patch"
472 +)
473 +
474 +src_prepare() {
475 + default
476 + if use test && use x86; then
477 + # Skip part of a test until this is fixed:
478 + # https://github.com/sahib/rmlint/issues/522
479 + sed -i '/--size 0-18446744073709551615\.1/d' \
480 + tests/test_options/test_size.py || die
481 + fi
482 +}
483 +
484 +src_configure() {
485 + # Needed for USE=-native-symlinks
486 + tc-export CC
487 + scons_opts=(
488 + VERBOSE=1
489 + $(use_with doc docs)
490 + $(use_with gui)
491 + $(use_with nls gettext)
492 + )
493 + escons "${scons_opts[@]}" config
494 +}
495 +
496 +src_compile() {
497 + escons "${scons_opts[@]}"
498 +}
499 +
500 +src_test() {
501 + RM_TS_DIR="${T}/tests" nosetests -s -v -a '!slow' || \
502 + die "Tests failed"
503 +}
504 +
505 +src_install() {
506 + escons "${scons_opts[@]}" --prefix="${ED}/usr" --actual-prefix="${EPREFIX}/usr" install
507 +
508 + # https://github.com/sahib/rmlint/pull/525
509 + if use doc; then
510 + gzip -d "${ED}/usr/share/man/man1/rmlint.1.gz" || die
511 + fi
512 + if use gui; then
513 + python_optimize
514 + fi
515 + einstalldocs
516 +}
517 +
518 +pkg_preinst() {
519 + if use gui; then
520 + gnome2_schemas_savelist
521 + fi
522 +}
523 +
524 +pkg_postinst() {
525 + if use gui; then
526 + gnome2_schemas_update
527 + xdg_icon_cache_update
528 + fi
529 +}
530 +
531 +pkg_postrm() {
532 + if use gui; then
533 + gnome2_schemas_update
534 + xdg_icon_cache_update
535 + fi
536 +}