add cleanUpPkgList

This commit is contained in:
2021-06-14 22:16:56 +02:00
parent d70db48add
commit 83aa4dc018

View File

@@ -182,7 +182,15 @@ function md5 {
echo -ne "${am};"
}
# cleanUppkgList
# arg1: rootfs
function cleanUppkgList {
test -d ${1} || return 0
test -f ${1}/tmp/pkg.list && rm -f ${1}/tmp/pkg.list
}
# init pkg list
# arg1: rootfs
function _initPkgList {
root="$1"
test -f "${1}/tmp/pkg.list" || chroot "$1" sh -c "rpm -qa > /tmp/pkg.list"