Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-25829

yum/dnf commands search for /usr/local python modules

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • rhel-9.3.0
    • dnf
    • None
    • None
    • Moderate
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      Executing yum/dnf commands with python libraries in `/usr/local` path.

      Please provide the package NVR for which bug is seen:

      dnf-4.7.0-19.el8.noarch

      How reproducible:

      Always

      Steps to reproduce

      Executing  dnf commands (dnf repolist) looks for files in '/usr/local'. 

      ~~~
      $ strace -fttTvyy -s 128 -o dnf.strace – dnf repolist

      $ grep "/usr/local/lib" dnf.strace 
      3722  17:48:59.253706 stat("/usr/local/lib64/python3.6/site-packages", 0x7ffd1f5ff800) = -1 ENOENT (No such file or directory) <0.000003>
      3722  17:48:59.253718 stat("/usr/local/lib/python3.6/site-packages", 0x7ffd1f5ff800) = -1 ENOENT (No such file or directory) <0.000002>
      ~~~

      This eventually leads to fail yum/dnf commands when '/usr/local' has custom or problematic python3.6 libraries interfering.  For example errors like below for 'yum' : 

      ~~~
      Traceback (most recent call last):
      File "/usr/bin/yum", line 57, in <module>
      from dnf.cli import main
      ImportError: No module named dnf.cli
      ~~~

      Expected results

      The dnf/yum should not refer to '/usr/local' 

      Actual results

      The dnf/yum commands refers to '/usr/local'

              jmracek@redhat.com Jaroslav Mracek
              rhn-support-ppaddhar Paras Paddhariya
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: