summaryrefslogtreecommitdiff
path: root/apt-pkg/aptconfiguration.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2023-09-16 12:34:48 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2023-09-16 12:37:31 +0200
commit99c888b5eabbb7008bf4451bc62c277f28bb925f (patch)
tree2375ab845a8c66a368bae090b799d819287ee589 /apt-pkg/aptconfiguration.h
parent52dd18670bf7d22ecf234141d3c7b7b9f67c6fa3 (diff)
Only accept installs of usrmerge on unmerged-usr systems
As of bookworm, merged-usr is mandatory, and people got caught in the crosshairs of the dpkg fsys-unmessusr debacle and inadvertently reverted back to an unmerged configuration and continue to remain on an unsupported system unknowingly. Help them by erroring out when they are installing packages on /, they are not in a chroot, and a usrmerge package is available.
Diffstat (limited to 'apt-pkg/aptconfiguration.h')
-rw-r--r--apt-pkg/aptconfiguration.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/apt-pkg/aptconfiguration.h b/apt-pkg/aptconfiguration.h
index bbeb156b9..3e2636edc 100644
--- a/apt-pkg/aptconfiguration.h
+++ b/apt-pkg/aptconfiguration.h
@@ -125,8 +125,12 @@ namespace Configuration { /*{{{*/
std::string const getMachineID();
+#ifdef APT_COMPILING_APT
/** \return Whether we are running in a chroot */
- bool isChroot();
+ APT_PUBLIC bool isChroot();
+ /** \return Check usr is merged or produce error. */
+ APT_PUBLIC bool checkUsrMerged();
+#endif
/*}}}*/
}
/*}}}*/