Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 550886 - Test suite should internally enable more FEATURES when it is possible
Summary: Test suite should internally enable more FEATURES when it is possible
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-31 15:17 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2015-09-23 06:21 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2015-05-31 15:17:18 UTC
Commit 1032cbf4c218741df1c57767fead2d00cc6321d9 added pym/portage/util/xattr.py, which broke pym/portage/util/movefile.py with Python 2 (due to 'import xattr' and absence of 'from __future__ import absolute_import' in the latter file).

Unfortunately test suite usually fails to detect it:



$ python2.7 pym/portage/tests/runTests.py pym/portage/tests/emerge/test_config_protect.py
testConfigProtect (portage.tests.emerge.test_config_protect.ConfigProtectTestCase) ... ok

----------------------------------------------------------------------
Ran 1 test in ${time}

OK
$ echo 'FEATURES="${FEATURES} xattr"' >> cnf/make.globals
$ python2.7 pym/portage/tests/runTests.py pym/portage/tests/emerge/test_config_protect.py
testConfigProtect (portage.tests.emerge.test_config_protect.ConfigProtectTestCase) ... 
These are the packages that would be merged, in order:

Calculating dependencies  ... done!
[ebuild  N     ] dev-libs/A-1::test_repo  USE="flag" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB


>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-libs/A-1::test_repo
>>> Unpacking source...
>>> Source unpacked in /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work
>>> Preparing source in /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work ...
>>> Source prepared.
>>> Configuring source in /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work ...
>>> Source configured.
>>> Compiling source in /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work ...
>>> Source compiled.
>>> Test phase [not enabled]: dev-libs/A-1

>>> Install A-1 into /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/image/ category dev-libs
Traceback (most recent call last):
  File "/home/Arfrever/portage/bin/install.py", line 253, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/home/Arfrever/portage/bin/install.py", line 244, in main
    returncode = copy_xattrs(opts, files)
  File "/home/Arfrever/portage/bin/install.py", line 180, in copy_xattrs
    _copyxattr(s, abs_path, exclude=exclude)
  File "/home/Arfrever/portage/pym/portage/util/movefile.py", line 107, in _copyxattr
    attrs = xattr.list(src)
AttributeError: 'module' object has no attribute 'list'
!!! doins: /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/regular_a does not exist
 * ERROR: dev-libs/A-1::test_repo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/A-1::test_repo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/A-1::test_repo'`.
 * The complete build log is located at '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/environment'.
 * Working directory: '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work'
 * S: '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work'
 * QA Notice: file does not exist:
 * 
 * 	doins: /tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/regular_a does not exist

>>> Failed to emerge dev-libs/A-1, Log file:

>>>  '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/build.log'

 * Messages for package dev-libs/A-1:

 * ERROR: dev-libs/A-1::test_repo failed (install phase):
 *   doins failed
 * 
 * If you need support, post the output of `emerge --info '=dev-libs/A-1::test_repo'`,
 * the complete build log and the output of `emerge -pqv '=dev-libs/A-1::test_repo'`.
 * The complete build log is located at '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/build.log'.
 * The ebuild environment file is located at '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/temp/environment'.
 * Working directory: '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work'
 * S: '/tmp/tmpaEodKR/var/tmp/portage/portage/dev-libs/A-1/work'
FAIL

======================================================================
FAIL: testConfigProtect (portage.tests.emerge.test_config_protect.ConfigProtectTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/Arfrever/portage/pym/portage/tests/__init__.py", line 222, in run
    testMethod()
  File "/home/Arfrever/portage/pym/portage/tests/emerge/test_config_protect.py", line 290, in testConfigProtect
    "emerge failed with args %s" % (args,))
AssertionError: emerge failed with args (u'/usr/bin/python2.7', u'-b', u'-Wd', u'/home/Arfrever/portage/bin/emerge', u'-1', u'=dev-libs/A-1')

----------------------------------------------------------------------
Ran 1 test in ${time}

FAILED (failures=1)
$



I suggest that test suite somehow enable more FEATURES than those specified in cnf/make.globals when it is possible.
Comment 1 Zac Medico gentoo-dev 2015-05-31 20:58:01 UTC
There's a patch adding the absolute_import to movefile in the following branch:

https://github.com/zmedico/portage/tree/bug_550886

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/0a36739852c7f906cde158077383ca83
Comment 2 Zac Medico gentoo-dev 2015-06-05 02:01:25 UTC
(In reply to Zac Medico from comment #1)
> There's a patch adding the absolute_import to movefile in the following
> branch:

It's in the master branch now:

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c363731ecf59f74386001ba56ba0d7a73de7f2f4
Comment 3 Brian Dolbec (RETIRED) gentoo-dev 2015-09-22 01:19:53 UTC
Released in portage-2.2.21
Comment 4 Arfrever Frehtes Taifersar Arahesis 2015-09-23 06:21:17 UTC
The main suggestion from this bug (also included in summary) is not yet implemented.