Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#34801 - [zsh] duplicate zsh binaries

Attached to Project: Arch Linux
Opened by Peter Wu (Lekensteyn) - Tuesday, 16 April 2013, 07:06 GMT
Last edited by Allan McRae (Allan) - Tuesday, 16 April 2013, 10:29 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

zsh provides the same binary file in /bin/zsh and /bin/zsh-5.0.2. That should have been a symlink I guess.

Package version: 5.0.2-1
This task depends upon

Closed by  Allan McRae (Allan)
Tuesday, 16 April 2013, 10:29 GMT
Reason for closing:  Not a bug
Comment by Peter Wu (Lekensteyn) - Tuesday, 16 April 2013, 08:29 GMT
It turns out that hard links are used now instead of symlinks. I observed the same "issue" with gcc-multilib. GNU tar does not differentiate between hard and soft links, bsdtar is more helpful on that.

Download packages if missing:
# pacman -Sw $(pacman -Qni | awk '/^Name /{print $3}')

Output symlink entries in tarballs:
$ time pacman -Qni | awk -vpfx=/var/cache/pacman/pkg/ '/^Name /{s=pfx $3}/^Version /{s=s"-"$3}/^Architecture /{print s"-"$3".pkg.tar.xz"}' | xargs -n1 bsdtar tvf | grep ' -> ' > links
bsdtar: Error opening archive: Failed to open '/var/cache/pacman/pkg/expat-2.1.0-1-x86_64.pkg.tar.xz'
bsdtar: Error opening archive: Failed to open '/var/cache/pacman/pkg/fakechroot-2.16-1-x86_64.pkg.tar.xz'
bsdtar: Error opening archive: Failed to open '/var/cache/pacman/pkg/libplist-1.8-2-x86_64.pkg.tar.xz'
bsdtar: Error opening archive: Failed to open '/var/cache/pacman/pkg/tar-1.26-2-x86_64.pkg.tar.xz'

real 3m10.220s
user 3m0.832s
sys 0m7.700s

I noticed that the above gave no results for:
$ time cut -c49- pkgs2 | sed 's,^,/,;s/ -> .*//' | while read i; do [ -h "$i" ] || echo "$i";done

It turns out that " link to " is used instead of " -> " for some links, zsh included.

$ cut -c49- links | sed 's,^,/,;s/ -> .*//' | wc -l
10543

Anyway, the above commands and output are left in case someone else finds it useful. To verify that the files are actually hard links, compare their inode number:
$ stat -c%i:%n /usr/bin/*gcc

Package version: pacman 4.1.0-2

Loading...