Fix removing added packages from pacman cache

Now this behaviour may seem disk-shreddy, but the real issue is always running add_file_to_repo() during package scanning,
which should be solved by parsing the repo db and comparing checksums at package build time and in case pacman installation fails.
This commit is contained in:
InsanePrawn 2021-10-24 03:04:47 +02:00
parent 49e6bf740f
commit 46b638059c

View file

@ -305,7 +305,7 @@ def generate_dependency_chain(package_repo: dict[str, Package], to_build: list[P
def add_file_to_repo(file_path: str, repo_name: str, arch: Arch):
repo_dir = os.path.join(config.get_package_dir(arch), repo_name)
pacman_cache_dir = os.path.join(config.get_path('pacman'))
pacman_cache_dir = os.path.join(config.get_path('pacman'), arch)
file_name = os.path.basename(file_path)
target_file = os.path.join(repo_dir, file_name)