Unable to update AUR packages since 2019-07-03 update

Something seems to have gone amiss in pamac-manager since the 2019-07-03 update, where AUR packages are concerned.
Selecting a package to build an update for, it goes through downloading and building the package, but when it gets to the point of trying to install it, it fails with a message that it can't lock the database.
I've checked that /var/lib/pacman/db.lck doesn't exist before starting the process, but it has been created by the time the error message appears. So my guess is that it's creating the lockfile during the process but then checking for it again before installing the bundle that's been built.

Interestingly (and usefully) it is sometimes possible to upgrade a package by first deleting it then installing it from scratch. Though this could be problematic if other packages depend on it, as they would get removed and need to be reinstalled afterwards.
However, this doesn't seem to work for every package. I've just attempted it with android-studio and this also fails - perhaps because of the amount of time it takes to download/build/compress? I'm guessing this is also something to do with when the lockfile gets created.

Extract from pamac-manager output for failing android-studio install:

-> Found android-studio.desktop
==> Validating source files with sha256sums...
    android-studio-ide-183.5692245-linux.tar.gz ... Passed
    android-studio.desktop ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting android-studio-ide-183.5692245-linux.tar.gz with bsdtar
==> Entering fakeroot environment...
==> Starting package()...
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Removing static library files...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "android-studio"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: android-studio 3.4.2.0-1 (Sat 20 Jul 2019 15:01:51 BST)
==> Cleaning up...

Failed to init transaction:
unable to lock database
1 Like

That's not an aur, or even an aur helper issue, it's an alpm (pacman) issue.
You'll ned to remove the database lock file:

 sudo rm /var/lib/pacman/db.lck 

for me seems to be a problem of pamac.. as the OP only use pamac according what he said in his post

OK, pamac is a gui front-end to alpm (arch linux package management).
With that said, this might actually be a bug in pamac.
I would try using trizen or some other AUR pacman wrapper, if not the correct way of using the AUR:
https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages

1 Like

On Manjaro we recommend to use ONLY pamac and NO AUR helper at all. pamac is able to build packages via pamac build <packagename> from CLI and from within our UI.

@beermad please use pamac upgrade -a next time you want to update your system from a terminal and post us the outcome. We have to see if the UI version of pamac might have an issue. Currently I don't use AUR.

Thanks.
I did try the command line at one point and that failed as well, but I didn't record the output. I'll try again next time a new AUR package version pops up in my updates and report back with details. As Perl mojolicious seems to update quite frequently, this shouldn't be too long from now.

@guinux is on vacation. However, he told me to remove the build dir so pamac will recreate one with proper rights.

I am also having this issue since the pamac 8.0 update weeks ago. I also removed /var/tmp/pamac-build-xxx but it did not work. My current workaround is using pamac build package instead of pamac update -a.
Example:

Building skypeforlinux-stable-bin...
==> Making package: skypeforlinux-stable-bin 8.50.0.38-1 (Mon 22 Jul 2019 11:52:02 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Downloading skypeforlinux_8.50.0.38_amd64.deb...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 69.7M  100 69.7M    0     0  13.5M      0  0:00:05  0:00:05 --:--:-- 13.7M
==> Validating source files with sha256sums...
    skypeforlinux_8.50.0.38_amd64.deb ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting skypeforlinux_8.50.0.38_amd64.deb with bsdtar
==> 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 issues...
==> Creating package "skypeforlinux-stable-bin"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: skypeforlinux-stable-bin 8.50.0.38-1 (Mon 22 Jul 2019 11:55:59 AM EDT)
==> Cleaning up...

Error: Failed to init transaction: unable to lock database

@philm: I've tried using pamac upgrade -a and this is all I see:

==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required
Authenticating as: tony
Password:
==== AUTHENTICATION COMPLETE ====
Synchronizing package databases...
Starting full system upgrade...
Cloning rsyslog build files...
Checking rsyslog dependencies...

Everything hangs at checking dependencies. During past attempts using the GUI I've also had an attempt hang with this message. When the GUI has hung here, it's been impossible to exit cleanly (I've needed to use xkill). The same is the case when running this command - I can't out of it.

I've tried daweiy's workaround of pamac build package, but this also fails in a rather bizarre way:

$ pamac build rsyslog
Preparing...
Cloning rsyslog build files...
Checking rsyslog dependencies...
To build (1):
  rsyslog  8.1907.0-1    AUR

Edit build files ? [y/N]

Apply transaction ? [y/N] y
==== AUTHENTICATING FOR org.manjaro.pamac.commit ====
Authentication is required
Authenticating as: tony
Password:
Cancelled
==== AUTHENTICATION FAILED ====

And yes, I've double-checked I'm putting the password in correctly - tried it multiple times.

It all seems very strange...

Please update your system first and then attemp to update AUR packages. We had some issue within pamac which should be fixed now.

1 Like

Thanks. I'll give it a try when the next updated AUR package pops up and report back.

Thanks philm. I've just had an update of perl-mojolicious and it installed perfectly.
Many thanks to all for their efforts.