Skip to content

Commit 2af02c1

Browse files
Git - Bug Fix: Feature fails with "ppa:false" for "buster" & "bullseye" (devcontainers#340)
1 parent e46c73d commit 2af02c1

5 files changed

Lines changed: 53 additions & 3 deletions

File tree

src/git/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "git",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"name": "Git (from source)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
66
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",

src/git/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ fi
149149

150150
check_packages libpcre2-dev
151151

152-
if [ "${VERSION_CODENAME}" = "focal" ]; then
152+
if [ "${VERSION_CODENAME}" = "focal" ] || [ "${VERSION_CODENAME}" = "bullseye" ]; then
153153
check_packages libpcre2-posix2
154-
elif [ "${VERSION_CODENAME}" = "bionic" ]; then
154+
elif [ "${VERSION_CODENAME}" = "bionic" ] || [ "${VERSION_CODENAME}" = "buster" ]; then
155155
check_packages libpcre2-posix0
156156
else
157157
check_packages libpcre2-posix3
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
check "version" git --version
9+
check "gettext" dpkg-query -l gettext
10+
11+
cd /tmp && git clone https://github.com/devcontainers/feature-starter.git
12+
cd feature-starter
13+
check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'"
14+
15+
# Report result
16+
reportResults
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
check "version" git --version
9+
check "gettext" dpkg-query -l gettext
10+
11+
cd /tmp && git clone https://github.com/devcontainers/feature-starter.git
12+
cd feature-starter
13+
check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'"
14+
15+
# Report result
16+
reportResults

test/git/scenarios.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,23 @@
2525
"ppa": "false"
2626
}
2727
}
28+
},
29+
"install_git_from_src_bullseye": {
30+
"image": "debian:bullseye",
31+
"features": {
32+
"git": {
33+
"version": "latest",
34+
"ppa": "false"
35+
}
36+
}
37+
},
38+
"install_git_from_src_buster": {
39+
"image": "debian:buster",
40+
"features": {
41+
"git": {
42+
"version": "latest",
43+
"ppa": "false"
44+
}
45+
}
2846
}
2947
}

0 commit comments

Comments
 (0)