Opened 3 years ago
Closed 3 years ago
#17750 closed bug (fixed)
package_repo command no longer functions through symlinks
Reported by: | kallisti5 | Owned by: | nobody |
---|---|---|---|
Priority: | blocker | Milestone: | R1/beta4 |
Component: | Kits/Package Kit | Version: | R1/beta3 |
Keywords: | package_repo | Cc: | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
To reproduce:
[kallisti5@eris repo_test]$ ls -la total 64 drwxr-xr-x 1 kallisti5 users 34 May 20 08:02 . drwx------ 1 kallisti5 users 12960 May 20 08:01 .. lrwxrwxrwx 1 kallisti5 users 21 May 20 08:02 packages -> ../riscv-unbootstrap/ -rw-r--r-- 1 kallisti5 users 204 May 20 08:01 repo.info [kallisti5@eris repo_test]$ ls -la packages/bash-4.4.023-1-riscv64.hpkg -rw-r--r-- 1 kallisti5 users 4059654 Jan 19 2021 packages/bash-4.4.023-1-riscv64.hpkg [kallisti5@eris repo_test]$ sha256sum packages/bash-4.4.023-1-riscv64.hpkg 3c338e1784fd15245fd3eff231548729bdaf8fd1508b74cb0017df444887c8bd packages/bash-4.4.023-1-riscv64.hpkg [kallisti5@eris repo_test]$ package_repo create repo.info packages/bash-4.4.023-1-riscv64.hpkg package 'packages/bash-4.4.023-1-riscv64.hpkg' does not exist
Slightly adjusting the test to bypass the symlink:
[kallisti5@eris repo_test]$ package_repo create repo.info ../riscv-unbootstrap/bash-4.4.023-1-riscv64.hpkg bash (4.4.023-1) checksum: 3c338e1784fd15245fd3eff231548729bdaf8fd1508b74cb0017df444887c8bd ----- Package Repository Info ----- package count 1 ----------------------------------- header size: 72 repository header size: 556 package attributes size: 3798 total size: 993 -----------------------------------
Attachments (2)
Change History (9)
comment:1 by , 3 years ago
comment:2 by , 3 years ago
Not a lot has changed in the package_repo command: https://cgit.haiku-os.org/haiku/log/src/bin/package_repo
Likely something changed within the package kit itself: https://cgit.haiku-os.org/haiku/log/src/kits/package
by , 3 years ago
Attachment: | strace.txt added |
---|
comment:3 by , 3 years ago
Milestone: | Unscheduled → R1/beta4 |
---|
comment:4 by , 3 years ago
ok. With Jessica's help, we did a little debugging. https://review.haiku-os.org/c/haiku/+/5323 was the original fix, but it is ineffective. BEntry navigates symlinks just fine without transversal = true.
#include <Entry.h> #include <stdio.h> int main() { BEntry entry("package/foo"); if (entry.Exists()) printf("foo exists!"); else printf("foo no exists!"); return 0; }
In addition to this, package_repo functions as expected and navigates symlinks properly under Haiku. The symlink navigation issue only occurs when using package_repo under Linux.
This points to something broken in libbe_build or libroot_build
comment:5 by , 3 years ago
https://github.com/haiku/haiku/commit/906fe09778cc57aa6e42931507a53b2eb91ee298 is suspect. Lots of rework recentlyish
This was seen on our infrastructure, then I was able to reproduce on my desktop. I'm assuming we haven't run into it before since we were using an ancient version of package_repo.