diff options
author | Allan McRae <allan@archlinux.org> | 2015-02-12 04:33:20 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2015-02-12 04:33:20 +0100 |
commit | 27e3125c8d65b169ac2e76c7f029ee3a4a170745 (patch) | |
tree | 8841572774efd92ae73133ffc178038879858438 /lib | |
parent | 295a3491adc4af5c8634ac82777212ed9c664457 (diff) | |
parent | ba869597fb64f1101012df4b0d834ed5eced0b7c (diff) | |
download | pacman-27e3125c8d65b169ac2e76c7f029ee3a4a170745.tar.gz pacman-27e3125c8d65b169ac2e76c7f029ee3a4a170745.tar.xz |
Merge branch 'maint'
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libalpm/add.c | 8 | ||||
-rw-r--r-- | lib/libalpm/db.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 82461eef..ed29e680 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -227,8 +227,10 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, if(llstat(filename, &lsbuf) != 0) { /* cases 1,2: file doesn't exist, skip all backup checks */ } else if(S_ISDIR(lsbuf.st_mode) && S_ISDIR(entrymode)) { +#if 0 uid_t entryuid = archive_entry_uid(entry); gid_t entrygid = archive_entry_gid(entry); +#endif /* case 6: existing dir, ignore it */ if(lsbuf.st_mode != entrymode) { @@ -243,6 +245,11 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, entrymode & mask); } +#if 0 + /* Disable this warning until our user management in packages has improved. + Currently many packages have to create users in post_install and chown the + directories. These all resulted in "false-positive" warnings. */ + if((entryuid != lsbuf.st_uid) || (entrygid != lsbuf.st_gid)) { _alpm_log(handle, ALPM_LOG_WARNING, _("directory ownership differs on %s\n" "filesystem: %u:%u package: %u:%u\n"), filename, @@ -252,6 +259,7 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, "filesystem: %u:%u package: %u:%u\n", filename, lsbuf.st_uid, lsbuf.st_gid, entryuid, entrygid); } +#endif _alpm_log(handle, ALPM_LOG_DEBUG, "extract: skipping dir extraction of %s\n", filename); diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index cef6c119..fe208be0 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -579,6 +579,13 @@ int _alpm_db_add_pkgincache(alpm_db_t *db, alpm_pkg_t *pkg) _alpm_log(db->handle, ALPM_LOG_DEBUG, "adding entry '%s' in '%s' cache\n", newpkg->name, db->treename); + if(newpkg->origin == ALPM_PKG_FROM_FILE) { + free(newpkg->origin_data.file); + } + newpkg->origin = (db->status & DB_STATUS_LOCAL) + ? ALPM_PKG_FROM_LOCALDB + : ALPM_PKG_FROM_SYNCDB; + newpkg->origin_data.db = db; db->pkgcache = _alpm_pkghash_add_sorted(db->pkgcache, newpkg); free_groupcache(db); |