diff --git a/main/bash-completion/APKBUILD b/main/bash-completion/APKBUILD
index fc2dea20444b9319b9f48269f4ea9e2bb81e437c..7726960af117c811b3913031d643834332a94354 100644
--- a/main/bash-completion/APKBUILD
+++ b/main/bash-completion/APKBUILD
@@ -3,7 +3,7 @@
 # Maintainer: Lucas Ramage <ramage.lucas@protonmail.com>
 pkgname=bash-completion
 pkgver=2.11
-pkgrel=4
+pkgrel=5
 pkgdesc="Command-line tab-completion for bash"
 options="!check" # 7 Tests fail
 url="https://github.com/scop/bash-completion"
@@ -71,6 +71,15 @@ check() {
 package() {
 	make -j1 DESTDIR="$pkgdir" install
 
+	# /etc/profile sources profile.d, and this occurs only in login shells
+	# it should not then load completions or expect the bashrc to source the profile directory.
+	# so, we move the sourcing script to /etc/bash, and include it from the bashrc when present.
+	mkdir -p "$pkgdir"/etc/bash
+	mv "$pkgdir"/etc/profile.d/bash_completion.sh \
+		"$pkgdir"/etc/bash/
+	rmdir -p "$pkgdir"/etc/profile.d/ || true
+	
+
 	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
 	install -m644 AUTHORS CHANGES CONTRIBUTING.md README.md \
 		"$pkgdir"/usr/share/doc/$pkgname/
@@ -81,4 +90,6 @@ package() {
 	done
 }
 
-sha512sums="41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06  bash-completion-2.11.tar.xz"
+sha512sums="
+41585f730b5114d397831ba36d10d05643c6a6179e746ddc49aa1cbef61ea5525fd2f09b2e474adee14e647f99df8d5983ee48e29a59d8a30e1daf7fb1837e06  bash-completion-2.11.tar.xz
+"