diff options
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/be_local.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index f53bd640..1a46dfdf 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -750,7 +750,7 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq int retval = 0; char *pkgpath = NULL; - if(db == NULL || info == NULL) { + if(db == NULL || info == NULL || !(db->status & DB_STATUS_LOCAL)) { return -1; } @@ -759,10 +759,6 @@ int _alpm_local_db_write(alpm_db_t *db, alpm_pkg_t *info, alpm_dbinfrq_t inforeq /* make sure we have a sane umask */ oldmask = umask(0022); - if(strcmp(db->treename, "local") != 0) { - return -1; - } - /* DESC */ if(inforeq & INFRQ_DESC) { _alpm_log(db->handle, ALPM_LOG_DEBUG, "writing %s-%s DESC information back to db\n", |