Completely finish the backend for pkgselect

ubuntu/noble
Simon Quigley 1 year ago
parent b52736fc07
commit 9b0d4c4394

@ -142,21 +142,6 @@ Item {
font.italic: true font.italic: true
font.pointSize: 10 font.pointSize: 10
} }
CheckBox {
text: qsTr("VSCodium")
objectName: "vscodium"
font.pointSize: 11
indicator.width: 18
indicator.height: 18
onClicked: {
updatePackageSelections(objectName, checked);
}
}
Text {
text: qsTr("Code editor redefined and optimized for building and debugging modern web and cloud applications")
font.italic: true
font.pointSize: 10
}
CheckBox { CheckBox {
text: qsTr("Virtual Machine Manager") text: qsTr("Virtual Machine Manager")
objectName: "virt-manager" objectName: "virt-manager"

@ -0,0 +1,40 @@
#!/bin/bash
chroot_root="$1"
shift
new_snaps=("$@")
seed_dir="$chroot_root/var/lib/snapd/seed"
snaps_dir="$seed_dir/snaps"
assertions_dir="$seed_dir/assertions"
seed_yaml="$seed_dir/seed.yaml"
# Loop through each snap and download it, then update seed.yaml
for snap_info in "${new_snaps[@]}"; do
snap_name=${snap_info%=*}
channel=${snap_info#*=}
# Download
snap download --channel="$channel" "$snap_name" --target-directory="$snaps_dir"
sleep 5
# Get revision number
snap_file=$(ls "$snaps_dir" | grep ".snap" | grep "^${snap_name}_")
rev_num=$(echo "$snap_file" | grep -oP '(?<=_)\d+')
# Move assertions
mv "$snaps_dir/${snap_name}_${rev_num}.assert" "$assertions_dir"
# Append to seed.yaml
{
echo " - name: $snap_name"
echo " file: $snap_file"
echo " channel: $channel"
} >> "$seed_yaml"
done
# Remove state.json if exists
[ -f "$chroot_root/var/lib/snapd/state.json" ] && rm "$chroot_root/var/lib/snapd/state.json"
# Validate
snap debug validate-seed "$seed_yaml"

2
debian/rules vendored

@ -27,3 +27,5 @@ override_dh_missing:
chmod -R 755 debian/calamares-settings-ubuntu-common/usr/lib/ chmod -R 755 debian/calamares-settings-ubuntu-common/usr/lib/
chmod 644 $(MODULES_DIR)/automirror/automirror.conf chmod 644 $(MODULES_DIR)/automirror/automirror.conf
chmod 644 $(MODULES_DIR)/automirror/module.desc chmod 644 $(MODULES_DIR)/automirror/module.desc
mkdir -pv debian/calamares-settings-ubuntu-common/usr/bin/
cp -v common/snap_install debian/calamares-settings-ubuntu-common/usr/bin/calamares_snap_install

@ -1,4 +1,4 @@
update_db: false update_db: true
backend: apt backend: apt
operations: operations:
- remove: - remove:

@ -0,0 +1,13 @@
---
dontChroot: false
timeout: 300
"packages.minimalInstall":
true:
- "apt-get -y --purge remove snapd vlc plasma-discover muon transmission-qt quassel 2048-qt featherpad noblenote kcalc qps zsync partitionmanager qapt-deb-installer picom qlipper qtpass libreoffice*"
- "apt-get -y autoremove"
"packages.updateNow":
true: "apt-get -y full-upgrade"
"packages.virt-manager":
true: "apt-get -y install virt-manager"
"packages.thunderbird":
true: "apt-get -y install thunderbird"

@ -0,0 +1,7 @@
---
dontChroot: true
timeout: 600
"packages.element":
true: "calamares_snap_install ${ROOT} element-desktop=stable"
"packages.krita":
true: "calamares_snap_install ${ROOT} krita=stable kf5-5-108-qt-5-15-10-core22=stable"

@ -20,6 +20,12 @@ instances:
- id: add386arch - id: add386arch
module: shellprocess module: shellprocess
config: shellprocess_add386arch.conf config: shellprocess_add386arch.conf
- id: pkgselect_action
module: contextualprocess
config: pkgselect_context.conf
- id: pkgselect_snap_action
module: contextualprocess
config: pkgselect_snap_context.conf
sequence: sequence:
- show: - show:
@ -54,8 +60,9 @@ sequence:
- contextualprocess@after_bootloader - contextualprocess@after_bootloader
- automirror - automirror
- shellprocess@add386arch - shellprocess@add386arch
- pkgselect
- packages - packages
- contextualprocess@pkgselect_action
- contextualprocess@pkgselect_snap_action
- shellprocess@logs - shellprocess@logs
- umount - umount
- show: - show:

Loading…
Cancel
Save