Skip to content

Native Pacman Explanation

kitsunyan edited this page Jun 17, 2018 · 5 revisions

On AUR helpers Arch wiki page pakku is marked as having Partial implementation of Native pacman. That's happened because pakku splits -Syu package operation to -Sy + something + -Su package, which is potentially harmful, since this behavior can cause partial upgrade.

The reason of this behavior is that package can't just be passed to pacman since package can be unavailable in repos but available in AUR. In this case package should be removed from a target list and a new target list should be passed to pacman (package will be built from AUR later).

Since -u, --sysupgrade is performed after -y, --refresh, I should query AUR for package after -y, --refresh as well, which means I should place AUR targets resolution before -u, --sysupgrade but after -y, --refresh, thus splitting -Syu repopackage aurpackage to -Sy + AUR query + -Su repopackage + aurpackage build.

A simple -Syu is not splitted. If additional targets provided, pakku will split -Syu to check targets availability in repos and in AUR. If package was found neither in repos nor in AUR, pakku will interrupt the operation, printing that target was not found. Pacman works the same way for unresolvable targets.

The following cases should demonstrate pakku's behavior.

Upgrade Case

Example: pakku -Syu.

  1. pacman -Syu to refresh database and upgrade the system.
  2. Check foreign packages in AUR database and resolve dependencies.
  3. Ask to view files and fetch PGP keys, build packages.

Upgrade and Install From Repo Case

Example: pakku -Syu repopackage, repopackage is available in official repos.

  1. pacman -Sy to refresh database.
  2. Ensure that repopackage is available in sync database.
  3. pacman -Su repopackage to upgrade the system and install the repopackage.
  4. Check foreign packages in AUR database and resolve dependencies.
  5. Ask to view files and fetch PGP keys, build packages.

Upgrade and Install From AUR Case

Example: pakku -Syu unknownpackage, unknownpackage is not available in official repos.

  1. pacman -Sy to refresh database.
  2. Check unknownpackage in AUR database.
    • This operation may fail if unknownpackage is not exist or AUR is not available. In this case pakku will write "package not found" error and fail, which is the same as pacman won't start an upgrade when some provided targets aren't available in repos.
  3. pacman -Su to upgrade the system.
  4. Check foreign packages in AUR database and resolve dependencies.
  5. Ask to view files and fetch PGP keys, build packages.

Upgrade and Build Case

Example: pakku -Syun repopackage, repopackage is available in official repos.

-n, --build conflicts with -u, --sysupgrade. Operation is impossible at all.