summaryrefslogtreecommitdiffstats
path: root/scripts/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/bootstrap')
-rw-r--r--scripts/bootstrap/fix_deps.sh10
-rw-r--r--scripts/bootstrap/layman_reinit.sh19
2 files changed, 29 insertions, 0 deletions
diff --git a/scripts/bootstrap/fix_deps.sh b/scripts/bootstrap/fix_deps.sh
new file mode 100644
index 0000000..cf73d1e
--- /dev/null
+++ b/scripts/bootstrap/fix_deps.sh
@@ -0,0 +1,10 @@
+# Unmerge
+emerge --depclean -a
+
+# Ncurses/GPM circular dependency
+USE="-gpm" emerge -1 ncurses
+
+# Perl
+# emerge -u -1 -O perl $(eix '-I#' virtual/perl-*)
+# emerge -u -1 perl $(eix '-I#' virtual/perl-*)
+# perl-cleaner --all
diff --git a/scripts/bootstrap/layman_reinit.sh b/scripts/bootstrap/layman_reinit.sh
new file mode 100644
index 0000000..ce88379
--- /dev/null
+++ b/scripts/bootstrap/layman_reinit.sh
@@ -0,0 +1,19 @@
+#! /bin/bash
+
+(
+ repos=$(xmllint -xpath "//repo/name/text()|//repo/source/text()" /etc/portage/layman.xml | xargs -n2)
+
+ cd /etc/portage
+
+ layman -d ALL
+ for repo in $(cat /etc/portage/repos.conf/layman.conf | grep -oP "\[\K[^]]*"); do
+ repo_src=$(echo "$repos" | grep -P "^$repo" | awk '{ print $2 }')
+ if [ -n "$repo_src" ]; then
+ layman -a "$repo" -O "$repo_src"
+ else
+ layman -a "$repo"
+ fi
+ done
+
+ git checkout -- layman.xml
+)