Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-11471

sys-apps/metatools: sandbox violation during install if PYTHONPATH is set

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Important (Ebuild) Important (Ebuild)
    • None
    • None
    • Hide
      1. Install metatools locally (most notably, set PYTHONPATH in .bashrc)
      2. Try to emerge metatools
      3. Observe the sandbox violation
      Show
      1. Install metatools locally (most notably, set PYTHONPATH in .bashrc) 2. Try to emerge metatools 3. Observe the sandbox violation
    • metatools in some cases won't merge as it will pick up a local install via PYTHONPATH.

      For a user installation of metatools (not using portage), one must set PYTHONPATH to point at the local metatools and subpop directories. The recommended way of doing this is exporting it in your `.bashrc`, which works fine, but means that the value of PYTHONPATH leaks into Portage and as a result, the metatools ebuild fails to install due to a sandbox violation.

       

      Here's the error in question with my PYTHONPATH set to `/home/inva/Coding/subpop:/home/inva/Coding/funtoo-metatools`:

       

       * --------------------------- ACCESS VIOLATION SUMMARY ---------------------------
       * LOG FILE: "/var/tmp/portage/sys-apps/metatools-1.3.3/temp/sandbox.log"
       * 
      VERSION 1.0
      FORMAT: F - Function called
      FORMAT: S - Access Status
      FORMAT: P - Path as passed to function
      FORMAT: A - Absolute Path (not canonical)
      FORMAT: R - Canonical Path
      FORMAT: C - Command LineF: open_wr
      S: deny
      P: /home/inva/Coding/subpop/subpop/__pycache__/pkg.cpython-39.pyc.139660192907760
      A: /home/inva/Coding/subpop/subpop/__pycache__/pkg.cpython-39.pyc.139660192907760
      R: /home/inva/Coding/subpop/subpop/__pycache__/pkg.cpython-39.pyc.139660192907760
      C: python3.9 setup.py install --skip-build --root=/var/tmp/portage/sys-apps/metatools-1.3.3/image/_python3.9 
       * --------------------------------------------------------------------------------

      If I run `unset PYTHONPATH` before emerging metatools, it installs fine:

       

      $ unset PYTHONPATH
      $ sudo emerge -1 metatools
      ...
      >>> Completed installing sys-apps/metatools-1.3.3 into /var/tmp/portage/sys-apps/metatools-1.3.3/image
       * Final size of build directory: 1140 KiB (1.1 MiB)
       * Final size of installed tree:  1856 KiB (1.8 MiB)
      >>> Installing (1 of 1) sys-apps/metatools-1.3.3::core-kit
      >>> Auto-cleaning packages...
      

       

       

            Unassigned Unassigned
            invakid404 invakid404
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: