Skip to content

[PATCH] fix: correct the list item types in transaction error data - #70

Open
guinux wants to merge 1 commit into
archlinux:masterfrom
guinux:master
Open

[PATCH] fix: correct the list item types in transaction error data#70
guinux wants to merge 1 commit into
archlinux:masterfrom
guinux:master

Conversation

@guinux

@guinux guinux commented Aug 5, 2026

Copy link
Copy Markdown

fix: correct the list item types in transaction error data

PrepareError::data and CommitError::data each describe one of their lists with the wrong item type. In both cases the matching Drop impl already frees the list with the right type.

CommitData::FileConflict

Declared as AlpmList<'a, &'a Conflict>, while alpm_trans_commit returns a list of alpm_fileconflict_t (and Drop frees it as AlpmListMut<OwnedFileConflict>).

PrepareData::PkgInvalidArch

Declared as AlpmList<'a, &'h Package>, while ALPM_ERR_PKG_INVALID_ARCH produces a list of char * package names (and Drop frees it as AlpmListMut<String>).

PrepareData's 'h parameter existed only for that variant, so with it corrected the enum drops to PrepareData<'a>.

FileConflict::conflicting_target

It reads the target field rather than ctarget, so it returns the package that owns the incoming file rather than the package that already owns the conflicting one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant