Native Pacman Explanation
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.
-
pacman -Syuto refresh database and upgrade the system. - Check foreign packages in AUR database and resolve dependencies.
- 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.
-
pacman -Syto refresh database. - Ensure that
repopackageis available in sync database. -
pacman -Su repopackageto upgrade the system and install therepopackage. - Check foreign packages in AUR database and resolve dependencies.
- 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.
-
pacman -Syto refresh database. - Check
unknownpackagein AUR database.- This operation may fail if
unknownpackageis 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.
- This operation may fail if
-
pacman -Suto upgrade the system. - Check foreign packages in AUR database and resolve dependencies.
- 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.