From c3161925c29ef3dcfbb66648a91ecc50c7a0492d Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Mon, 9 Feb 2015 01:58:02 -0500 Subject: sync200.py.in: remove unused substitution LIBCURL was never set in the Makefile so XferCommand was always being set in the test file. This removes the only substitution in our test files which will prevent the TESTS file from being rebuilt every time configure is run. Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- Makefile.am | 4 ++-- test/pacman/tests/.gitignore | 1 - test/pacman/tests/Makefile.am | 20 +------------------- test/pacman/tests/sync200.py | 17 +++++++++++++++++ test/pacman/tests/sync200.py.in | 18 ------------------ 5 files changed, 20 insertions(+), 40 deletions(-) delete mode 100644 test/pacman/tests/.gitignore create mode 100644 test/pacman/tests/sync200.py delete mode 100644 test/pacman/tests/sync200.py.in diff --git a/Makefile.am b/Makefile.am index e9b3dfa1..4f807f9a 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/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 b/test/pacman/tests/sync200.py new file mode 100644 index 00000000..2bcdd5d3 --- /dev/null +++ b/test/pacman/tests/sync200.py @@ -0,0 +1,17 @@ +self.description = "Synchronize the local database" + +self.option['XferCommand'] = ['/usr/bin/curl %u > %o'] + +sp1 = pmpkg("spkg1", "1.0-1") +sp1.depends = ["spkg2"] +sp2 = pmpkg("spkg2", "2.0-1") +sp2.depends = ["spkg3"] +sp3 = pmpkg("spkg3", "3.0-1") +sp3.depends = ["spkg1"] + +for sp in sp1, sp2, sp3: + self.addpkg2db("sync", sp) + +self.args = "-Sy" + +self.addrule("PACMAN_RETCODE=0") diff --git a/test/pacman/tests/sync200.py.in b/test/pacman/tests/sync200.py.in deleted file mode 100644 index 6e47112d..00000000 --- a/test/pacman/tests/sync200.py.in +++ /dev/null @@ -1,18 +0,0 @@ -self.description = "Synchronize the local database" - -if len("@LIBCURL@") == 0: - self.option['XferCommand'] = ['/usr/bin/curl %u > %o'] - -sp1 = pmpkg("spkg1", "1.0-1") -sp1.depends = ["spkg2"] -sp2 = pmpkg("spkg2", "2.0-1") -sp2.depends = ["spkg3"] -sp3 = pmpkg("spkg3", "3.0-1") -sp3.depends = ["spkg1"] - -for sp in sp1, sp2, sp3: - self.addpkg2db("sync", sp) - -self.args = "-Sy" - -self.addrule("PACMAN_RETCODE=0") -- cgit v1.2.3-24-g4f1b From 43413894d4284c1afdaac48f7f250885e0ff6acf Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Thu, 12 Feb 2015 12:42:40 +1000 Subject: valgrind.supp: remove library version from suppression glibc installs the library /usr/lib/ld-?.??.so with its version. Wildcard this so the suppresses the warning for all glibc versions. Signed-off-by: Allan McRae --- valgrind.supp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ... } -- cgit v1.2.3-24-g4f1b From 0c9f4329f8dd2a6eb6d7717998e71c3a17fd2583 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Sun, 8 Feb 2015 02:27:42 -0500 Subject: set package origin when adding to db cache Signed-off-by: Andrew Gregory Signed-off-by: Allan McRae --- lib/libalpm/db.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c index 466c96f1..26e351fd 100644 --- a/lib/libalpm/db.c +++ b/lib/libalpm/db.c @@ -574,6 +574,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); -- cgit v1.2.3-24-g4f1b From ba869597fb64f1101012df4b0d834ed5eced0b7c Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Wed, 4 Feb 2015 14:48:31 +1000 Subject: Disable directory ownership warnings There was a lot of confusion regarding these warnings, particularly for packages that create users post_install and then chown the directories. Signed-off-by: Allan McRae --- lib/libalpm/add.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c index 725f2b5c..5e2d0a15 100644 --- a/lib/libalpm/add.c +++ b/lib/libalpm/add.c @@ -220,8 +220,10 @@ static int extract_single_file(alpm_handle_t *handle, struct archive *archive, } else { if(S_ISDIR(lsbuf.st_mode)) { if(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) { @@ -236,6 +238,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, @@ -245,6 +252,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); -- cgit v1.2.3-24-g4f1b