Pacman

Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.
Tasklist

FS#71737 - pacman ignores content of /var/cache/pacman/pkg

Attached to Project: Pacman
Opened by Ruslan Garipov (ruslangaripov) - Thursday, 05 August 2021, 10:17 GMT
Last edited by morganamilo (morganamilo) - Sunday, 15 August 2021, 13:29 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 6.0.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

pacman 6.0.0-5 ignores content of /var/cache/pacman/pkg.

I had a system which was not updated since May, 2021. Yesterday I have upgraded the system without any error. Today I had to reinstall gitlab package and run:

pacman -S gitlab

gitlab-whatever-version-db-has.zst file exists in /var/cache/pacman/pkg, but "pacman -S gitlab" tries to download the file again. The same is applied to other packages.

If I run

pacman -U /var/cache/pacman/pkg/gitlab-whatever

this REinstall the package with the same version with error.

Because the system does not have Internet connection, I am failing to reinstall a package using "pacman -S <package>".

By the way, MSYS2 with the same pacman (6.0.0-5) has the same issue.

/etc/pacman.conf has default settings, and does not change the CacheDir.

Additional info:

pacman 6.0.0-5

default /etc/pacman.conf

Steps to reproduce:

Please see description section.
This task depends upon

Closed by  morganamilo (morganamilo)
Sunday, 15 August 2021, 13:29 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Sigs weren't in cache
Comment by Allan McRae (Allan) - Thursday, 05 August 2021, 11:23 GMT
Please post the output of the "pacman -S --debug gitlab" command.
Comment by Allan McRae (Allan) - Thursday, 05 August 2021, 11:24 GMT
Also the actual error from "pacman -U /var/cache/pacman/pkg/gitlab-whatever" would be useful.
Comment by Ruslan Garipov (ruslangaripov) - Thursday, 05 August 2021, 11:31 GMT
File with the output in the attachment.
Comment by Ruslan Garipov (ruslangaripov) - Thursday, 05 August 2021, 11:32 GMT
> Also the actual error from "pacman -U /var/cache/pacman/pkg/gitlab-whatever" would be useful
No, no. pacman -U succeeded. Because it does not download anything from the Internet, it succeeds. My problem is that pacman -S tries to download something from the Internet.
Comment by Allan McRae (Allan) - Thursday, 05 August 2021, 12:40 GMT
Do you have the file /var/cache/pacman/pkg/gitlab-14.1.0-1-x86_64.pkg.tar.zst.sig?
Comment by Ruslan Garipov (ruslangaripov) - Thursday, 05 August 2021, 15:25 GMT
No, I do not. Therefore, that's the problem? If it is -- do I have to have *.sig file for each package in /var/cache/pacman/pkg?

I use "pacman -Suup" on my offline machines, and then "fetch" hyperlink lists on PC having the Internet connection. Since the list generated by "pacman -Suup" contains URLs for packages only, and not their signatures, I've ended up with *.zst files only.
Comment by Ruslan Garipov (ruslangaripov) - Thursday, 05 August 2021, 15:51 GMT
Oh, I really have to, I believe: https://gitlab.archlinux.org/pacman/pacman/-/commit/f3dfba73d22b7eca3810a8114f2aab63da488b4c

Interesting, if this patch was committed by you, Allan, **one year ago**, why I did not have this problem with .SIG files on May, 2021, when I successfully updated my systems using "pacman -Suu" from local cache with package files only? pacman is not distributed from the master branch? But I see no release/6.0.0 branch in the repository...

In any way, may I assume that a package's signature file has the same URL as the package does, but with .sig appended to the end of URL?
Comment by Ruslan Garipov (ruslangaripov) - Monday, 09 August 2021, 17:05 GMT
I believe this ticket should be closed. The reason for my failure was the commit I've mentioned above -- today I SEDed output of "pacman -Suup" and downloaded both zst and sig files. An offline machine with those files in the cache was updated successfully.

Thanks, Allan! And sorry for bothering you. But without your hint I would never find the commit.
Comment by morganamilo (morganamilo) - Sunday, 15 August 2021, 13:28 GMT
Will close but maybe -p should also print sig files.

Loading...