mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
New public alpm_pkg_get_db function
This function returns with the origin database of a package. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
adc4078b87
commit
8146f6f1c6
@ -218,6 +218,7 @@ alpm_list_t *alpm_pkg_get_deltas(pmpkg_t *pkg);
|
||||
alpm_list_t *alpm_pkg_get_replaces(pmpkg_t *pkg);
|
||||
alpm_list_t *alpm_pkg_get_files(pmpkg_t *pkg);
|
||||
alpm_list_t *alpm_pkg_get_backup(pmpkg_t *pkg);
|
||||
pmdb_t *alpm_pkg_get_db(pmpkg_t *pkg);
|
||||
void *alpm_pkg_changelog_open(pmpkg_t *pkg);
|
||||
size_t alpm_pkg_changelog_read(void *ptr, size_t size,
|
||||
const pmpkg_t *pkg, const void *fp);
|
||||
|
@ -423,6 +423,15 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_backup(pmpkg_t *pkg)
|
||||
return pkg->backup;
|
||||
}
|
||||
|
||||
pmdb_t SYMEXPORT *alpm_pkg_get_db(pmpkg_t *pkg)
|
||||
{
|
||||
/* Sanity checks */
|
||||
ASSERT(pkg != NULL, return(NULL));
|
||||
ASSERT(pkg->origin == PKG_FROM_CACHE, return(NULL));
|
||||
|
||||
return(pkg->origin_data.db);
|
||||
}
|
||||
|
||||
/**
|
||||
* Open a package changelog for reading. Similar to fopen in functionality,
|
||||
* except that the returned 'file stream' could really be from an archive
|
||||
|
Loading…
Reference in New Issue
Block a user