[pacman-dev] [libalpm] Installing and removing a package in the same handle lifecycle

Fabien Bourigault bourigaultfabien at gmail.com
Fri Feb 6 20:13:58 UTC 2015


Hi,
I'm a PackageKit alpm backend contributor and I found a strange behavior
when removing a package in the same alpm_handle_t lifecycle. Here you have
the simplified workflow :

alpm initialization
new transaction
install inkscape
end transaction
new transaction
remove inkscape
end transaction

When removing the package, backend does an alpm_db_get_pkg (localdb, name)
to get the package and then call alpm_remove_pkg with this found package.
alpm_remove_pkg returns an error with 6 as errno. I looked in
alpm_remove_pkg code and there is 3 cases returning such error. The one
failing is pkg coming from localdb.

I have no knowledge of libalpm internals but from the outside it looks like
the package structure was copied ot the localdb in installation phase but
the db field was not updated.

I hope this is a bug that could be solved.

Regards,

Fabien


More information about the pacman-dev mailing list