diff options
author | 2020-01-30 21:56:06 -0500 | |
---|---|---|
committer | 2020-01-31 07:36:46 +0000 | |
commit | 2a35343c7e4ebde7a6d509b546c9d66e9f8da9a7 (patch) | |
tree | 5817b64496e7ed15ea5a00b199ec18e230029f78 /crossdev | |
parent | crossdev: create a repos.conf entry for the output overlay if necessary (diff) | |
download | crossdev-2a35343c7e4ebde7a6d509b546c9d66e9f8da9a7.tar.gz crossdev-2a35343c7e4ebde7a6d509b546c9d66e9f8da9a7.tar.bz2 crossdev-2a35343c7e4ebde7a6d509b546c9d66e9f8da9a7.zip |
crossdev: update profiles/categories during uninstall
If we remove the category cross-${CTARGET} in the output overlay,
remove the category itself from profiles/categories.
Signed-off-by: Göktürk Yüksek <gokturk@gentoo.org>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'crossdev')
-rwxr-xr-x | crossdev | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -555,8 +555,13 @@ uninstall() { ewarn "Uninstalling target '${CTARGET}' ..." # clean out portage config files - [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]] \ - && rm -r ${CROSSDEV_OVERLAY}/cross-${CTARGET} + if [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]]; then + rm -r "${CROSSDEV_OVERLAY}"/cross-${CTARGET} + # if we remove all the package in the category, + # might as well remove the category itself + sed -e "/cross-${CTARGET}/d" \ + -i "${CROSSDEV_OVERLAY}"/profiles/categories + fi # crossdev stopped creating 'package.keywords' in Jan 2020 for f in categories package.{accept_keywords,env,mask,keywords,use} profile/package.use.{force,mask} ; do f="${CONFIGROOT}/${f}" |