Skip to content

Commit

Permalink
nonsdk_container_setup: correct sources line changing
Browse files Browse the repository at this point in the history
New version of Ubuntu LXD images seem to have a slightly different
sources line. Account for those by making the trailing slash optional.

Fixes: #71
  • Loading branch information
peat-psuwit committed Feb 7, 2024
1 parent d9d2ac4 commit c23bb02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crossbuilder
Expand Up @@ -433,7 +433,7 @@ nonsdk_container_setup () {
i386-*|amd64-*)
# Host is on archive, target is on ports.
exec_container_root "sed -E \
-e 's:(archive|security)\.ubuntu\.com/ubuntu/:ports.ubuntu.com/ubuntu-ports/:' \
-e 's:(archive|security)\.ubuntu\.com/ubuntu/? :ports.ubuntu.com/ubuntu-ports/ :' \
-e 's:^deb :deb [arch=${TARGET_ARCH}] :' \
/etc/apt/sources.list >/etc/apt/sources.list.d/ports.list"
exec_container_root "sed -i -E \
Expand All @@ -443,8 +443,8 @@ nonsdk_container_setup () {
*-i386|*-amd64)
# Host is on ports, target is on archive.
exec_container_root "sed -E \
-e 's:ports\.ubuntu\.com/ubuntu-ports/ ([a-z]+)-security :security.ubuntu.com/ubuntu/ \1-security :' \
-e 's:ports\.ubuntu\.com/ubuntu-ports/ ([a-z-]+):archive.ubuntu.com/ubuntu/ \1 :' \
-e 's:ports\.ubuntu\.com/ubuntu-ports/? ([a-z]+)-security :security.ubuntu.com/ubuntu \1-security :' \
-e 's:ports\.ubuntu\.com/ubuntu-ports/? ([a-z-]+):archive.ubuntu.com/ubuntu \1 :' \
-e 's:^deb :deb [arch=${TARGET_ARCH}] :' \
/etc/apt/sources.list >/etc/apt/sources.list.d/non-ports.list"
exec_container_root "sed -i -E \
Expand Down

0 comments on commit c23bb02

Please sign in to comment.