Commit a76cce7c authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

pkg: Document and test 4th return of pkg_examine

parent ffbc3ad5
• Tests for pkg_merge_files
• Tests for pkg_cleanup_files
• Tests and docs for the fourth result of pkg_examine
• Tests for the transaction.perform
• ticket for config file manipulation
• ticket for integrating the transaction.perform into the main app
......@@ -318,12 +318,13 @@ end
--[[
Look into the dir with unpacked package (the one containing control and data subdirs).
Return three tables:
Return four tables:
• Set of files, symlinks, pipes, etc.
(in short, the things that are owned exclusively by the package)
• Set of directories
(which may be shared between packages)
• Map of config files with their md5 sums.
• The parset control file of the package.
In all three cases, the file names are keys, not values.
......
......@@ -285,7 +285,7 @@ function test_pkg_unpack()
./data/usr/share/updater/keys/standby.pem
]]), lines2set(stdout))
end, function () chdir(path) end, nil, -1, -1, "/usr/bin/find"))
local files, dirs, conffiles = B.pkg_examine(path)
local files, dirs, conffiles, control = B.pkg_examine(path)
assert_table_equal(lines2set([[/etc/init.d/updater
/etc/config/updater
/etc/ssl/updater.pem
......@@ -312,6 +312,17 @@ function test_pkg_unpack()
assert_table_equal({
["/etc/config/updater"] = "30843ef73412c8f6b4212c00724a1cc8"
}, conffiles)
assert_table_equal({
Package = "updater",
Version = "129",
Source = "feeds/turrispackages/cznic/updater",
Section = "opt",
Maintainer = "Michal Vaner <michal.vaner@nic.cz>",
Architecture = "mpc85xx",
["Installed-Size"] = "14773",
Description = "updater",
Depends = {"libc", "vixie-cron", "openssl-util", "libatsha204", "curl", "cert-backup", "opkg", "bzip2", "cznic-cacert-bundle"}
}, control)
end
-- Test the collision_check function
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment