Skip to content

Remove dependencies to Aptitude and add pre_apt_script

Code related to Aptitude can be replaced by usage of pre_apt_script and platform's post_script.

clean-up-base and prepare-runtime specific code can be done in pre_apt_script:

echo 'Aptitude::Delete-Unused "false";' >> /etc/apt/apt.conf.d/flatpak-runtime

# We use aptitude to help prepare the Platform runtime, and
# it's a useful thing to have in the Sdk runtime
apt-get -q -y --no-install-recommends install aptitude

# All packages will be removed from the platform runtime
# unless they are Essential, depended-on, or in the
# add_packages list.
aptitude -y markauto '?installed'

# Ubuntu precise doesn't like apt being up for autoremoval.
aptitude -y unmarkauto apt

platformize, clean-up-before-pack and make-flatpack-friendly may be done in platform_post_script:

if is_installed "$package"; then
  apt-get -y purge aptitude
fi

rm -fr var/lib/aptitude/pkgstates.old

Merge request reports