fosskers / aura

A multilingual package manager for Arch Linux and the AUR.
https://fosskers.github.io/aura/
GNU General Public License v3.0
1.76k stars 114 forks source link

Building in chroot installs makedepends outside the chroot #902

Open RubenKelevra opened 3 months ago

RubenKelevra commented 3 months ago

I'm using Aura 4.0.2.

I've tried to build 3 packages on a system upgrade, and flagged them all 3 in the config to be build inside a chroot.

Issue is, Aura seems to think that it's necessary to still install the build dependencies inside the regular system. The makedepends come from pip2pkgbuild:

makedepends=(
    'python-build'
    'python-installer'
    'python-wheel'
    'python-setuptools'
)

Here is what Aura is doing:

$ aura -Ayu
aura :: Fetching package information...
aura :: Comparing package versions...
aura :: AUR packages to upgrade:
 pip2pkgbuild        :: 0.5.0-1       -> 0.5.0-2
 reshade-shaders-git :: r79.87a9e51-1 -> r80.eed46c2-1
 tor-browser-bin     :: 13.5-1        -> 13.5.2-1
aura :: Determining dependencies...
aura :: Repository dependencies:
 python-build
 python-installer
 python-pyproject-hooks
aura :: AUR packages:
 pip2pkgbuild
 reshade-shaders-git
 tor-browser-bin
aura :: Proceed? [Y/n] y
aura :: Saved package state.
resolving dependencies...
looking for conflicting packages...

Package (3)                   New Version  Net Change

extra/python-build            1.2.1-3        0.19 MiB
extra/python-installer        0.7.0-8        0.18 MiB
extra/python-pyproject-hooks  1.1.0-1        0.10 MiB

Total Installed Size:  0.47 MiB

:: Proceed with installation? [Y/n] 
(3/3) checking keys in keyring                                                                                                                [---------------------------------------------------------------------------------------] 100%
(3/3) checking package integrity                                                                                                              [---------------------------------------------------------------------------------------] 100%
(3/3) loading package files                                                                                                                   [---------------------------------------------------------------------------------------] 100%
(3/3) checking for file conflicts                                                                                                             [---------------------------------------------------------------------------------------] 100%
:: Processing package changes...
(1/3) installing python-pyproject-hooks                                                                                                       [---------------------------------------------------------------------------------------] 100%
(2/3) installing python-build                                                                                                                 [---------------------------------------------------------------------------------------] 100%
Optional dependencies for python-build
    python-pip: to use as the Python package installer (default) [installed]
    python-uv: to use as the Python package installer
    python-virtualenv: to use virtualenv for build isolation [installed]
(3/3) installing python-installer                                                                                                             [---------------------------------------------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
aura :: Preparing build directories...
aura :: Building tor-browser-bin...
==> Updating pacman database cache
:: Synchronizing package databases...
 core downloading...
 extra downloading...
 multilib downloading...
==> Building tor-browser-bin
==> WARNING: invalid architecture, not building for: i686
  ->   repo: extra
  ->   arch: x86_64
  -> worker: ruben-2
==> Building tor-browser-bin for [extra] (x86_64)
==> Creating chroot for [extra] (x86_64)...
==> Creating install root at /var/lib/archbuild/extra-x86_64/root
==> Installing packages to /var/lib/archbuild/extra-x86_64/root
[...]
fosskers commented 3 months ago

Ah, interesting case! Pointless to do the initial install of the repo-based dependencies because they'd be reinstalled inside of the chroot.

In the meantime, I imagine that building with -a turned on (as a flag on in config) would remove them after the fact either way.