[archiso] mkarchiso: add new pkglist command.
This command makes a list of installed packages on root-image, on <ISO>/$archisobasedir/pkglist.$arch.txt with the format <repo>/<package>-<version> Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
fbb6272b86
commit
f12097b2c4
@ -169,6 +169,8 @@ _usage ()
|
|||||||
echo " build all images"
|
echo " build all images"
|
||||||
echo " checksum"
|
echo " checksum"
|
||||||
echo " make a checksum.md5 for self-test"
|
echo " make a checksum.md5 for self-test"
|
||||||
|
echo " pkglist"
|
||||||
|
echo " make a pkglist.txt of packages installed on root-image"
|
||||||
echo " iso <image name>"
|
echo " iso <image name>"
|
||||||
echo " build an iso image from the working dir"
|
echo " build an iso image from the working dir"
|
||||||
exit ${1}
|
exit ${1}
|
||||||
@ -199,6 +201,8 @@ _show_config () {
|
|||||||
;;
|
;;
|
||||||
checksum)
|
checksum)
|
||||||
;;
|
;;
|
||||||
|
pkglist)
|
||||||
|
;;
|
||||||
iso)
|
iso)
|
||||||
_msg_info " Image name: ${img_name}"
|
_msg_info " Image name: ${img_name}"
|
||||||
_msg_info " Disk label: ${iso_label}"
|
_msg_info " Disk label: ${iso_label}"
|
||||||
@ -378,6 +382,19 @@ command_checksum () {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command_pkglist () {
|
||||||
|
_show_config pkglist
|
||||||
|
|
||||||
|
if _is_directory_changed "${work_dir}/root-image/var/lib/pacman/local" "${work_dir}/iso/${install_dir}/pkglist.${arch}.txt"; then
|
||||||
|
_msg_info "Creating a list of installed packages on live-enviroment"
|
||||||
|
pacman -Sl -r "${work_dir}/root-image" --config "${pacman_conf}" | \
|
||||||
|
awk '/\[installed\]$/ {print $1 "/" $2 "-" $3}' > \
|
||||||
|
"${work_dir}/iso/${install_dir}/pkglist.${arch}.txt"
|
||||||
|
_msg_info "Done!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# Create an ISO9660 filesystem from "iso" directory.
|
# Create an ISO9660 filesystem from "iso" directory.
|
||||||
command_iso () {
|
command_iso () {
|
||||||
local _iso_efi_boot_args=""
|
local _iso_efi_boot_args=""
|
||||||
@ -538,6 +555,9 @@ case "${command_name}" in
|
|||||||
checksum)
|
checksum)
|
||||||
command_checksum
|
command_checksum
|
||||||
;;
|
;;
|
||||||
|
pkglist)
|
||||||
|
command_pkglist
|
||||||
|
;;
|
||||||
iso)
|
iso)
|
||||||
if [[ $# -lt 2 ]]; then
|
if [[ $# -lt 2 ]]; then
|
||||||
_msg_error "No image specified" 0
|
_msg_error "No image specified" 0
|
||||||
|
Loading…
Reference in New Issue
Block a user