Skip to content

Commit

Permalink
fixup: don't provide ubuntu-advantage-tools
Browse files Browse the repository at this point in the history
By removing "Provides: ubuntu-advantage-tools", we lower the chances of
ubuntu-advantage-tools <31 being removed during an install of
ubuntu-pro-client, becuase ubuntu-minimal (and ubuntu-cloud-minimal)
Depend on ubuntu-advantage-tools. This removes the need for
ubuntu-pro-client Depends: ubuntu-advantage-tools.
  • Loading branch information
orndorffgrant committed Jan 9, 2024
1 parent af69e03 commit ec64a2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 22 deletions.
5 changes: 3 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Vcs-Browser: https://github.com/canonical/ubuntu-pro-client
Rules-Requires-Root: no

Package: ubuntu-advantage-tools
Depends: ubuntu-pro-client, ${misc:Depends}
Depends: ubuntu-pro-client (= ${binary:Version}), ${misc:Depends}
Architecture: all
Priority: optional
Section: oldlibs
Expand All @@ -54,7 +54,8 @@ Depends: ${misc:Depends},
Recommends: ubuntu-pro-client-l10n
Breaks: ubuntu-advantage-tools (<<31~)
Replaces: ubuntu-advantage-tools (<<31~)
Provides: ubuntu-advantage-tools
# IMPORTANT: ubuntu-pro-client does not "Provide" ubuntu-advantage-tools
# TODO fill this in with rationale after testing.
Description: Management tools for Ubuntu Pro
Ubuntu Pro is a suite of additional services provided by Canonical on
top of Ubuntu. Whether you're an enterprise customer deploying systems
Expand Down
21 changes: 1 addition & 20 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,11 @@ include /etc/os-release
# versus Xenial to make those contraints applicable on each series.
DISTRO_INFO_DEPS="distro-info (>= 0.18ubuntu0.18.04.1),"

# Xenial, Bionic, Focal, Jammy, and Mantic all began with only the
# ubuntu-advantage-tools. Even after the rename to ubuntu-pro-client, those
# releases need to keep ubuntu-advantage-tools installed, because the prerm
# script will break ESM access. In order to force ubuntu-advantage-tools to
# stay installed, we add ubuntu-advantage-tools to the Depends list for
# ubuntu-pro-client on those releases.
# On Noble onward, only ubuntu-pro-client needs to be installed, because it
# will have been there from the beginning of the release. ubuntu-advantage-tools
# still can be installed, but it will no longer cause any harm.
SELF_DEPS=""

ifeq (${VERSION_ID},"16.04")
APT_PKG_DEPS="apt (>= 1.2.32), apt-transport-https (>= 1.2.32), apt-utils (>= 1.2.32), libapt-inst2.0 (>= 1.2.32), libapt-pkg5.0 (>= 1.2.32),"
DISTRO_INFO_DEPS="distro-info (>= 0.14ubuntu0.2),"
SELF_DEPS="ubuntu-advantage-tools (>= 31~),"
else ifeq (${VERSION_ID},"18.04")
APT_PKG_DEPS="apt (>= 1.6.11), apt-utils (>= 1.6.11), libapt-inst2.0 (>= 1.6.11), libapt-pkg5.0 (>= 1.6.11),"
SELF_DEPS="ubuntu-advantage-tools (>= 31~),"
else ifeq (${VERSION_ID},"20.04")
SELF_DEPS="ubuntu-advantage-tools (>= 31~),"
else ifeq (${VERSION_ID},"22.04")
SELF_DEPS="ubuntu-advantage-tools (>= 31~),"
else ifeq (${VERSION_ID},"23.10")
SELF_DEPS="ubuntu-advantage-tools (>= 31~),"
endif

%:
Expand All @@ -58,7 +39,7 @@ endif
endif

override_dh_gencontrol:
echo extra:Depends=$(APT_PKG_DEPS) $(DISTRO_INFO_DEPS) $(SELF_DEPS) >> debian/ubuntu-pro-client.substvars
echo extra:Depends=$(APT_PKG_DEPS) $(DISTRO_INFO_DEPS) >> debian/ubuntu-pro-client.substvars
dh_gencontrol

override_dh_systemd_enable:
Expand Down

0 comments on commit ec64a2c

Please sign in to comment.