Giter VIP home page Giter VIP logo

pikaur's Introduction

pikaur

Tests Coverage Status Commit Activity Support Project

AUR helper with minimal dependencies. Review PKGBUILDs all in once, next build them all without user interaction.

Inspired by pacaur, yaourt and yay.

Instead of trying to be smarter than pacman (by using --nodeps, --force, --ask, --noconfirm and so) it just interactively tells pacman what to do. If pacman asks some unexpected question, the user will be just able to answer it manually.

Notable features:

  • build local PKGBUILDs with AUR deps (-P/--pkgbuild)
  • retrieve PKGBUILDs from AUR and ABS (-G/--getpkgbuild)
  • interactively handle common build problems (like untrusted GPG key or checksum mismatch, wrong architecture)
  • using systemd dynamic users if building packages as root user
  • show unread Arch news before sysupgrade
  • [m]anual package selection in install prompt using text editor (ignore unwanted updates or select package provider)
  • show AUR package diff and review PKGBUILD and .install files
  • upgrade -git, -svn and other dev packages
  • AUR package names in shell completion (bash, fish, zsh)
  • quickly search&install package by pikaur <search-query>

The following pacman operations are extended with AUR capabilities:

  • -S (build AUR packages, --needed, --ignore and --noconfirm are supported as in pacman, other args are just bypassed to it)
  • -Sw (build AUR packages but don't install)
  • -Ss (search or list all AUR packages, -q also supported)
  • -Si (package info)
  • -Su / -Syu (sysupgrade)
  • -Sc / -Scc (build dir/built packages cache clean)
  • -Qu (query upgradeable, -q supported)

Also see pikaur -Sh, -Qh, -Ph and -Gh for pikaur-specific flags.

Pikaur wraps all the pacman options accurately except for -Syu which is being split into -Sy (to refresh package list first) and -Su (to install upgrades after user confirmed the package list or altered it via [M]anual package selection).

Installation

sudo pacman -S --needed base-devel git
git clone https://aur.archlinux.org/pikaur.git
cd pikaur
makepkg -fsri

Screenshot

Screenshot

Run without installation

git clone https://github.com/actionless/pikaur.git
cd pikaur
python3 ./pikaur.py -S AUR_PACKAGE_NAME

File locations

~/.cache/pikaur/
├── build/  # build directory (removed after successful build)
├── pkg/  # built packages directory
~/.config/pikaur.conf  # config file
~/.local/share/pikaur/
└── aur_repos/  # keep aur repos there; show diff when updating
    └── last_installed.txt  # aur repo hash of last successfully installed package

Configuration

~/.config/pikaur.conf

[sync]

DevelPkgsExpiration (default: -1)

When doing sysupgrade, count all devel (-git, -svn, -bzr, -hg, -cvs) packages older than N days as being upgradeable. -1 disables this. 0 means always upgrade. Passing --devel argument will override this option to 0.

AlwaysShowPkgOrigin (default: no)

When installing new packages, show their repository name, even if they are coming from one of the official Arch Linux repositories.

UpgradeSorting (default: versiondiff)

When upgrading packages, sort them by versiondiff, pkgname or repo.

ShowDownloadSize (default: no)

When installing repository packages, show their download size.

IgnoreOutofdateAURUpgrades (default: no)

When doing sysupgrade ignore AUR packages which have outofdate mark.

[build]

GpgDir (default: ) (root default: /etc/pacman.d/gnupg)

Provides an override path for the GPG home directory used when validating aur package sources. See explanations of --homedir and ${GNUPGHOME} in the gpg man pages for more details. Will be overridden by --build_gpgdir argument.

KeepBuildDir (default: no)

Don't remove ~/.cache/pikaur/build/${PACKAGE_NAME} directory between the builds. Will be overridden by -k/--keepbuild flag.

KeepDevBuildDir (default: yes)

When building dev packages (-git, -svn, etc), don't remove ~/.cache/pikaur/build/${PACKAGE_NAME} directory between the builds. No value will be overridden by KeepBuildDir option and -k/--keepbuild flag.

KeepBuildDeps (default: no)

Don't remove build dependencies between and after the builds. Will be overridden by --keepbuilddeps flag.

SkipFailedBuild (default: no)

Always skip the build if it fails and don't show recovery prompt.

DynamicUsers (default: root) [root|never|always]

When to isolate the build using systemd dynamic users. (root - only when running as root) Will be overridden by --dynamic-users flag.

IgnoreArch (default: no)

Ignore specified architectures (arch-array) in PKGBUILDs.

[review]

DontEditByDefault (default: no)

Always default to no when prompting to edit PKGBUILD and install files.

NoEdit (default: no)

Don't prompt to edit PKGBUILD and install files. Will be overridden by --noedit and --edit flags.

NoDiff (default: no)

Don't prompt to show the build files diff. Will be overridden by --nodiff flag.

GitDiffArgs (default: --ignore-space-change,--ignore-all-space)

Flags to be passed to git diff command when reviewing build files. Should be separated by commas (,).

DiffPager (default: auto)

Wherever to use less pager when viewing AUR packages diff. Choices are always, auto or never.

HideDiffFiles (default: .SRCINFO)

Hide git diff for file paths, separated by commas (,).

[colors]

Terminal colors, from 0 to 15:

Version (default: 10)
VersionDiffOld (default: 11)
VersionDiffNew (default: 9)

[ui]

RequireEnterConfirm (default: yes)

Require enter key to be pressed when answering questions.

PrintCommands (default: no)

Print each command which pikaur is currently spawning.

GroupByRepo (default: yes)

Groups official packages by repository when using commands like pikaur -Ss <query> or pikaur <query>.

AurSearchSorting (default: hottest)

Sorting key for AUR packages when using commands like pikaur -Ss <query> or pikaur <query>. Accepts hottest, numvotes, lastmodified, popularity, pkgname. Only pkgname is sorted ascendingly. The metric for hottest is weighted by both numvotes and popularity.

DisplayLastUpdated (default: no)

Display the date a package is last updated on search results when using commands like pikaur -Ss <query> or pikaur <query>.

ReverseSearchSorting (default: no)

Reverse search results of the commands like pikaur -Ss <query> or pikaur <query>.

WarnAboutPackageUpdates (default: )

Comma-separated list of packages names or globs, which upgrade should have additional warning message in the UI.

[misc]

PacmanPath (default: pacman)

Path to pacman executable.

PreserveEnv (default: PKGDEST,VISUAL,EDITOR,http_proxy,https_proxy,ftp_proxy,HTTP_PROXY,HTTPS_PROXY,FTP_PROXY,ALL_PROXY)

Preserve environment variables of current user when running pikaur as root (comma-separated). Will be overriden by --preserve-env flag.

PrivilegeEscalationTool (default: sudo)

A tool used to escalate user privileges. Currently supported options are sudo and doas.

PrivilegeEscalationTarget (default: pikaur)

Choices: pikaur, pacman. In case of elevating privilege for pacman - pikaur would ask for password every time pacman runs.

UserId (default: 0)

User ID to run makepkg if pikaur started from root. 0 - means disabled, not that it will use uid=0. Setting this option would override DynamicUsers settings and force changing to this UID instead of a dynamic one.

CachePath (default: ~/.cache)

Path to package cache location. Will be overridden by --xdg-cache-home argument or environment variable XDG_CACHE_HOME, if set.

DataPath (default: ~/.local/share)

Path to database location. Will be overridden by --xdg-data-home argument or environment variable XDG_DATA_HOME, if set.

[network]

AurUrl (default: https://aur.archlinux.org)

AUR Host.

Arch Linux News URL, useful for users of Parabola or other Arch derivatives.

Socks5Proxy (default: )

Specify a socks5 proxy which is used to get AUR package information.

The format is [host[:port]], and the default port is 1080. PySocks module (python-pysocks package) should be installed in order to use this option.

Note that any downloads by pacman, git or makepkg will NOT use this proxy. If that's needed, setting proxy options in their own config files will take effect (such as ~/.gitconfig, ~/.curlrc).

AurHttpProxy (default: )

Specify a HTTP proxy which is used to get AUR package information and to git-clone from AUR.

Note that any downloads by pacman, git (inside the build) or makepkg will NOT use this proxy. If that's needed, setting proxy options in their own config files will take effect (such as env HTTP_PROXY=, ~/.gitconfig, ~/.curlrc).

AurHttpsProxy (default: )

Specify a HTTPS proxy which is used to get AUR package information and to git-clone from AUR.

Note that any downloads by pacman, git (inside the build) or makepkg will NOT use this proxy. If that's needed, setting proxy options in their own config files will take effect (such as env HTTPS_PROXY=, ~/.gitconfig, ~/.curlrc).

FAQ

How to upgrade all the dev (-git) packages at once?

pikaur -Sua --devel --needed

(--needed option will make sure what the same package version won't be rebuilt again and -a/--aur will ensure what only AUR packages will be upgraded)

How to manually remove unneeded dependencies?

Pikaur is not needed for that, use just Pacman itself:

sudo pacman -Rs $(pacman -Qtdq) (however pikaur -Rs ... would work as well if you lazy to type sudo :) )

How to override default source directory, build directory or built package destination?

Set SRCDEST, BUILDDIR or PKGDEST accordingly in makepkg.conf.

For more info see makepkg documentation.

How to clean old or uninstalled AUR packages in ~/.cache/pikaur/pkg?

Use paccache(8) with the --cachedir option.

To clean them up automatically, you may:

  • use a pacman hook. Start with the provided Copy /usr/share/pikaur/examples/pikaur-cache.hook to /usr/share/libalpm/hooks/pikaur-cache-cleanup.hook, remember to update the cache's path.

  • use a systemd service & timer (provided pikaur-cache.service and pikaur-cache.timer). Configure it with systemctl --user edit --full pikaur-cache.service and activate it with systemctl --user enable --now pikaur-cache.timer.

How to restore original PKGBUILD after editing?

Go to the package's directory, cd ~/.local/share/pikaur/aur_repos/${PACKAGE_NAME}. Review the current PKGBUILD file changes with git diff and then reset with git checkout -- '*'.

How to see upgrade list without syncing the database? (like "checkupdates" tool from pacman)

Actually use checkupdates tool to check the repo updates and use pikaur only for AUR (-a/--aur switch):

checkupdates ; pikaur -Qua 2>/dev/null
Pikaur slow when running it as root user (or via sudo)

If you find the command takes a long time to initialize, make sure to periodically clear your cache: pikaur -Scc. Root pikaur is using SystemD Dynamic Users to isolate build process from the root, and it takes some time to change the owner of build cache to dynamic temporary user.

How to migrate from Yay?

This will migrate the cache of what AUR packages have been installed, so you can still see a Git diff for the next update of each package:

mv ~/.cache/yay/* ~/.local/share/pikaur/aur_repos/
find ~/.local/share/pikaur/aur_repos -mindepth 1 -maxdepth 1 -type d | xargs -r -I '{}' -- sh -c 'cd "{}" && git rev-parse HEAD > last_installed.txt'
How to downgrade a package?

This will show a list of commits to choose one to downgrade to.

pikaur -G <package>  # retrieve package sources
cd <package>
git log  # choose <commit> from the list
git checkout <commit>
pikaur -Pi  # build and install older version
How to add additional trusted keys when building with systemd dynamic users?

When using systemd dynamic users, by default, there is not a persistent user or gpg home directory. You can set the path to a persistent gpg home directory using the cli argument --build_gpgdir. Alternatively, you can set a permanent default with the configuration option [build] gpgdir in the root pikaur configuration file /root/.config/pikaur.conf The below example configures makepkg to use a hypothetical gpg home directory at /etc/pikaur.d/gnupg when validating source files.

[build]
gpgdir=/etc/pikaur.d/gnupg

You can initialize a minimal gnupghome at the example path by executing the below commands as root.

export GNUPGHOME="/etc/pikaur.d/gnupg"
mkdir -p "${GNUPGHOME}"
gpg --batch --passphrase '' --quick-gen-key "pikaur@localhost" rsa sign 0

Contributing

Code

You can start from this list of issues. Grep-ing @TODO comments also useful if you're itching to write something.

Running CI locally

Linters (code quality check)
./maintenance_scripts/lint.sh
Tests
./maintenance_scripts/docker_test.sh

See also ./maintenance_scripts/docker_test.sh --help for more options.

Translations

To start working on a new language, say hi_IN (Indian Hindi), add it to the Makefile LANGS variable and run make. Then translate locale/hi_IN.po using your favorite PO editor. Run make every time the Python code strings change or the .po is modified.

Authors

To see the list of authors, use this command inside pikaur git repository directory:

git log --pretty=tformat:"%an <%ae>" | sort -u

Special thanks

@AladW (aurutils), @morganamilo (yay) during the early stages of Pikaur development. And all the other issue contributors for helping in triaging the bugs and clearing up feature requirements.

pikaur's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pikaur's Issues

pikaur gets confused by unity-editor

Trying to install unity-editor results in the following message from pikaur:

Command "sudo pacman --upgrade --noconfirm /home/sami/.cache/pikaur/build/unity-editor/unity-editor-1:2017.3.1f1+20180216-1-x86_64.pkg.tar' # Prevent compressing of the final package

--download-location="${startdir}" \

--install-location="${pkgdir}${_prefix}" \

yes | unity-setup --components=$1 > "/tmp/$1.log"

sed -i "/^Version=/c\Version=${_version}${_build}" "${srcdir}/unity-editor.desktop" failed to execute.

It seems that it might be getting confused by the PKGEXT= line.

"Manually select packages" option doesn't allow reselection

Example:

:: Repository packages will be installed:
 iana-etc                              20180131-1          -> 20180221-1
 python2-hyperlink                     17.3.1-1            -> 18.0.0-1
 reflector                             2017.11-1           -> 2018-1

After I press m then delete python2-hyperlink and reflector in vim:

:: Repository packages will be installed:
 iana-etc                              20180131-1          -> 20180221-1

If I press m again, I cannot reselect python2-hyperlink and reflector.

AUR package

Hi,
I really like this project and it is impressive how far it has come in just about 2 week. I was wondering, if you are planning to offer an AUR package?

Large diffs break non interactive mode

Normally we should be able to just run --noconfirm --noedit and then pikaur would do everything without needing any input from the user.

This is not the case when we do the git diff in review_build_files and the diff is larger than the size of the terminal, because it opens git diff in a pager when stdout is a tty.

We should use the --exit-code option of git diff, which disables pagers, when using one of the options mentioned above.

Allow for unattended installation

However dangerous it may be, in certain situations unattended package installation is very helpful. For example automatic provisioning of a sandbox VM.

It would be great if pikaur could provide options like pacaur's --no-edit and --no-confirm options.

Error in pikaur -Syu

First, thanks for the amazing alternative to pacaur and yaourt, the error is:

$ pikaur -Syu
[sudo] password for xavier:
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
herecura is up to date
home_pbek_QOwnNotes_Arch_Extra is up to date
arch4edu is up to date
archlinuxcn is up to date
:: Starting full system upgrade...
Reading repository package databases............................................................................................................
:: Starting full AUR upgrade...
Reading local package database..................................................................................................................
Traceback (most recent call last):
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur.py", line 8, in
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 244, in main
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 196, in cli_entry_point
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 79, in cli_upgrade_packages
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/meta_package.py", line 212, in exclude_ignored_packages
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/core.py", line 314, in get
File "/home/xavier/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/core.py", line 308, in get_config
File "/usr/lib/python3.6/configparser.py", line 723, in read_string
self.read_file(sfile, source)
File "/usr/lib/python3.6/configparser.py", line 718, in read_file
self._read(f, source)
File "/usr/lib/python3.6/configparser.py", line 1092, in _read
fpname, lineno)
configparser.DuplicateOptionError: While reading from '' [line 42]: option 'server' in section 'all' already exists

Resolving dependencies issue

pikaur has problem with dependencies resolution for some packages.

Installing with pikaur

pikaur -S seafile-client

resolving dependencies...
Reading repository package databases...
Reading local package database...
Version mismatch:
 seafile-client depends on: 'seafile=6.1.5'
 found in 'aur': '6.1.5-2'

same installed with pacaur:

pacaur -S seafile-client
:: Package seafile-client not found in repositories, trying AUR...
:: resolving dependencies...
:: looking for inter-conflicts...

AUR Packages  (4) ccnet-6.1.5-3  libsearpc-1:3.0.8-2  seafile-6.1.5-2  seafile-client-6.1.5-2
Repo Packages (1) python2-simplejson-3.13.2-1

Repo Download Size:   0.00 MiB
Repo Installed Size:  0.37 MiB

:: Proceed with installation? [Y/n]
[...]

Running pikaur via xargs causes it to fail with EOFError

When running

xargs pikaur -S < aur_packages

Execution fails with the following output

resolving dependencies...
Reading repository package databases...
Reading local package database...

:: AUR packages will be installed:
 pikaur-git                            0.6-1               -> 0.6-1

:: Proceed with installation? [Y/n] 
:: [v]iew package detail   [m]anually select packages
> Traceback (most recent call last):
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur.py", line 8, in <module>
    main()
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 250, in main
    cli_entry_point()
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 210, in cli_entry_point
    cli_install_packages(args)
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 59, in cli_install_packages
    InstallPackagesCLI(args=args, packages=packages)
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/install_cli.py", line 136, in __init__
    self.install_prompt()
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/install_cli.py", line 296, in install_prompt
    answer = _print_sysupgrade()
  File "/home/oliver/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/install_cli.py", line 285, in _print_sysupgrade
    answer = input('{} {}\n{} {}\n> '.format(
EOFError: EOF when reading a line

Fish completion and PKGEXT

Hi, I just noticed that the fish completion for pikaur does not consider filenames ending in .pkg.tar when completing pikaur -U. Looking at /usr/share/fish/completions/pikaur.fish, I noticed this segment:

# Upgrade options
# Theoretically, pacman reads packages in all formats that libarchive supports
# In practice, it's going to be tar.xz or tar.gz
# Using "pkg.tar.*" here would change __fish_complete_suffix's descriptions to "unknown"
complete -c $progname -n "$upgrade" -xa '(__fish_complete_suffix pkg.tar.xz)' -d 'Package file'
complete -c $progname -n "$upgrade" -xa '(__fish_complete_suffix pkg.tar.gz)' -d 'Package file'

I understand not wanting to list every single possibility (though I just tried "pkg.tar*" and did not notice the difference mentioned in the comment), but .pkg.tar seems to be quite a popular option, since it bypasses compression entirely, which makes it very fast.

See for example:

https://www.reddit.com/r/archlinux/comments/3ctiou/lpt_speed_up_makepkg_by_skippingparallelizing/

Could we perhaps add it to the fish completion?

Thanks.

Small Bug if no packets can be upgraded

 pikaur -Syu
 :: Synchronising package databases...
  core is up to date
  extra is up to date
  community is up to date
  multilib is up to date
  blackarch is up to date
 :: Starting full system upgrade...
 Reading repository package databases.............................................................
 :: Starting full AUR upgrade...
 Reading local package database..................................................................
 resolving dependencies...

 :: Proceed with installation? [Y/n] 
 :: [v]iew package detail   [m]anually select packages
 > v

 :: Proceed with installation? [Y/n] 
 :: [v]iew package detail   [m]anually select packages
 > v

 :: Proceed with installation? [Y/n] 
 :: [v]iew package detail   [m]anually select packages
 > m
 Traceback (most recent call last):
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur.py", line 8, in <module>
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/main.py", line 244, in main
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/main.py", line 196, in cli_entry_point
    File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/main.py", line 93, in cli_upgrade_packages
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/main.py", line 56, in cli_install_packages
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/install_cli.py", line 98, in __init__
   File "/tmp/trizen-daniel/pikaur-git/src/pikaur-git/pikaur/install_cli.py", line 215, in install_prompt
 NotImplementedError

I feel like this is not intended. Maybe a check is missing, if packets exist that should be upgraded.

Thank you for your work, we all appreciate it :)

pikaur installation failure?

Traceback (most recent call last):
File "/bin/pikaur", line 8, in
main()
File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 342, in main
cli_entry_point()
File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 294, in cli_entry_point
cli_install_packages(args)
File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 64, in cli_install_packages
InstallPackagesCLI(args=args, packages=packages)
File "/usr/lib/python3.6/site-packages/pikaur/install_cli.py", line 131, in init
self.build_packages()
File "/usr/lib/python3.6/site-packages/pikaur/install_cli.py", line 525, in build_packages
repo_status.build(self.args, self.package_builds)
File "/usr/lib/python3.6/site-packages/pikaur/build.py", line 395, in build
self._set_built_package_path()
File "/usr/lib/python3.6/site-packages/pikaur/build.py", line 322, in _set_built_package_path
config_path=os.path.join(dest_dir, 'PKGBUILD')
File "/usr/lib/python3.6/site-packages/pikaur/core.py", line 295, in get
value = cls.get_config(config_path=config_path).get(key)
File "/usr/lib/python3.6/site-packages/pikaur/core.py", line 284, in get_config
with open(config_path) as config_file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/cache/pacman/custom/PKGBUILD'

packages Replaces priority

I'm new with pikaur (before i have used pacaur), when I install a package I have a problem, it would change my packages, for example if I install lastpkgs :

~> pikaur -S lastpkgs
resolving dependencies...
Reading local package database...

:: AUR package will be installed:
 lastpkgs                                                  -> 0.9.4-1

:: Proceed with installation? [Y/n]
:: [v]iew package detail   [m]anually select packages
> y
looking for conflicting packages...
Reading repository package databases...
:: New package 'create_ap-git' replaces installed 'create_ap' Proceed? [Y/n] n
:: New package 'cupp-git' replaces installed 'cupp' Proceed? [Y/n] n
:: New package 'reaver-wps-fork-t6x-git' replaces installed 'reaver' Proceed? [Y/n] n
:: New package 'reaver-wps-fork-t6x' replaces installed 'reaver' Proceed? [Y/n] n
Do you want to edit PKGBUILD for lastpkgs package? [y/N] n

and here pikaur -Ss :

~> pikaur -Ss create_ap
Searching... [###]
archstrike/create_ap-git r250.f906559-1 (archstrike archstrike-wireless) 
    A shell script to create a NATed/Bridged Software Access Point(aka WiFi)    
community/create_ap 0.4.6-1 [installed] 
    A shell script to create a NATed/Bridged Software Access Point    
aur/create_ap-gui 1.3.1-1 [installed] (12, 1.49)
    Gui application for easy creating access points. Application allows save configuration for quickly create AP.    
aur/create_ap-git r227.fc28805-2 (3, 0.00)
    A shell script to create a NATed/Bridged Software Access Point    

it search for different packages that are not same, for example create_ap are not equal to create_ap-git

How to solve this?

Pikaur hangs on installing discord

I installed pikaur via pacaur pacaur -S pikaur-git. When I tried to install discord via pikaur -S discord it requested the dependencies libc++ and libc++abi from aur. After saying no to viewing any PKGBUILDs pikaur went up to 100% CPU usage and stayed that way for hours until I killed it. No console output while that was the case.

Packages to provide dependencies are automatically selected.

When a dependency is provided by multiple packages, the first provider is automatically selected.
Example:

pikaur -R rust rustup
pikaur -S firefox-kde-opensuse
[...]
:: There are 2 providers available for cargo:
:: Repository community           
   1) rust  2) rustup 
            
Enter a number (default=1):
warning: skipping target: rust                             
resolving dependencies...                          
looking for conflicting packages...        
                                   
Packages (1) rust-1:1.24.0-1
                   
Total Installed Size:  208.57 MiB
   
:: Proceed with installation? [Y/n]

firefox-kde-opensuse (make-)depends on cargo which is provided by rust and rustup. The user is never prompted, which package they want to install, the first one (rust) is always chosen. I have not yet tested this with non-make-deps or any other package than rust.

Expected behaviour:
Ask which package should be installed.

Versions:
Pikaur 0.7+28+g65d68b6
Pacman v5.0.2
ibalpm v10.0.2

makepkg fails with "fatal: repository '..../pikaur/pikaur' does not exist"

When following installation instructions the package build fails with the following message

$ git clone https://github.com/actionless/pikaur.git
Cloning into 'pikaur'...
remote: Counting objects: 505, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 505 (delta 36), reused 56 (delta 23), pack-reused 434
Receiving objects: 100% (505/505), 336.22 KiB | 684.00 KiB/s, done.
Resolving deltas: 100% (333/333), done.
$ cd pikaur
$ makepkg -fsri
==> Making package: pikaur-git 0.3-1 (Wed  7 Feb 22:44:52 GMT 2018)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating pikaur git repo...
Fetching origin
==> Validating source files with md5sums...
    pikaur ... Skipped
==> Extracting sources...
  -> Creating working copy of pikaur git repo...
fatal: repository '/tmp/pikaur/pikaur' does not exist
==> ERROR: Failure while creating working copy of pikaur git repo
    Aborting... 

A problem in search packages using multi-words

Pikaur has some problem in search packages using multi-words with -Ss, for example, compared with pacaur:

pacaur -Ss plasma menu               
extra/kmenuedit 5.12.1-1 (plasma) [installed]
    KDE menu editor
aur/plasma-addons-customdesktopmenu-git 0.0.1-3 (1, 0.00)
    Custom desktop menu for Plasma5
aur/kim-frameworks 0.9.5-4 (1, 0.00)
    Plasma 5 Image Menu to compress, resize, convert, rotate and webexport
aur/kdeplasma-applets-actos-soundmenu-git 4.b6d5fa2-1 (2, 0.00)
    Very simple Sound Menu plasmoid with volume and playback (MPRIS) controls for the current media player
pikaur -Ss plasma menu                                   
Reading local package database..................................................................................................................
extra/kmenuedit 5.12.1-1 (plasma) [installed]
    KDE menu editor

Add option to keep package sources after successful build

Some packages like wine require users to clone a big git repository for building, and cloning it every time you build wine can be very slow. I think it would be useful to add an option to keep all source files in user-specified directory (because .cache folder isn't really made for persistent storage)

Nuitka vs Setuptools?

currently PKGBUILD producing a single binary via nuitka

however pikaur has setup.py so can be installed as classical python package (but still package will create pikaur entrypoint to be called as executable)

Add flag to skip packagebuild review

Adding --noconfirm still prompts for reviewing the PKGBUILD.
A flag to ignore the PKGBUILD review step would help using pikaur in automated scripts.
Ex: pacaur have the --noedit flag.

Providers not taken into account in deps solver

I have cower-git installed, which provides cower.
When installing a package that requires cower, the dependency solver fails.

In addition to package names, you'll need to check providers here.

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Do you want to edit PKGBUILD for pacaur-git package? [Y/n]
error: target not found: cower
Can't build 'pacaur-git'.
Failed to build following packages:
pacaur-git

Converting from unix time to regular date

Currently when listing package information from aur packages dates are listed in a rather unreadable unix timestamp format. For example when running
pikaur -Si pikaur-git
...
firstsubmitted : 1517379650
lastmodified : 1519879070
...

More closely following the format that pacman uses for displaying package information might enhance readability in general

Show git commit hash in pikaur --version

It only makes sense for pikaur --version to only show the version number (0.5), if you're running the release version and not some commits after a release.

I think that pikaur --version should show Pikaur 0.5 (<short git hash>) when not using a release version.

[v0.5] crash in full AUR upgrade

Hi there,

when I try to do a full system update, pikaur crashes with the following error:

hazzl@eressea:~$ pikaur -Suy
:: Synchronisiere Paketdatenbanken...
 testing ist aktuell
 core ist aktuell
 extra ist aktuell
 community-testing ist aktuell
 community ist aktuell
 multilib-testing ist aktuell
 multilib ist aktuell
:: Starting full system upgrade...
Reading repository package databases............................................
:: Starting full AUR upgrade...
Reading local package database..................................................
Traceback (most recent call last):
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur.py", line 8, in <module>
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur/main.py", line 244, in main
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur/main.py", line 196, in cli_entry_point
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur/main.py", line 79, in cli_upgrade_packages
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur/meta_package.py", line 212, in exclude_ignored_packages
  File "/home/hazzl/tmp/pikaur-git/src/pikaur-git/pikaur/core.py", line 325, in get
AttributeError: 'list' object has no attribute 'split'

Can't use pikaur -Syu <pkgname> to upgrade package

See:

$ pikaur -Syu pikaur-git
[sudo] password for tyilo: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
Reading repository package databases............................................
:: Starting full AUR upgrade...
Reading local package database..................................................
:: warning: Following packages can not be found in AUR:
    python-commandlines    
    python-font-unicode    
resolving dependencies...

:: Proceed with installation? [Y/n] 
:: [v]iew package detail   [m]anually select packages
> 
looking for conflicting packages...

versus:

$ pikaur -S pikaur-git
resolving dependencies...
Reading repository package databases............................................
Reading local package database..................................................

:: AUR package will be installed:
 pikaur-git                       0.5+18+gde54e64-1 -> 0.5-1

:: Proceed with installation? [Y/n] 
:: [v]iew package detail   [m]anually select packages
> 
looking for conflicting packages...
Do you want to edit PKGBUILD for pikaur-git package? [y/N] 
==> Making package: pikaur-git 0.5-1 (Sun 18 Feb 15:55:52 CET 2018)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Cloning pikaur-git git repo...
Cloning into bare repository '/home/tyilo/.cache/pikaur/build/pikaur-git/pikaur-git'...
remote: Counting objects: 923, done.
remote: Compressing objects: 100% (151/151), done.
remote: Total 923 (delta 149), reused 126 (delta 64), pack-reused 707
Receiving objects: 100% (923/923), 412.47 KiB | 508.00 KiB/s, done.
Resolving deltas: 100% (640/640), done.
==> Validating source files with md5sums...
    pikaur-git ... Skipped
==> Extracting sources...
  -> Creating working copy of pikaur git repo...
Cloning into 'pikaur-git'...
done.
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Updated version: pikaur-git 0.5+18+gde54e64-1
==> Starting build()...
==> 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 issue...
==> Creating package "pikaur-git"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: pikaur-git 0.5+18+gde54e64-1 (Sun 18 Feb 15:56:29 CET 2018)
loading packages...
warning: pikaur-git-0.5+18+gde54e64-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) pikaur-git-0.5+18+gde54e64-1

Total Installed Size:  2.10 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                     [----------------------] 100%
(1/1) checking package integrity                   [----------------------] 100%
(1/1) loading package files                        [----------------------] 100%
(1/1) checking for file conflicts                  [----------------------] 100%
(1/1) checking available disk space                [----------------------] 100%
:: Processing package changes...
(1/1) reinstalling pikaur-git                      [----------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

Show the origin of the repository per package or group

With pacman, pacaur, yaourt show the origin of each package, for example in command to update like as:

pacaur -Syu

extra/kwin                     
core/libnghttp2          
core/linux
aur/skypeforlinux-preview-bin

For me is so important to know what is the repo of packages, mainly if is from aur or compiled repo.

In pikaur I see that the packages sorted by upgrade version level, I propose to order the packages by group of the repository and after by upgrade level, like:

pikaur -Syu

[core]
linux
libnghttp2

[extra]
kwin

[aur]
skypeforlinux-preview-bin

Thanks!

Repository's priority is ignored.

Repositories listed on pacman.conf have priorities (see: archwiki)

repositories listed first will take precedence over those listed later in the file when packages in two repositories have identical names, regardless of version number.

I have [testing], [community-testing], [multilib-testing] enabled (but only specific packages are explicitly installed from them). Yet, "pikaur -Syu" for example suggests the very dangerous list of updates (all of them from testing!):

linux 4.15.6-1 -> 4.15.7-1
linux-headers 4.15.6-1 -> 4.15.7-1
linux-zen 4.15.6-1 -> 4.15.7-1
linux-zen-headers 4.15.6-1 -> 4.15.7-1

Different helpers (pacaur, yay, trizen…) are correctly implementing repository priority.

Resolving indirect AUR dependencies (via `Provides` field)

Hey!

Trying to install ros-indigo-desktop-full (https://aur.archlinux.org/packages/ros-indigo-desktop-full) yields that python2-catkin-pkg cannot be found in AUR and hence ros-indigo-desktop-full cannot be installed.

Two things:

  • It would be nice if pikaur would show that the missing dep is a dep of ros-indigo-catkin
  • It actually is possible to know for pikaur that python2-catkin-pkg is being provided by python2-catkin_pkg since it's being listed explicitly in other packages of the dependency chain, hence it should be possible to solve the dependency chain for ros-indigo-desktop-full all in all

Make ProgressBar look more like pacman's

The first of these progessbars is pacman's the second one is pikaur's:

(1/1) upgrading pikaur-git                         [----------------------] 100%
Reading repository package databases............................................

It would be better if pikaur used the same progessbar style as pacman.

It would also be neat if pikaur supported the ILoveCandy easter egg.

Error: 'list' object has no attribute 'split'

Hi !

I updated pikaur to the last version, and every command except -Ss fails with the following traceback:

~/.configuration(master) » pikaur -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Starting full system upgrade...
Reading repository package databases..........................................
:: Starting full AUR upgrade...
Reading local package database................................................
Traceback (most recent call last):
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur.py", line 8, in
main()
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 244, in main
cli_entry_point()
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 196, in cli_entry_point
cli_upgrade_packages(args)
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/main.py", line 79, in cli_upgrade_packages
exclude_ignored_packages(not_found_aur_pkgs, args)
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/meta_package.py", line 212, in exclude_ignored_packages
for ignored_pkg in (args.ignore or []) + PacmanConfig.get('IgnorePkg', []):
File "/home/treize/.cache/pikaur/build/pikaur-git/src/pikaur-git/pikaur/core.py", line 325, in get
value = value.split()
AttributeError: 'list' object has no attribute 'split'`

Just a message of appreciation

I just wanted to leave a message of appreciation here.

Earlier this week, I wrecked my computer, and have since then been rebuilding my arch setup on a new PC. When it came time to download stuff from the AUR, I decided it was time to find something new. Yaourt, which I had used on the previous machine, was such a chore to use. I'd find myself having to keep coming back and babysitting it over a period of hours as it downloaded and installed font packages one by one.

As I was reviewing my alternatives, I dreamed of my ideal package manager, fixing all the issues of yaourt. First and foremost, it would put all the human interaction at the beginning, showing all the git diffs and letting PKGBUILDs be edited, then batch together all the installations at once. No interactive prompts if there's more than one matching package, just dump me back into the console. And it'd have none of that silly "curses getch"-like stuff where you don't need to press Enter at a yes/no prompt (because then I need to slow down to prevent my muscle memory from hitting Enter).

Of course, the comparison of AUR managers on the Wiki doesn't exactly cover the workflow of using these tools, so I was left to basically try them all out. If I couldn't find one that batched together the installs, I figured, I'd probably just "throw one together" in Python. It'd take me "two days, tops" (which is programmer speak for "at least a week, possibly two or more, plus some hair loss").

Then I came upon yours, which said basically exactly what I was looking for right in the description. Clearly, this has been written by one of my fellow brethren tormented by yaourt! I have tried it out and so far the experience has been basically everything I could have asked for.


I have seen that maintaining a package manager can be a pretty thankless job; consider e.g. pacaur whose maintainer has recently been driven away. I know that this project is actually very young, and so the worst may be yet to come; in any case, I wanted to post a message of thanks, and to wish you the best of luck in continuing with this endeavor.

no fakeroot check

Hi,
On a fresh arch install, the install command has failed because of fakeroot package missing.
I installed it and it's ok, pikaur works, but it would be nice if it's added in the build script ?
Thanks for your works !
William

Error when package is already built

By default, makepkg refuses to continue if a built package is found already. You'll need to
pass -f to override this behavior.

$ pikaur -S pacaur-git
resolving dependencies...
Reading repository package databases...
Reading local package database...

New packages will be installed from AUR:
    pacaur-git

:: Proceed with installation? [Y/n] y
Do you want to edit PKGBUILD for pacaur-git package? [Y/n]
==> Making package: pacaur-git 4.7.10-1 (Thu  8 Feb 12:50:51 CET 2018)
==> WARNING: Skipping dependency checks.
==> Retrieving sources...
  -> Updating pacaur git repo...
Fetching origin
==> Validating source files with md5sums...
    pacaur ... Skipped
==> Extracting sources...
  -> Creating working copy of pacaur git repo...
Cloning into 'pacaur'...
done.
==> Starting prepare()...
==> Starting pkgver()...
==> Updated version: pacaur-git 4.7.10.47.ga0f232d-1
==> ERROR: A package has already been built. (use -f to overwrite)
Can't build 'pacaur-git'.
Failed to build following packages:
pacaur-git

Update not possible, Dependency for "None" is missing

When I run pikaur -Syu, I get the following (rather unhelpful) output:

:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
:: Starting full system upgrade...
Reading repository package databases................................................................
:: Starting full AUR upgrade...
Reading local package database......................................................................
:: warning: Following packages can not be found in AUR:
    arduino-bin    
    jedi-outcast-linux-bin    
    python-nikola    
    winusb-git    
resolving dependencies...
Version mismatch:
None dependency: 'java-runtime=8' found: '9.0.4.u11-1'

PS: The project looks quite promising! Like it already!

Sorry, user $username is not allowed to execute '/bin/true' as root on $hostname

When running a pikaur command e.g. pikaur -S $some-program, it will ask for my sudo password, then complain that my user is not allowed to execute /bin/true (which is actually true, my user is only allowed to execute pacman via sudo). Then it will ask for my password again and proceed to install $some-program.

Is there a reason, why pikaur tries to execute /bin/true the first time around, but then works anyway the second time?

Crash when VISUAL env variable is set

Just tried to install a package with pikaur after reading reddit thread and found out that pikaur doesn't cope well with my fish environment settings:

set -gx EDITOR "emacsclient -a vim -c -n"
set -gx VISUAL "emacsclient -a vim -c -n"

The backtrace:

Traceback (most recent call last):            
  File "/usr/bin/pikaur", line 8, in <module>
    main()               
  File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 248, in main
    cli_entry_point()               
  File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 200, in cli_entry_point
    cli_install_packages(args)
  File "/usr/lib/python3.6/site-packages/pikaur/main.py", line 58, in cli_install_packages
    InstallPackagesCLI(args=args, packages=packages)
  File "/usr/lib/python3.6/site-packages/pikaur/install_cli.py", line 126, in __init__
    self.review_build_files()                                 
  File "/usr/lib/python3.6/site-packages/pikaur/install_cli.py", line 488, in review_build_files
    if self.ask_to_edit_file('PKGBUILD', repo_status):
  File "/usr/lib/python3.6/site-packages/pikaur/install_cli.py", line 452, in ask_to_edit_file
    filename                    
  File "/usr/lib/python3.6/site-packages/pikaur/core.py", line 16, in interactive_spawn
    process = subprocess.Popen(cmd, **kwargs)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'emacsclient -a vim -c -n': 'emacsclient -a vim -c -n'

Hopefully it's a minor issue. The helper looks cool so far. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.