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.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 {
text: qsTr("Virtual Machine 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 644 $(MODULES_DIR)/automirror/automirror.conf
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
operations:
- 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
module: shellprocess
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:
- show:
@ -54,8 +60,9 @@ sequence:
- contextualprocess@after_bootloader
- automirror
- shellprocess@add386arch
- pkgselect
- packages
- contextualprocess@pkgselect_action
- contextualprocess@pkgselect_snap_action
- shellprocess@logs
- umount
- show:

Loading…
Cancel
Save