For months now I have been getting the following checksum error during a `pkg check -sv py37-pycparser-2.20` scan: Checking py37-pycparser-2.20: checksums...py37-pycparser-2.20: checksum mismatch for /usr/local/lib/python3.7/site-packages/pycparser/__pycache__/c_ast.cpython-37.pyc Is there any way to fix this? A reinstall doesn't seem to help. I recall someone on irc mentioning it was affecting them as well, but I can't recall the details. Thanks!
I don't think it's devel/py-pycparser's problem. I have no idea what would cause this. It seems that the bytecode is modified after devel/py-pycparser installation. Does it happen right after you build and install devel/py-pycparser? If not, I would guess it is caused by something run with root permission. Please check the timestamp of c_ast.cpython-37.pyc and find the suspect.
In terms of reproducing the problem, it is saltstack (py37-salt) minion restarts that cause the file to regenerate. I did some digging and seems I have indeed reported this once and it was closed as a dupe: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247492 From irc, koobs was originally telling me that: "the setup.py needs to be modified to include compiling that file during build, so the file is listed in install --record output" Perhaps this helps!
(In reply to Danny McGrath from comment #2) > I did some digging and seems I have indeed reported this once and it was closed as a dupe: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247492 OK, I wasn't the maintainer then. > From irc, koobs was originally telling me that: > "the setup.py needs to be modified to include compiling that file during build, so the file is listed in install --record output" No, that's not the problem. "install --record output" tells the packaging list. The .pyc was already packaged (with checksum), otherwise you won't see it begin checked by pkg.
% pkg info -lx pycparser | grep c_ast /usr/local/lib/python3.9/site-packages/pycparser/__pycache__/c_ast.cpython-39.opt-1.pyc /usr/local/lib/python3.9/site-packages/pycparser/__pycache__/c_ast.cpython-39.pyc /usr/local/lib/python3.9/site-packages/pycparser/_c_ast.cfg /usr/local/lib/python3.9/site-packages/pycparser/c_ast.py % sudo pkg check -svx pycparser [1/1] Checking py39-pycparser-2.20: checksums... done
Here are the steps that I use: <pts/3|root|saltmaster|~ #> service salt_minion stop Stopping salt_minion. Waiting for PIDS: 91900. <pts/3|root|saltmaster|~ #> service salt_master stop Stopping salt_master. Waiting for PIDS: 30339. <pts/3|root|saltmaster|~ #> pkg check -svx pycparser [1/1] Checking py37-pycparser-2.20: checksums...py37-pycparser-2.20: checksum mismatch for /usr/local/lib/python3.7/site-packages/pycparser/__pycache__/c_ast.cpython-37.pyc done <pts/3|root|saltmaster|~ #> pkg upgrade -f py37-pycparser Updating poudriere repository catalogue... poudriere repository is up to date. All repositories are up to date. The following 1 package(s) will be affected (of 0 checked): Installed packages to be REINSTALLED: py37-pycparser-2.20 Number of packages to be reinstalled: 1 164 KiB to be downloaded. Proceed with this action? [y/N]: y [1/1] Fetching py37-pycparser-2.20.txz: 100% 164 KiB 168.4kB/s 00:01 Checking integrity... done (0 conflicting) [1/1] Reinstalling py37-pycparser-2.20... [1/1] Extracting py37-pycparser-2.20: 100% <pts/3|root|saltmaster|~ #> pkg check -svx pycparser [1/1] Checking py37-pycparser-2.20: checksums... done <pts/3|root|saltmaster|~ #> service salt_master start Starting salt_master. <pts/3|root|saltmaster|~ #> pkg check -svx pycparser [1/1] Checking py37-pycparser-2.20: checksums...py37-pycparser-2.20: checksum mismatch for /usr/local/lib/python3.7/site-packages/pycparser/__pycache__/c_ast.cpython-37.pyc done
Then you'll need to consult py-salt maintainer why it regenerates the python bytecode. Add him to Cc list.