Small tweaks after backend merge
Just a few small things I noticed looking through the code. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
68b50c81c7
commit
ef32aa0219
|
@ -46,7 +46,6 @@
|
|||
#include "handle.h"
|
||||
#include "package.h"
|
||||
#include "group.h"
|
||||
#include "delta.h"
|
||||
#include "deps.h"
|
||||
#include "dload.h"
|
||||
|
||||
|
@ -194,13 +193,6 @@ alpm_list_t *_cache_get_replaces(pmpkg_t *pkg)
|
|||
return pkg->replaces;
|
||||
}
|
||||
|
||||
alpm_list_t *_cache_get_deltas(pmpkg_t *pkg)
|
||||
{
|
||||
ASSERT(pkg != NULL, return(NULL));
|
||||
/* local pkgs do not have deltas so nothing to load */
|
||||
return pkg->deltas;
|
||||
}
|
||||
|
||||
alpm_list_t *_cache_get_files(pmpkg_t *pkg)
|
||||
{
|
||||
ALPM_LOG_FUNC;
|
||||
|
@ -288,6 +280,9 @@ int _cache_changelog_close(const pmpkg_t *pkg, void *fp)
|
|||
return( fclose((FILE*)fp) );
|
||||
}
|
||||
|
||||
/* We're cheating, local packages can't have deltas anyway. */
|
||||
alpm_list_t *_pkg_get_deltas(pmpkg_t *pkg);
|
||||
|
||||
/** The local database operations struct. Get package fields through
|
||||
* lazy accessor methods that handle any backend loading and caching
|
||||
* logic.
|
||||
|
@ -314,7 +309,7 @@ static struct pkg_operations local_pkg_ops = {
|
|||
.get_conflicts = _cache_get_conflicts,
|
||||
.get_provides = _cache_get_provides,
|
||||
.get_replaces = _cache_get_replaces,
|
||||
.get_deltas = _cache_get_deltas,
|
||||
.get_deltas = _pkg_get_deltas,
|
||||
.get_files = _cache_get_files,
|
||||
.get_backup = _cache_get_backup,
|
||||
|
||||
|
|
|
@ -90,12 +90,6 @@ int SYMEXPORT alpm_db_update(int force, pmdb_t *db)
|
|||
/* Sanity checks */
|
||||
ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1));
|
||||
ASSERT(db != NULL && db != handle->db_local, RET_ERR(PM_ERR_WRONG_ARGS, -1));
|
||||
/* Verify we are in a transaction. This is done _mainly_ because we need a DB
|
||||
* lock - if we update without a db lock, we may kludge some other pacman
|
||||
* process that _has_ a lock.
|
||||
*/
|
||||
ASSERT(handle->trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1));
|
||||
ASSERT(handle->trans->state == STATE_INITIALIZED, RET_ERR(PM_ERR_TRANS_NOT_INITIALIZED, -1));
|
||||
|
||||
if(!alpm_list_find_ptr(handle->dbs_sync, db)) {
|
||||
RET_ERR(PM_ERR_DB_NOT_FOUND, -1);
|
||||
|
|
|
@ -32,10 +32,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* libarchive */
|
||||
#include <archive.h>
|
||||
#include <archive_entry.h>
|
||||
|
||||
/* libalpm */
|
||||
#include "package.h"
|
||||
#include "alpm_list.h"
|
||||
|
|
Loading…
Reference in New Issue