Skip to content

Conversation

@hmxf
Copy link

@hmxf hmxf commented Aug 15, 2025

Fixed Errors about QA Issue with package topic-tools and sensor-msgs contains reference to TMPDIR [buildpaths]

Error log contains these two lines:

  • QA Issue: File /opt/ros/noetic/lib/python3.13/site-packages/topic_tools/pycache/init.cpython-313.pyc in package topic-tools contains reference to TMPDIR [buildpaths]
  • QA Issue: File /opt/ros/noetic/lib/python3.13/site-packages/sensor_msgs/pycache/init.cpython-313.pyc in package sensor-msgs contains reference to TMPDIR [buildpaths]
image

…contains reference to TMPDIR [buildpaths]

Signed-off-by: hmxf <[email protected]>
@robwoolley robwoolley changed the title Fixed Errors about QA Issue for noetic [walnascar]{noetic}Fixed Errors about QA Issue for noetic Aug 16, 2025
@robwoolley robwoolley changed the title [walnascar]{noetic}Fixed Errors about QA Issue for noetic [walnascar]{noetic} Fixed Errors about QA Issue for noetic Aug 16, 2025
@robwoolley
Copy link
Collaborator

robwoolley commented Aug 22, 2025

Hi @hmxf. Thanks for reporting this. This was a great test for the CI system that I'm bring online. I have reproduced the problem and also identified some other packages that are affected by buildpaths as well: https://gitlab.com/oeros/meta-ros/-/jobs/11109146455

As a temporary workaround you can do:

ERROR_QA:remove:layer-ros1-noetic-layer = "buildpaths"
WARN_QA:append:layer-ros1-noetic-layer = " buildpaths"

Thanks for submitting the PR as well. It is very tedious to fix the buildpath issues, so I really appreciate it. Running sed directly on the binary file is not ideal. Would it be possible to change the fix to modify the .py file?

This is how I have done it on other packages:

# ERROR: QA Issue: File /opt/ros/noetic/include/nodelet_topic_tools/NodeletThrottleConfig.h in package nodelet-topic-tools-dev contains reference to TMPDIR [buildpaths]
# ERROR: QA Issue: File /opt/ros/noetic/lib/python3.13/site-packages/nodelet_topic_tools/cfg/NodeletThrottleConfig.py in package nodelet-topic-tools contains reference to TMPDIR [buildpaths]
# ERROR: QA Issue: File /opt/ros/noetic/lib/python3.13/site-packages/nodelet_topic_tools/cfg/__pycache__/__init__.cpython-313.pyc in package nodelet-topic-tools contains reference to TMPDIR [buildpaths]
# ERROR: QA Issue: File /opt/ros/noetic/lib/python3.13/site-packages/nodelet_topic_tools/cfg/__pycache__/NodeletThrottleConfig.cpython-313.pyc in package nodelet-topic-tools contains reference to TMPDIR [buildpaths]
do_install:append() {
    sed -i -e "s#${RECIPE_SYSROOT}##g" ${D}${ros_libdir}/${PYTHON_DIR}/site-packages/nodelet_topic_tools/cfg/NodeletThrottleConfig.py
    sed -i -e "s#${RECIPE_SYSROOT}##g" ${D}${ros_includedir}/nodelet_topic_tools/NodeletThrottleConfig.h
    nativepython3 -mcompileall -s ${D} ${D}${ros_libdir}/${PYTHON_DIR}/site-packages/nodelet_topic_tools/cfg/__init__.py
    nativepython3 -mcompileall -s ${D} ${D}${ros_libdir}/${PYTHON_DIR}/site-packages/nodelet_topic_tools/cfg/NodeletThrottleConfig.py
}

In some cases the RECIPE_SYSROOT is in the .py directly and can be removed with sed. In other cases you have to manually invoke python3 to recompile the bytecode to strip out the directory with the -s ${D} option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants