Bug 34660 - ignore atomic .egg-info files for buildreq (unlike fine-grained .egg-info dirs)
Summary: ignore atomic .egg-info files for buildreq (unlike fine-grained .egg-info dirs)
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: python3-base (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Grigory Ustinov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks: 34658
  Show dependency tree
 
Reported: 2018-03-16 19:23 MSK by Ivan Zakharyaschev
Modified: 2018-03-21 15:29 MSK (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2018-03-16 19:23:06 MSK
python3-base-3.5.4-alt3

buildreq always detects docutils and cssselect, but they are not used really:

-bash-4.3$ { hsh --apt-config=/home/imz/.hasher/sisyphus/apt.conf /ALT/Sisyphus/files/SRPMS/python3-module-enchant-2.0.0-alt2.src.rpm && hsh-install rpm-utils python3-module-alabaster && hsh-run -- sh -c 'buildreq ~/RPM/SPECS/*.spec'; } 2>&1 | tail
tsort: *libssl10
tsort: *libkrb5
tsort: -: input contains a loop:
tsort: perl-parent
tsort: perl-base
tsort: -: input contains a loop:
tsort: glibc-kernheaders-generic
tsort: glibc-kernheaders-x86
packagereq: optimized out: python-base python-modules python3 python3-base python3-module-OpenSSL python3-module-Pygments python3-module-SQLAlchemy python3-module-asn1crypto python3-module-babel python3-module-cffi python3-module-chardet python3-module-cryptography python3-module-cssselect python3-module-docutils python3-module-genshi python3-module-idna python3-module-imagesize python3-module-jinja2 python3-module-lxml python3-module-markupsafe python3-module-ndg-httpsclient python3-module-ntlm python3-module-py python3-module-pycparser python3-module-pytest python3-module-pytz python3-module-requests python3-module-setuptools python3-module-six python3-module-snowballstemmer python3-module-sphinx python3-module-urllib3 python3-module-webencodings python3-module-whoosh
packagereq: BuildRequires: libenchant python3-dev python3-module-alabaster python3-module-html5lib python3-module-sphinxcontrib-websupport
-bash-4.3$ { hsh --apt-config=/home/imz/.hasher/p8/apt.conf /ALT/Sisyphus/files/SRPMS/python3-module-enchant-2.0.0-alt2.src.rpm && hsh-install rpm-utils python3-module-alabaster && hsh-run -- sh -c 'buildreq ~/RPM/SPECS/*.spec'; } 2>&1 | tail
tsort: python-modules-unittest
tsort: *python-modules
tsort: -: input contains a loop:
tsort: *libssl10
tsort: *libkrb5
tsort: -: input contains a loop:
tsort: perl-parent
tsort: perl-base
packagereq: optimized out: python-base python-modules python3 python3-base python3-module-cssselect python3-module-setuptools
packagereq: BuildRequires: libenchant python3-dev python3-module-docutils python3-module-pytz python3-module-snowballstemmer
-bash-4.3$ 

These 2 packages have "atomic" egg-info files. We have various methods of ignoring some parts of .egg-info dirs (when they are fine grained):

-bash-4.3$ rpm -qf /etc/buildreqs/files/ignore.d/python3
python3-base-3.5.1-alt7.x86_64
You have new mail in /var/mail/imz
-bash-4.3$ cat /etc/buildreqs/files/ignore.d/python3
^/usr/lib64/python3[^/]*/site-packages(/.+.(pth|egg-info/(entry_points|namespace_packages).txt))?$
^/usr/lib/python3[^/]*/site-packages(/.+.(pth|egg-info/(entry_points|namespace_packages).txt))?$
-bash-4.3$ 

and patches in python3-module-setuptools:

* https://packages.altlinux.org/en/p8/srpms/python-module-setuptools/patches/0001-command-test.py-skip-install_requires-and-tests_requ.patch
* https://packages.altlinux.org/en/p8/srpms/python-module-setuptools/patches/0002-dist.py-skip-checking-the-existence-of-system-PKG-IN.patch

Here is the contents of these 2 packages:

$ rpm -qp /ALT/Sisyphus/noarch/RPMS.classic/python3-module-docutils-0.14-alt1.1.noarch.rpm /ALT/Sisyphus/noarch/RPMS.classic/python3-module-cssselect-0.9.1-alt1.1.noarch.rpm -lv | fgrep .egg
-rw-r--r--    1 root    root                     2365 фев  6 13:12 /usr/lib/python3/site-packages/docutils-0.14-py3.5.egg-info
-rw-r--r--    1 root    root                     1843 мар 13  2016 /usr/lib/python3/site-packages/cssselect-0.9.1-py3.3.egg-info
$ 

I think that the ignore pattern should be extended (over-generalized): if we'd like to ignore some parts of .egg-info, then when it is atomic, there is no way but ignore all of it.
Comment 1 Ivan Zakharyaschev 2018-03-20 22:16:45 MSK
The fix by grenka@ is in two tasks (for python3 and python), but python (2.7) also needs to deal with the changes with the nis module (glibc has deprecated NIS), which I've been preparing.
Comment 2 Repository Robot 2018-03-21 15:29:00 MSK
python3-3.5.4-alt4 -> sisyphus:

Fri Mar 16 2018 Grigory Ustinov <grenka@altlinux> 3.5.4-alt4
- Edit regular expression for ignore.d list. (thanks for imz@) (Closes: #34660)