osutil: mergeusr: don't rewrite /usr/sbin to /usr/bin (MR 58)
Alpine TSC decided to keep /usr/sbin for now, so let's not break paths to stuff under /usr/sbin in the meantime.
This commit is contained in:
@@ -40,11 +40,6 @@ func MergeUsr(file string) string {
|
||||
}
|
||||
}
|
||||
|
||||
// Convert /usr/sbin --> /usr/bin
|
||||
if part, found := strings.CutPrefix(file, "/usr/sbin"); found {
|
||||
file = filepath.Join("/usr/bin/", part)
|
||||
}
|
||||
|
||||
return file
|
||||
}
|
||||
|
||||
|
@@ -18,11 +18,11 @@ func TestMergeUsr(t *testing.T) {
|
||||
},
|
||||
{
|
||||
in: "/sbin/foo",
|
||||
expected: "/usr/bin/foo",
|
||||
expected: "/usr/sbin/foo",
|
||||
},
|
||||
{
|
||||
in: "/usr/sbin/foo",
|
||||
expected: "/usr/bin/foo",
|
||||
expected: "/usr/sbin/foo",
|
||||
},
|
||||
{
|
||||
in: "/usr/bin/foo",
|
||||
|
Reference in New Issue
Block a user