-
5c75a55c
by Andrew Gregory at 2024-02-07T12:27:26+00:00
allow freeing partial db package cache
The free function was checking DB_STATUS_PKGCACHE, which is only set
once the package cache has been fully built.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-
edd57c8b
by Andrew Gregory at 2024-02-07T12:27:26+00:00
perform cleanup on sync db parsing errors
Cleanup was only being performed when libarchive failed to actually read
the file.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-
fde59b99
by Andrew Gregory at 2024-02-07T12:27:26+00:00
be_package: delay freeing archive resource
The error path uconditinally tries to free the archive, leading to a
double-free segmentation fault if the error path is triggered after
already freeing it.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-
0a394144
by Andrew Gregory at 2024-02-07T12:27:26+00:00
validate package metadata after loading
alpm has certain requirements for package metadata necessary for proper
functioning, name and version in particular. These requirements are
already enforced in makepkg, but nowhere in alpm.
Exceptions are treated as errors for non-local packages because they
cannot be installed without potentially resulting in undefined behavior.
Exceptions for local packages are treated as warnings because they are
already installed, so any damage has already been done, and the user
would otherwise have no way to uninstall them.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>