actionless / pikaur

AUR helper with minimal dependencies. Review PKGBUILDs all in once, next build them all without user interaction.
GNU General Public License v3.0
859 stars 86 forks source link

Implement `--assume-installed` flag like in Pacman #633

Open gudenau opened 2 years ago

gudenau commented 2 years ago
pikaur -Vq
Pikaur v1.10.1
Pacman v6.0.1 - libalpm v13.0.1 - pyalpm v0.10.6
[Optional] Prerequisites:
Description:

When passing --assume-installed package=version to Pikaur packages do not build with a "fresh" build script and do not correctly install.

It appears to pass --assume_installed to Pacman and not correctly tell the build system that the dependency is technically present, even when not installed by the package manager itself.

Attached log:
pikaur -S multimc-bin --asume-installed java-runtime=17 --verbose --pikaur-debug
sudo pikaur -S multimc-bin --assume-installed java-runtime=17 --verbose --pikaur-debug
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp true
:: debug: Pikaur operation found for sys.argv=['/usr/bin/pikaur', '-S', 'multimc-bin', '--assume-installed', 'java-runtime=17', '--verbose', '--pikaur-debug']: cli_install_packages
:: debug: install_info_fetcher: Gonna fetch install info for:
    install_package_names=['multimc-bin']
    not_found_repo_pkgs_names=[]
    pkgbuilds_packagelists={}
    manually_excluded_packages_names=[]

:: debug: install_info_fetcher: Gonna get repo pkgs install info...
Reading repository package databases...
Reading local package database...
=> pacman --color=always --assume-installed java-runtime=17 --sync --assume_installed multimc-bin --print-format %r/%n
:: debug: install_info_fetcher: gonna get AUR pkgs install info for:
    aur_packages_versionmatchers=['multimc-bin']
    self.aur_updates_install_info=[]
    aur_packages_names_to_versions={'multimc-bin': <VersionMatcher multimc-bin['cmp_default']None>}
=> GET https://aur.archlinux.org/rpc/?v=5&type=info&arg[]=multimc-bin
:: debug: install_info_fetcher: found AUR pkgs:
    aur_pkg_list=[<AURPackageInfo "multimc-bin" 0.6.14.2998-2>]
    not_found_aur_pkgs=[]

:: debug: install_info_fetcher: got AUR pkgs install info: self.aur_updates_install_info=[<InstallInfo "multimc-bin" 0.6.12.1438-2 -> 0.6.14.2998-2>]
Resolving AUR dependencies...
=> pacman --color=always --assume-installed java-runtime=17 --deptest zlib libgl qt5-base java-runtime

:: AUR package will be installed:
 multimc-bin                           0.6.12.1438-2        -> 0.6.14.2998-2

:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
:: Proceed with installation? [Y/n] 
:: [v]iew package details   [m]anually select packages
>> Y
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'y'
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp git -C /var/cache/pikaur/aur_repos/multimc-bin pull origin master
looking for conflicting AUR packages...
:: warning: Not showing diff for multimc-bin package (installing for the first time)
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
Do you want to edit PKGBUILD for multimc-bin package? [Y/n] n
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'n'

:: debug: Gonna build self.package_builds_by_name={'multimc-bin': <pikaur.build.PackageBuild object at 0x7f6a3d229630>}
:: debug: Gonna build pkg_build.package_names=['multimc-bin']
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp mkdir -p /var/cache/private/pikaur/build/multimc-bin
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp cp -r /var/cache/private/pikaur/aur_repos/multimc-bin/PKGBUILD /var/cache/private/pikaur/aur_repos/multimc-bin/multimc.desktop /var/cache/private/pikaur/aur_repos/multimc-bin/multimc /var/cache/private/pikaur/aur_repos/multimc-bin/multimc.svg /var/cache/private/pikaur/aur_repos/multimc-bin/.SRCINFO /var/cache/private/pikaur/aur_repos/multimc-bin/.gitignore /var/cache/private/pikaur/build/multimc-bin/
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --packagelist

:: Starting the build:
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --force
Running as unit: run-u468.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: multimc-bin 0.6.14.2998-2 (Thu 17 Feb 2022 12:01:48 AM CST)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> java-runtime
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
Finished with result: exit-code
Main processes terminated with: code=exited/status=8
Service runtime: 2.157s
CPU time consumed: 2.419s

Command 'systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --force' failed to execute.
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
:: Try recovering?
[R] retry build
[p] PGP check skip
[c] checksums skip
[f] skip 'check()' function of PKGBUILD
[i] ignore architecture
[d] delete build dir and try again
[e] edit PKGBUILD
------------------------
[s] skip building this package
[a] abort building all the packages
> e
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'e'
=> /usr/bin/nano /var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp cp /var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD /var/cache/pikaur/build/multimc-bin/PKGBUILD
Running as unit: run-u469.service
Press ^] three times within 1s to disconnect TTY.
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 49ms
CPU time consumed: 7ms
:: debug: install_cli: handle pkgbuild changed pkg_build=<pikaur.build.PackageBuild object at 0x7f6a3d229630>
:: debug: install_cli: discarding install info for pkg... multimc-bin
:: debug: install_info_fetcher: discarding canceled_pkg_name='multimc-bin'
:: debug: install_cli: discarded install info for pkg: multimc-bin
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/aur_repos/multimc-bin makepkg --printsrcinfo -p PKGBUILD
:: debug: install_info_fetcher: Gonna fetch install info for:
    install_package_names=[]
    not_found_repo_pkgs_names=[]
    pkgbuilds_packagelists={'/var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD': ['multimc-bin']}
    manually_excluded_packages_names=[]

:: debug: install_info_fetcher: Gonna get repo pkgs install info...
:: debug: install_info_fetcher: gonna get AUR pkgs install info for:
    aur_packages_versionmatchers=[]
    self.aur_updates_install_info=[]
    aur_packages_names_to_versions={}
:: debug: install_info_fetcher: found AUR pkgs:
    aur_pkg_list=[]
    not_found_aur_pkgs=[]

:: debug: install_info_fetcher: got AUR pkgs install info: self.aur_updates_install_info=[]
:: debug: install_info_fetcher: gonna get install info from PKGBUILDs... self.aur_updates_install_info=[]
:: debug: install_info_fetcher: got install info from PKGBUILDs... self.aur_updates_install_info=[<InstallInfo "multimc-bin" 0.6.12.1438-2 -> 0.6.14.2998-2>]
Resolving AUR dependencies...
=> pacman --color=always --assume-installed java-runtime=17 --deptest zlib libgl qt5-base
:: warning: Installation info changed (or new deps found) for multimc-bin package
:: debug: install_info_fetcher: Gonna fetch install info for:
    install_package_names=[]
    not_found_repo_pkgs_names=[]
    pkgbuilds_packagelists={'/var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD': ['multimc-bin']}
    manually_excluded_packages_names=[]

:: debug: install_info_fetcher: Gonna get repo pkgs install info...
:: debug: install_info_fetcher: gonna get AUR pkgs install info for:
    aur_packages_versionmatchers=[]
    self.aur_updates_install_info=[]
    aur_packages_names_to_versions={}
:: debug: install_info_fetcher: found AUR pkgs:
    aur_pkg_list=[]
    not_found_aur_pkgs=[]

:: debug: install_info_fetcher: got AUR pkgs install info: self.aur_updates_install_info=[]
:: debug: install_info_fetcher: gonna get install info from PKGBUILDs... self.aur_updates_install_info=[]
:: debug: install_info_fetcher: got install info from PKGBUILDs... self.aur_updates_install_info=[<InstallInfo "multimc-bin" 0.6.12.1438-2 -> 0.6.14.2998-2>]
Resolving AUR dependencies...

:: AUR package will be installed:
 multimc-bin                           0.6.12.1438-2        -> 0.6.14.2998-2

:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
:: Proceed with installation? [Y/n] 
:: [v]iew package details   [m]anually select packages
>> Y
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'y'
:: debug: Initializing build info for pkg_base='multimc-bin', info.pkgbuild_path='/var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD', package_names=['multimc-bin']
looking for conflicting AUR packages...
:: warning: Not showing diff for multimc-bin package (installing for the first time)
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
Do you want to edit PKGBUILD for multimc-bin package? [Y/n] Y
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'y'
=> /usr/bin/nano /var/cache/pikaur/aur_repos/multimc-bin/PKGBUILD

:: debug: Gonna build self.package_builds_by_name={'multimc-bin': <pikaur.build.PackageBuild object at 0x7f6a3d22b8e0>}
:: debug: Gonna build pkg_build.package_names=['multimc-bin']
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp mkdir -p /var/cache/private/pikaur/build/multimc-bin
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp cp -r /var/cache/private/pikaur/aur_repos/multimc-bin/PKGBUILD /var/cache/private/pikaur/aur_repos/multimc-bin/multimc.desktop /var/cache/private/pikaur/aur_repos/multimc-bin/multimc /var/cache/private/pikaur/aur_repos/multimc-bin/multimc.svg /var/cache/private/pikaur/aur_repos/multimc-bin/.SRCINFO /var/cache/private/pikaur/aur_repos/multimc-bin/.gitignore /var/cache/private/pikaur/build/multimc-bin/
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --packagelist

:: Starting the build:
=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --force
Running as unit: run-u474.service
Press ^] three times within 1s to disconnect TTY.
==> Making package: multimc-bin 0.6.14.2998-2 (Thu 17 Feb 2022 12:02:36 AM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading multimc-0.6.14.2998.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 3504k  100 3504k    0     0   612k      0  0:00:05  0:00:05 --:--:--  799k
  -> Found multimc.svg
  -> Found multimc.desktop
  -> Found multimc
==> Validating source files with sha256sums...
    multimc-0.6.14.2998.tar.gz ... Passed
    multimc.svg ... Passed
    multimc.desktop ... Passed
    multimc ... Passed
==> Extracting sources...
  -> Extracting multimc-0.6.14.2998.tar.gz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "multimc-bin"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: multimc-bin 0.6.14.2998-2 (Thu 17 Feb 2022 12:02:45 AM CST)
Finished with result: success
Main processes terminated with: code=exited/status=0
Service runtime: 10.962s
CPU time consumed: 5.912s

=> systemd-run --service-type=oneshot --pipe --wait --pty -p DynamicUser=yes -p CacheDirectory=pikaur -E HOME=/tmp -p WorkingDirectory=/var/cache/pikaur/build/multimc-bin makepkg --packagelist
:: debug: Build done for packages pkg_build.package_names=['multimc-bin'], removing from queue
pikspect => pacman --color=always --assume-installed java-runtime=17 --upgrade --assume_installed --verbose /var/cache/pikaur/pkg/multimc-bin-0.6.14.2998-2-x86_64.pkg.tar.zst
:: debug: pikspect: Opening virtual terminal...
pacman: unrecognized option '--assume_installed'
Command 'pacman --color=always --assume-installed java-runtime=17 --upgrade --assume_installed --verbose /var/cache/pikaur/pkg/multimc-bin-0.6.14.2998-2-x86_64.pkg.tar.zst' failed to execute.
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
Do you want to retry? [Y/n] n
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'n'
:: debug: PROMPT: Gonna get input from user...
:: debug: PROMPT: Restoring TTY...
:: debug: PROMPT: Using standard input reader...
Do you want to proceed? [y/N] n
:: debug: PROMPT: Reverting to prev TTY state...
:: debug: PROMPT: Got answer: 'n'
actionless commented 2 years ago

it does not function at all:

$ grep -R assume pikaur
pikaur/core.py:    # If BOM is not provided, then assume its the codepage
pikaur/args.py:    (None, 'assume-installed', None),  # @TODO