mirror of https://github.com/docker/docs.git
Merge pull request #3312 from nathanleclaire/unbreak_upgrade
Remove lxc-docker to docker-engine migration code
This commit is contained in:
commit
9718d6c266
|
|
@ -57,25 +57,6 @@ func (provisioner *DebianProvisioner) Package(name string, action pkgaction.Pack
|
|||
}
|
||||
}
|
||||
|
||||
// handle the new docker-engine package; we can probably remove this
|
||||
// after we have a few versions
|
||||
if action == pkgaction.Upgrade && name == "docker-engine" {
|
||||
// run the force remove on the existing lxc-docker package
|
||||
// and remove the existing apt source list
|
||||
|
||||
commands := []string{
|
||||
"rm /etc/apt/sources.list.d/docker.list || true",
|
||||
"apt-get remove -y lxc-docker || true",
|
||||
}
|
||||
|
||||
for _, cmd := range commands {
|
||||
command := fmt.Sprintf("sudo DEBIAN_FRONTEND=noninteractive %s", cmd)
|
||||
if _, err := provisioner.SSHCommand(command); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command := fmt.Sprintf("DEBIAN_FRONTEND=noninteractive sudo -E apt-get %s -y %s", packageAction, name)
|
||||
|
||||
log.Debugf("package: action=%s name=%s", action.String(), name)
|
||||
|
|
|
|||
|
|
@ -73,25 +73,6 @@ func (provisioner *UbuntuSystemdProvisioner) Package(name string, action pkgacti
|
|||
}
|
||||
}
|
||||
|
||||
// handle the new docker-engine package; we can probably remove this
|
||||
// after we have a few versions
|
||||
if action == pkgaction.Upgrade && name == "docker-engine" {
|
||||
// run the force remove on the existing lxc-docker package
|
||||
// and remove the existing apt source list
|
||||
|
||||
commands := []string{
|
||||
"rm /etc/apt/sources.list.d/docker.list || true",
|
||||
"apt-get remove -y lxc-docker || true",
|
||||
}
|
||||
|
||||
for _, cmd := range commands {
|
||||
command := fmt.Sprintf("sudo DEBIAN_FRONTEND=noninteractive %s", cmd)
|
||||
if _, err := provisioner.SSHCommand(command); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command := fmt.Sprintf("DEBIAN_FRONTEND=noninteractive sudo -E apt-get %s -y %s", packageAction, name)
|
||||
|
||||
log.Debugf("package: action=%s name=%s", action.String(), name)
|
||||
|
|
|
|||
|
|
@ -92,25 +92,6 @@ func (provisioner *UbuntuProvisioner) Package(name string, action pkgaction.Pack
|
|||
}
|
||||
}
|
||||
|
||||
// handle the new docker-engine package; we can probably remove this
|
||||
// after we have a few versions
|
||||
if action == pkgaction.Upgrade && name == "docker-engine" {
|
||||
// run the force remove on the existing lxc-docker package
|
||||
// and remove the existing apt source list
|
||||
|
||||
commands := []string{
|
||||
"rm /etc/apt/sources.list.d/docker.list || true",
|
||||
"apt-get remove -y lxc-docker || true",
|
||||
}
|
||||
|
||||
for _, cmd := range commands {
|
||||
command := fmt.Sprintf("sudo DEBIAN_FRONTEND=noninteractive %s", cmd)
|
||||
if _, err := provisioner.SSHCommand(command); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
command := fmt.Sprintf("DEBIAN_FRONTEND=noninteractive sudo -E apt-get %s -y -o Dpkg::Options::=\"--force-confnew\" %s", packageAction, name)
|
||||
|
||||
log.Debugf("package: action=%s name=%s", action.String(), name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue