mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Add default changelog functions to pkg_operations
So we don't segfault when calling this on be_sync loaded packages. They return logical values as much as possible for indicating there is no changelog available. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
39fd8bc318
commit
7f6d986ac9
@ -123,6 +123,10 @@ static alpm_list_t *_pkg_get_deltas(pmpkg_t *pkg) { return pkg->deltas; }
|
|||||||
static alpm_list_t *_pkg_get_files(pmpkg_t *pkg) { return pkg->files; }
|
static alpm_list_t *_pkg_get_files(pmpkg_t *pkg) { return pkg->files; }
|
||||||
static alpm_list_t *_pkg_get_backup(pmpkg_t *pkg) { return pkg->backup; }
|
static alpm_list_t *_pkg_get_backup(pmpkg_t *pkg) { return pkg->backup; }
|
||||||
|
|
||||||
|
static void *_pkg_changelog_open(pmpkg_t *pkg) { return NULL; }
|
||||||
|
static size_t _pkg_changelog_read(void *ptr, size_t size, const pmpkg_t *pkg, const void *fp) { return 0; }
|
||||||
|
static int _pkg_changelog_close(const pmpkg_t *pkg, void *fp) { return EOF; }
|
||||||
|
|
||||||
/** The standard package operations struct. Get fields directly from the
|
/** The standard package operations struct. Get fields directly from the
|
||||||
* struct itself with no abstraction layer or any type of lazy loading.
|
* struct itself with no abstraction layer or any type of lazy loading.
|
||||||
*/
|
*/
|
||||||
@ -141,6 +145,7 @@ struct pkg_operations default_pkg_ops = {
|
|||||||
.get_isize = _pkg_get_isize,
|
.get_isize = _pkg_get_isize,
|
||||||
.get_reason = _pkg_get_reason,
|
.get_reason = _pkg_get_reason,
|
||||||
.has_scriptlet = _pkg_has_scriptlet,
|
.has_scriptlet = _pkg_has_scriptlet,
|
||||||
|
|
||||||
.get_licenses = _pkg_get_licenses,
|
.get_licenses = _pkg_get_licenses,
|
||||||
.get_groups = _pkg_get_groups,
|
.get_groups = _pkg_get_groups,
|
||||||
.get_depends = _pkg_get_depends,
|
.get_depends = _pkg_get_depends,
|
||||||
@ -151,6 +156,10 @@ struct pkg_operations default_pkg_ops = {
|
|||||||
.get_deltas = _pkg_get_deltas,
|
.get_deltas = _pkg_get_deltas,
|
||||||
.get_files = _pkg_get_files,
|
.get_files = _pkg_get_files,
|
||||||
.get_backup = _pkg_get_backup,
|
.get_backup = _pkg_get_backup,
|
||||||
|
|
||||||
|
.changelog_open = _pkg_changelog_open,
|
||||||
|
.changelog_read = _pkg_changelog_read,
|
||||||
|
.changelog_close = _pkg_changelog_close,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Public functions for getting package information. These functions
|
/* Public functions for getting package information. These functions
|
||||||
|
Loading…
Reference in New Issue
Block a user