fixup: snap & autoinstall
This commit is contained in:
parent
e41851765e
commit
3de314a64f
|
@ -340,25 +340,8 @@
|
|||
},
|
||||
"classic": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"is_classic": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"classic"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"is_classic"
|
||||
]
|
||||
}
|
||||
],
|
||||
"required": [
|
||||
"name"
|
||||
],
|
||||
|
|
|
@ -51,7 +51,7 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
||||
|
|
|
@ -30,6 +30,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -74,6 +74,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -61,6 +61,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -35,6 +35,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -102,6 +102,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -61,6 +61,6 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
|
|
@ -34,7 +34,7 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ SnapList:
|
|||
snaps:
|
||||
hello:
|
||||
channel: stable
|
||||
is_classic: false
|
||||
classic: false
|
||||
InstallProgress:
|
||||
reboot: yes
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ class SnapInfo:
|
|||
class SnapSelection:
|
||||
name: str
|
||||
channel: str
|
||||
is_classic: bool = False
|
||||
classic: bool = False
|
||||
|
||||
|
||||
@attr.s(auto_attribs=True)
|
||||
|
|
|
@ -100,7 +100,7 @@ class SnapListModel:
|
|||
cmds = []
|
||||
for selection in self.selections:
|
||||
cmd = ['snap', 'install', '--channel=' + selection.channel]
|
||||
if selection.is_classic:
|
||||
if selection.classic:
|
||||
cmd.append('--classic')
|
||||
cmd.append(selection.name)
|
||||
cmds.append(' '.join(cmd))
|
||||
|
|
|
@ -124,18 +124,7 @@ class SnapListController(SubiquityController):
|
|||
'name': {'type': 'string'},
|
||||
'channel': {'type': 'string'},
|
||||
'classic': {'type': 'boolean'},
|
||||
'is_classic': {'type': 'boolean'},
|
||||
},
|
||||
'oneOf': [
|
||||
{
|
||||
'type': 'object',
|
||||
'required': ['classic'],
|
||||
},
|
||||
{
|
||||
'type': 'object',
|
||||
'required': ['is_classic'],
|
||||
}
|
||||
],
|
||||
'required': ['name'],
|
||||
'additionalProperties': False,
|
||||
},
|
||||
|
@ -159,7 +148,7 @@ class SnapListController(SubiquityController):
|
|||
to_install.append(SnapSelection(
|
||||
name=snap['name'],
|
||||
channel=snap.get('channel', 'stable'),
|
||||
is_classic=snap.get('classic', snap.get('is_classic', False))))
|
||||
classic=snap.get('classic', False)))
|
||||
self.model.set_installed_list(to_install)
|
||||
|
||||
def snapd_network_changed(self):
|
||||
|
|
|
@ -128,7 +128,7 @@ class SnapInfoView(WidgetWrap):
|
|||
selection = SnapSelection(
|
||||
name=self.snap.name,
|
||||
channel=csi.channel_name,
|
||||
is_classic=csi.confinement == "classic")
|
||||
classic=csi.confinement == "classic")
|
||||
btn = StarRadioButton(
|
||||
radio_group,
|
||||
csi.channel_name,
|
||||
|
@ -328,7 +328,7 @@ class SnapCheckBox(CheckBox):
|
|||
self.parent.selections_by_name[self.snap.name] = SnapSelection(
|
||||
name=self.snap.name,
|
||||
channel='stable',
|
||||
is_classic=self.snap.confinement == "classic")
|
||||
classic=self.snap.confinement == "classic")
|
||||
else:
|
||||
log.debug("unselecting %s", self.snap.name)
|
||||
self.parent.selections_by_name.pop(self.snap.name, None)
|
||||
|
|
Loading…
Reference in New Issue