falconindy / expac

alpm data extraction utility
91 stars 15 forks source link

Does not query sync db if repo is defined in Include file #28

Closed AladW closed 8 years ago

AladW commented 8 years ago

Repository configuration

% cat /etc/pacman.d/custom 
[options]
CacheDir = /var/cache/pacman/pkg/
CacheDir = /var/cache/pacman/custom/
CleanMethod = KeepCurrent

[custom]
SigLevel = Optional TrustAll
Server = file:///home/custompkgs

Relevant pacman.conf line:

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
Include = /etc/pacman.d/custom

strace shows expac only queries repositories defined direclty in /etc/pacman.conf:

open("/etc/pacman.conf", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2990, ...}) = 0
read(3, "#\n# /etc/pacman.conf\n#\n# See the"..., 4096) = 2990
read(3, "", 4096)                       = 0
close(3)                                = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/var/lib/pacman", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/var/lib/pacman", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/var/lib/pacman/local/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFDIR|0755, st_size=57344, ...}) = 0
open("/var/lib/pacman/local/ALPM_DB_VERSION", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
read(4, "9\n", 4096)                    = 2
close(4)                                = 0
close(3)                                = 0
access("/var/lib/pacman/sync/core.db", R_OK) = 0
access("/var/lib/pacman/sync/extra.db", R_OK) = 0
access("/var/lib/pacman/sync/community.db", R_OK) = 0
access("/var/lib/pacman/sync/multilib.db", R_OK) = 0
access("/var/lib/pacman/sync/xyne-x86_64.db", R_OK) = 0
open("/var/lib/pacman/sync/core.db", O_RDONLY|O_CLOEXEC) = 3

pacman.conf: https://ptpb.pw/Z3oc strace for expac -S '%n %v' powerline-fonts: https://ptpb.pw/mUce

falconindy commented 8 years ago

Does pacman handle this properly? I was under the impression that Include only meant something if it was in the [options] section.

AladW commented 8 years ago

Pacman does support it:

% pacman -Sddp custom/powerline-fonts        
file:///home/custompkgs/powerline-fonts-20151204-2-any.pkg.tar.xz

% pacman -Si powerline-fonts
Repository      : community
Name            : powerline-fonts
Version         : 2.4-1
Description     : patched fonts for powerline
Architecture    : x86_64
URL             : https://github.com/powerline/powerline
Licenses        : MIT
Groups          : None
Provides        : otf-powerline-symbols
Depends On      : powerline-common
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 4,09 KiB
Installed Size  : 6,00 KiB
Packager        : Jiachen Yang <farseerfc@gmail.com>
Build Date      : Di 19 Apr 2016 12:12:17 CEST
Validated By    : MD5 Sum  SHA-256 Sum  Signature

Repository      : custom
Name            : powerline-fonts
Version         : 20151204-2
Description     : Patched fonts for Powerline users
Architecture    : any
URL             : https://github.com/powerline/fonts
Licenses        : CPL
Groups          : None
Provides        : None
Depends On      : fontconfig  xorg-font-utils
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 4,44 MiB
Installed Size  : 16,17 MiB
Packager        : Alad Wenter <alad@archlinux.info>
Build Date      : Mo 02 Mai 2016 08:52:41 CEST
Validated By    : SHA-256 Sum
falconindy commented 8 years ago

OK, will fix.