archlinux / alpm.rs

Rust bindings for libalpm
GNU General Public License v3.0
112 stars 21 forks source link

Should CommitData::FileConflict carry OwnedFileConflict instead of OwnedConflict? #46

Open UhhhWaitWhat opened 4 months ago

UhhhWaitWhat commented 4 months ago

Hi, so I finally got around to updating a project of mine to v3 of this library. I stumbled across the changes to trans_commits return type, namely that I used to be able to get detailed data about file conflicts. Based on my previous usage, it feels like CommitData::FileConflict should carry an OwnedFileConflict, but it does not.

So I was wondering if this is a mistake on the libraries part or if I'm doing something wrong :)

anrdnet commented 4 months ago

I just ran into the need to parse CommitData::FileConflict errors, and was also stumped by this. Since I had a reproducible file conflict I did some tests. I can iterate through the AlpmList, but accessing the packages of the OwnedConflict results in SIGSEGV. This seems consistent with the element being accessed as the wrong type.