Commit 7e6b967e authored by Ivan Mazhukin's avatar Ivan Mazhukin Committed by Vitaly Lipatov

epm desktop: add metapackage's support (eterbug #17617)

parent 3831ddf5
......@@ -36,12 +36,14 @@ copy_files_if_absent() {
sudorun mkdir -p "$target_dir"
for file in "$source_dir"/*.json; do
filename=$(basename "$file")
target_file="$target_dir/$filename"
if [ ! -f "$target_file" ]; then
if [ ! -f "$target_file" ] || ! grep -q "metapackages" "$target_file"; then
sudorun cp "$file" "$target_file"
fi
done
}
......@@ -123,6 +125,12 @@ get_repo_version() {
fi
fi
}
install_de_meta() {
local metapackages=$(get_value "$de_name" "metapackages")
[ -n "$metapackages" ] && epm install --manual-requires $metapackages
return
}
install_de() {
local de_name=$1
......@@ -133,15 +141,17 @@ install_de() {
message "$de_name is already installed."
return 0
fi
message "Installing $de_name with dependencies: $dependencies"
message "Installing $de_name with dependencies: $dependencies"
if ! install_de_meta $metapackages; then
message "Failed to install $de_name." && return 1
fi
if epm install $dependencies; then
message "$de_name successfully installed."
update_installed_status "$de_name" true
else
message "Failed to install $de_name."
return 1
message "Failed to install $de_name." && return 1
fi
}
......
......@@ -3,6 +3,7 @@
"version": "46.4",
"installed": false,
"dependencies": ["gnome-shell", "gdm"],
"description": "Window management and application launching for GNOME"
"description": "Window management and application launching for GNOME",
"metapackages": ["test"]
}
\ No newline at end of file
......@@ -3,6 +3,7 @@
"version": "0.42.0",
"installed": false,
"dependencies": [ "hyprland", "kitty", "waybar", "wlogout", "fonts-ttf-fira-code-nerd", "hyprpaper", "hyprshot", "wofi", "pwvucontrol", "cliphist", "polkit-gnome"],
"description": "Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks"
"description": "Hyprland is a dynamic tiling Wayland compositor that doesn't sacrifice on its looks",
"metapackages": [ "hyprland" ]
}
\ No newline at end of file
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