1 |
commit: 2a35343c7e4ebde7a6d509b546c9d66e9f8da9a7 |
2 |
Author: Göktürk Yüksek <gokturk <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 31 02:56:06 2020 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 31 07:36:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/crossdev.git/commit/?id=2a35343c |
7 |
|
8 |
crossdev: update profiles/categories during uninstall |
9 |
|
10 |
If we remove the category cross-${CTARGET} in the output overlay, |
11 |
remove the category itself from profiles/categories. |
12 |
|
13 |
Signed-off-by: Göktürk Yüksek <gokturk <AT> gentoo.org> |
14 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
15 |
|
16 |
crossdev | 9 +++++++-- |
17 |
1 file changed, 7 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/crossdev b/crossdev |
20 |
index b460d53..9427cf1 100755 |
21 |
--- a/crossdev |
22 |
+++ b/crossdev |
23 |
@@ -555,8 +555,13 @@ uninstall() { |
24 |
ewarn "Uninstalling target '${CTARGET}' ..." |
25 |
|
26 |
# clean out portage config files |
27 |
- [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]] \ |
28 |
- && rm -r ${CROSSDEV_OVERLAY}/cross-${CTARGET} |
29 |
+ if [[ -d ${CROSSDEV_OVERLAY}/cross-${CTARGET} ]]; then |
30 |
+ rm -r "${CROSSDEV_OVERLAY}"/cross-${CTARGET} |
31 |
+ # if we remove all the package in the category, |
32 |
+ # might as well remove the category itself |
33 |
+ sed -e "/cross-${CTARGET}/d" \ |
34 |
+ -i "${CROSSDEV_OVERLAY}"/profiles/categories |
35 |
+ fi |
36 |
# crossdev stopped creating 'package.keywords' in Jan 2020 |
37 |
for f in categories package.{accept_keywords,env,mask,keywords,use} profile/package.use.{force,mask} ; do |
38 |
f="${CONFIGROOT}/${f}" |