Morganamilo / paru

Feature packed AUR helper
GNU General Public License v3.0
5.85k stars 224 forks source link

paru ignores `pkgver()` #807

Closed MartinX3 closed 2 years ago

MartinX3 commented 2 years ago

Affected Version

paru v1.11.1 - libalpm v13.0.1

Description

paru --gendb doesn't fix it.

The pkgver() now returns 1.5.17, which should update my installed 1.5.16. In pamac it works, but paru ignores it and uses the static aur package version.

https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=moneymanagerex-git

pkgver() {
  curl --silent ${_github_api_uri} | jq -r '.tag_name[1:]'
}

image

Output

Include the FULL output of any relevant commands/configs

Don't cut parts of the input always include the FULL thing

paru.conf and pacman.conf are usually always relevant

paru.conf

#
# $PARU_CONF
# /etc/paru.conf
# ~/.config/paru/paru.conf
#
# See the paru.conf(5) manpage for options

#
# GENERAL OPTIONS
#
[options]
PgpFetch
Devel
Provides
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
#AurOnly
#BottomUp
#RemoveMake
#SudoLoop
#UseAsk
#SaveChanges
#CombinedUpgrade
CleanAfter
#UpgradeMenu
NewsOnUpgrade

#LocalRepo
#Chroot
SkipReview
#Sign
#SignDb
#KeepRepoCache

#
# Binary OPTIONS
#
#[bin]
#FileManager = vifm
#MFlags = --skippgpcheck
#Sudo = doas

pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

IgnorePkg   = cpio fprintd
#IgnorePkg   =
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
ILoveCandy
#NoProgressBar
CheckSpace
#VerbosePkgLists
ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

[endeavouros]
SigLevel = PackageRequired
Include = /etc/pacman.d/endeavouros-mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs
Morganamilo commented 2 years ago

Pkgver is a client side thing so aur helpers cant track them. Paru does track git packages but to do that paru has to be the one to install the package.

--gendb is also a way to initialize this but it simply starts tracking so it still has to wait for a change before it will prompt an update.

So I guess paru just wasn't tracking the package to update it.

MartinX3 commented 2 years ago

As I wrote --gendb doesn't help :(

Morganamilo commented 2 years ago

As I wrote gendb just initializes tracking and a change has to happen for paru to prompt an update.

MartinX3 commented 2 years ago

pamanc also sees updates for aur packages I installed with paru.

Paru knows that 1.5.16 is currently installed, it should use the pkgver() to see the difference. At least after using --gendb.

Also it would be nice to have an option to do --gendb every day or while using paru to ensure aur packages are always tracked.

Morganamilo commented 2 years ago

Like I said gendb can only track changes. Meaning when you gendb the current state is assumed to be current and then any changes trigger an update.

Gendb is for tracking packages not installed with paru, so it's only designed for migrating from another helper.

It's not possible to use the pkgver without downloading and building the package. You'd have to do this for every package to check for updates for each. This as awfully slow, so paru checks -git packages by checking the remote.

Pamac does is the slow way. Paru has an example equivalent command in the man page.

MartinX3 commented 2 years ago

Is there an option to use this slow way? Or do you mean with man page, that I always need to use a --flag which I'm currently searching in the man page?

It only needs to download the pkgbuild, maybe it needs to do a git clone --no-checkout or a shallow clone, execute the pkgver() and compare it with the installed package version in the system.

Morganamilo commented 2 years ago

There's a slow way example in the man page pacman -Qmq | grep -Ee '-(cvs|svn|git|hg|bzr|darcs)$' | paru -Ta - | paru -S --needed -

No it doesn't need to actually build but it does need to download sources and makepkg will never shallow clone.

MartinX3 commented 2 years ago

Thank you, I found it as well while using google. man paru is a bit much text to search.

It's not slow on my computer and way faster than the pamac search. pacman -Qmq | grep -Ee '-(cvs|svn|git|hg|bzr|darcs)$' | paru -Ta - | paru -S --needed - only takes 1-2 seconds here.

MartinX3 commented 2 years ago

Since installed via paru it always tells me that there is a new version of moneymanagerex-git. It seems that it ignores the pkgver() to check the version and instead looks for a new commit hash on the package repo, which is a wrong behavior.

pamac works correctly.

Morganamilo commented 2 years ago

You need to post output. Stuff like this is usually always a package issue.

MartinX3 commented 2 years ago
$ paru
keine Neuigkeiten
Legen Sie Ihren Finger auf den Fingerabdruckleser
:: Paketdatenbanken werden synchronisiert …
 core ist aktuell
 extra ist aktuell
 community ist aktuell
 multilib ist aktuell
 endeavouros ist aktuell
:: Vollständige Systemaktualisierung wird gestartet …
Warnung: cpio: Ignoriere Paket-Aktualisierung (2.12-4 => 2.13-2)
Warnung: fprintd: Ignoriere Paket-Aktualisierung (1.90.1-1 => 1.94.2-1)
 Es gibt nichts zu tun
:: Looking for AUR upgrades...
:: Looking for devel upgrades...
:: Löse Abhängigkeiten auf…
:: Berechne Konflikte…
:: Berechne interne Konflikte…
:: als veraltet markiert: libfprint-vfs009x-git  teamviewer  virtualbox-ext-oracle
:: verwaist: libfprint-vfs009x-git

Aur (1) moneymanagerex-git-1.5.16-1

:: Mit der Installation fortfahren? [J/n]: 
Morganamilo commented 2 years ago

I just realised you're the maintainer. I've left comments on the aur already about your package.

The issue is paru tracks git commits and your package lists an untagged git source. This means paru is tracking it assuming any commit will result in the need of a package rebuild.

While it's technically a false positive in paru. This package does not follow the aur rules and paru only targets packages following the rules.

MartinX3 commented 2 years ago

Please read the aur documentation.

Paru doesn't follow the AUR standard by ignoring the pkgver(). pamac follows the AUR standard. https://aur.archlinux.org/packages/pamac-aur

https://wiki.archlinux.org/title/VCS_package_guidelines#The_pkgver()_function

"The pkgver autobump is now achieved via a dedicated pkgver() function. This allows for better control over the pkgver, and maintainers should favor a pkgver that makes sense." I'm the maintainer.

"It is recommended to have following version format". It's a recommendation.

Morganamilo commented 2 years ago

Look. What I've told you the rules. You need to take one of the two actions I've listed on the aur.

MartinX3 commented 2 years ago

So the paru bug is that it ignores the pkgver() while checking for new versions and instead do its own thing.

That's a violation of the AUR rules.

Morganamilo commented 2 years ago

You have to run the pkgver locally to decide if it needs to update anyway. So paru isn't even wrong to list it as a possible update. Just paru aims to be smarter and not do this every time.

Besides that, paru is not offical software and is not supported by the aur.

Now the aur rules are the rules so please follow them or the package will be deleted.

MartinX3 commented 2 years ago

Ah, so paru aims to be smarter but makes it worse.

I follow the rules which you can't read or can't understand. My package won't be deleted as it doesn't violate the rules. It exists happily since 2017.

Morganamilo commented 2 years ago

The package has been deleted. If you wish to resubmit please do it under the non git name.

MartinX3 commented 2 years ago

No, I will simply reupload it. You're misusing administrative rights for your own fun. No one can report and accept the report as the same person.

You're acting like a weeb asshole.

Morganamilo commented 2 years ago

How about you follow the rules? Literally the first bullet point in the guidelines you linked me.

MartinX3 commented 2 years ago

You don't understand the rules I linked you and abuse your powers. I hope your autistic behavior lets you at least have a single real friend in real life.

Morganamilo commented 2 years ago

It's really not hard to implement one of the two changes I told you on the aur.

As it stands the existing pgkbuild is not a -git package as it builds releases not from head. Therefore the package should be named without the -git package.

Alternatively you can make it actually build from head.

Now fetching the pkgver dynamically in a non -git package I would call bad practise but I don't know if it's explicitly disallowed. The other point absolutely is though.

Please don't throw insults and fix your package.

MartinX3 commented 2 years ago

Yep, you're acting autistic and can't read and understand the guidelines.

I hope you will get better and find some real life friends.

At least pamac works less error prone and far more reliable than paru with its hacks. Only this yay aur helper is worse.

Morganamilo commented 2 years ago

Paru side of things I don't even consider this a bug. You said it has to check if the pkgver generates a new version right?

Well like I said that check has to happen client side. So when paru sees a new commit it pulls the package in as a potential upgrade as that new commit could be a new release. There's no way to know until you try.

Morganamilo commented 2 years ago

But anyway please go use pamac and don't be nearly as toxic to them.

MartinX3 commented 2 years ago

They don't lack social intelligence or the ability to read guidelines and don't misuse their powers in the aur repo. So please cry silent snowflake.

FoxieDev commented 2 years ago

It's not misuse of powers to delete a package that is in violation of the rules. Referring to someone as a snowflake whilst also getting rather upset at complying with some very basic rules is at best ironic, and at worse a complete lack of self-awareness. Please feel free to use another AUR helper, but do not sling insults and accusations against others as you leave. As you mentioned social intelligence, I'd have assumed you'd know that a simple "bye" will suffice, and that thoughtless hate is not the correct reaction in this situation.

killertofus commented 2 years ago

should be locked