termux / proot

An chroot-like implementation using ptrace.
https://wiki.termux.com/wiki/PRoot
Other
751 stars 161 forks source link

openSUSE error during distro upgrade filesystem-15.5-40.2 #163

Closed radumamy closed 3 years ago

radumamy commented 3 years ago

Installation of openSUSE gets corrupted during distro upgrade.

Can anything be done about this?

Thank you.

26/508) Installing: filesystem-15.5-40.2.aarch6[error] Installation of filesystem-15.5-40.2.aarch64 failed: Error: Subprocess failed. Error: RPM failed: Make a copy of/bin'. cp: cannot create hard link '/usr/bin.usrmerge/awk' to '/bin/awk': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/ip' to '/bin/ip': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/ypdomainname' to '/bin/ypdomainname': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/dnsdomainname' to '/bin/dnsdomainname': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/domainname' to '/bin/domainname': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/hostname' to '/bin/hostname': Operation not permitted cp: cannot create hard link '/usr/bin.usrmerge/.l2s.pgrep0001' to '/bin/.l2s.pgrep0001': Operation not permitted cp: cannot stat '/bin/.l2s.pgrep0001.0002': No such file or directory Something failed, cleaning up rm: cannot remove '/usr/bin.usrmerge/pkill': Operation not permitted rm: cannot remove '/usr/bin.usrmerge/pgrep': Operation not permitted error: lua script failed: [string "%pretrans(filesystem-15.5-40.2.aarch64)"]:37: exit error: filesystem-15.5-40.2.aarch64: install skipped error: filesystem-15.5-39.1.aarch64: erase skipped

Abort, retry, ignore? [a/r/i] (a): `

corbinlc commented 3 years ago

I have seen issues like this when using the link2symlink extension without using the hidden_files extension. The issue is that if the files used by the link2symlink extension are not hidden and something deletes all the files in a directory, they may delete the .l2s files before the files that point at them and lead to later errors. The hidden_files extension is enabled with -H . Can you check if this solves the issue?

michalbednarski commented 3 years ago

There's PROOT_L2S_DIR variable which allows specifying directory in which .l2s.* files are created, so they aren't in directory that is being deleted so no hidden_files is needed.

You're currently using it when running proot after distro install (so all new link2symlinks are being put in ~/opensuse-tumbledweed-fs/links, however that doesn't apply to initial rootfs extraction, set that variable also when you initially extract rootfs

radumamy commented 3 years ago

Thank you @michalbednarski. I've amended my installation script as suggested. I'll keep an eye on it next time when I upgrade my distro.