summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-02-12 04:33:20 +0100
committerAllan McRae <allan@archlinux.org>2015-02-12 04:33:20 +0100
commit27e3125c8d65b169ac2e76c7f029ee3a4a170745 (patch)
tree8841572774efd92ae73133ffc178038879858438
parent295a3491adc4af5c8634ac82777212ed9c664457 (diff)
parentba869597fb64f1101012df4b0d834ed5eced0b7c (diff)
downloadpacman-27e3125c8d65b169ac2e76c7f029ee3a4a170745.tar.gz
pacman-27e3125c8d65b169ac2e76c7f029ee3a4a170745.tar.xz
Merge branch 'maint'
-rw-r--r--Makefile.am4
-rw-r--r--lib/libalpm/add.c8
-rw-r--r--lib/libalpm/db.c7
-rw-r--r--test/pacman/tests/.gitignore1
-rw-r--r--test/pacman/tests/Makefile.am20
-rw-r--r--test/pacman/tests/sync200.py (renamed from test/pacman/tests/sync200.py.in)3
-rw-r--r--valgrind.supp2
7 files changed, 20 insertions, 25 deletions
diff --git a/Makefile.am b/Makefile.am
index 34489df8..3f10d156 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,8 +23,8 @@ dist_pkgdata_DATA = \
proto/PKGBUILD-vcs.proto \
proto/proto.install
-$(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py*)
- @printf "TESTS += %s\n" $^ | sed -e "s/\.py\.in/.py/" | LC_ALL=C sort -u > "$@"
+$(top_srcdir)/test/pacman/tests/TESTS: $(wildcard test/pacman/tests/*.py)
+ @printf "TESTS += %s\n" $^ | LC_ALL=C sort -u > "$@"
TESTS = test/scripts/parseopts_test.sh \
test/scripts/human_to_size_test.sh \
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);
diff --git a/test/pacman/tests/.gitignore b/test/pacman/tests/.gitignore
deleted file mode 100644
index 665d9ce6..00000000
--- a/test/pacman/tests/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-sync200.py
diff --git a/test/pacman/tests/Makefile.am b/test/pacman/tests/Makefile.am
index dba84e3d..b541b3d6 100644
--- a/test/pacman/tests/Makefile.am
+++ b/test/pacman/tests/Makefile.am
@@ -1,25 +1,7 @@
-CONFTESTS = $(patsubst %py.in,%py,$(wildcard *.py.in))
-
-check_SCRIPTS = \
- $(wildcard *.py) \
- $(CONFTESTS)
+check_SCRIPTS = $(wildcard *.py)
noinst_SCRIPTS = $(check_SCRIPTS)
EXTRA_DIST = $(check_SCRIPTS)
-CLEANFILES = $(CONFTESTS)
-
-#### Taken from the autoconf scripts Makefile.am ####
-edit = sed \
- -e 's|@LIBCURL[@]|$(LIBCURL)|g' \
- -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
-
-
-$(CONFTESTS): Makefile
- $(AM_V_at)$(RM) $@ $@.tmp
- $(AM_V_GEN)test -f $(srcdir)/$@.in && $(edit) $(srcdir)/$@.in >$@.tmp || true
- $(AM_V_at)chmod a-w $@.tmp
- $(AM_V_at)mv $@.tmp $@
-
# vim:set noet:
diff --git a/test/pacman/tests/sync200.py.in b/test/pacman/tests/sync200.py
index 6e47112d..2bcdd5d3 100644
--- a/test/pacman/tests/sync200.py.in
+++ b/test/pacman/tests/sync200.py
@@ -1,7 +1,6 @@
self.description = "Synchronize the local database"
-if len("@LIBCURL@") == 0:
- self.option['XferCommand'] = ['/usr/bin/curl %u > %o']
+self.option['XferCommand'] = ['/usr/bin/curl %u > %o']
sp1 = pmpkg("spkg1", "1.0-1")
sp1.depends = ["spkg2"]
diff --git a/valgrind.supp b/valgrind.supp
index 7da71635..0691e808 100644
--- a/valgrind.supp
+++ b/valgrind.supp
@@ -164,6 +164,6 @@
obj:/usr/lib/libfakeroot/fakechroot/libfakechroot.so
fun:call_init.part.0
fun:_dl_init
- obj:/usr/lib/ld-2.20.so
+ obj:/usr/lib/ld-*.so
...
}