Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treats dev package as regular with '-Syuu'. #1232

Open
mhertz opened this issue Aug 10, 2024 · 2 comments
Open

Treats dev package as regular with '-Syuu'. #1232

mhertz opened this issue Aug 10, 2024 · 2 comments

Comments

@mhertz
Copy link

mhertz commented Aug 10, 2024

In one of my shell aliases for paru using double u's, I noticed keep getting dev package bluez-alsa-git reinstalled continually upon every run, and I see it even happens with --nodevel switch.

I narrowed it down to the double u's as said, and that the installed version is different irregardless of the cached pkgbuild has same pkgver as installed version(updated from previous pkgver() run) and I don't select cleanbuild.

So, with --nodevel switch(and said double u's), then is continually reinstalled as regular package. Without --nodevel(and double u's), then also reinstalled as regular package continually, until new commit, which then gets installed(correctly) as dev package(I tested with flipping char in devel.toml).

Latest paru/libalpm i.e. 2.0.3/14.0.0.

Many thanks in advance.

(Same issue for yay, reported here: Jguer/yay#2484)

Edit: I learned Paru uses .SRCINFO, which pkgver() doesn't update unfortunetly, hence above issues, partly, as still the issue left of double u's and --nodevel making it still down-grade devel packages, surely a bug atleast. For former(not using --nodevel), I'll add --needed, and just waste some slight extra time, plus get install/uninstall'ed make-deps more annoyingly). Thanks.

@Morganamilo
Copy link
Owner

It's a bit unfortunate the way it works. But it makes sense so I don't consider it a bug per say. Just something that coul dbe handled better.

I have to wonder why you use -uu with any regularity though. There's almost no reason to every use it.

@romanstingler
Copy link

@mhertz I hope I can explain it to you so that you understand how it works.
First, -Suu is for downgrading YOU MUST UNDERSTAND THIS POINT
image

Then PARU and YAY work differently.

YAY treats AUR packages the same way as official Repo packages.
Therefore, YAY suggests to downgrade AUR packages automatically.
image

In PARU it was decided that AUR will be put behind a separate AUR Mode, therefore --aur is needed to downgrade these packages.
There is nothing wrong with YAY nor PARU.
image

Now to your question after explaining how it works.
The reason why your packages are always re-installing is (see my last image)
that {packagename}-git packages have a version whatever the mantainer updated before upgrading the PKGBUILD.

But when you install it later, -git packages should always install the latest version/commit from the git repository.
Therefore, you will have a higher version number than the PKGBUILD has.

See
image
In the AUR the latest version is r1148.d4abd98-1 which means revision 1148 (number of commits) and d4abd98 the commit hash.

But I installed it some time later the version in AUR is still the old one but I installed it when r1604.a0fe3fc was the latest version.

NOW, you need the understanding that -Suu is a DOWNGRADE
and because your version will almost always be newer than the version in the AUR PKGBUILD it will always try to downgrade it.
image

But the logic in the PKGBUILD stays the same. Even if you want to downgrade it, it will install the latest version.

So, don't use -Suu unless something is dramatically broken and you have to revert the whole system, i.e. used testing/staging repo, and bad things happened.
Then you use the downgrade. There is no other reason to use it.

So please close this and the issue in YAY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants