kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
464 stars 62 forks source link

Bug in circular dep detector #225

Closed git-bruh closed 3 years ago

git-bruh commented 3 years ago

KISS detects a circular dependency cycle in the following case. pkg1 needs pkg2 make, and pkg2 on being built gets a dep on pkg1 due to the ldd detector. This breaks the circular dep detector when pkg1 is updated, or you try to kiss l pkg1

git-bruh commented 3 years ago

My case is this: https://termbin.com/9b6e

dylanaraps commented 3 years ago

The C library is typically an implicit dependency. ie, it's not included in depends files and the dependency detector should also skip over it. This is a bug in the dependency detector. It should not be including the libc.

See: https://github.com/kisslinux/kiss/blob/master/kiss#L570-L581

dylanaraps commented 3 years ago

Now, why isn't this detection working with glibc? Is a file missing from that list?

git-bruh commented 3 years ago

i think its libresolv, it can be named /usr/lib/libresolv-2.33.so, (symlinks) /usr/lib/libresolv.so and /usr/lib/libresolv.so.2

dylanaraps commented 3 years ago

Pushed https://github.com/kisslinux/kiss/commit/60ad9cfafcc80867c9ce84e06648a09cebb7422e

Try it out (you will have to first amend the depends files in /var/db/kiss/installed).

dylanaraps commented 3 years ago

Musl is unaffected as it only provides a static library for libresolv.

git-bruh commented 3 years ago

Looks like theres a couple more libs that are only available as static on musl but glibc makes them available as bot h static and shared. libutil.so* seems to be the missing one, other ones like li brt.so* are already accounted for. There's a few more too but nothing seems to lin k to them directly, so it shouldn't be an issue. https://termbin.com/nozf 

git-bruh commented 3 years ago

Wait that wasn't it, running kiss with sh -x to confirm

git-bruh commented 3 years ago

libutil.so and libcrypt.so are the missing ones.

dylanaraps commented 3 years ago

Pushed the fix. Thanks. Will make a release shortly.

git-bruh commented 3 years ago

@dylanaraps sorry to bother you again, libmvec.so* seems to be the last missing one. Rebuilt everything in kiss revdep glibc and found it.

dylanaraps commented 3 years ago

Done. Let me know if there are still any issues. If not, will make a release.

git-bruh commented 3 years ago

That seems to be it, thanks for the fix.