@@ -907,6 +907,9 @@ impl Opt {
907
907
InternalsOpts :: GENERATOR_BIN => {
908
908
Some ( [ "bootc" , "internals" , "systemd-generator" ] . as_slice ( ) )
909
909
}
910
+ "ostree-container" | "ostree-ima-sign" | "ostree-provisional-repair" => {
911
+ Some ( [ "bootc" , "internals" , "ostree-ext" ] . as_slice ( ) )
912
+ }
910
913
_ => None ,
911
914
} ;
912
915
if let Some ( base_args) = mapped {
@@ -1133,4 +1136,31 @@ fn test_parse_ostree_ext() {
1133
1136
Opt :: parse_including_static( [ "bootc" , "internals" , "ostree-container" ] ) ,
1134
1137
Opt :: Internals ( InternalsOpts :: OstreeContainer { .. } )
1135
1138
) ) ;
1139
+
1140
+ fn peel ( o : Opt ) -> Vec < OsString > {
1141
+ match o {
1142
+ Opt :: Internals ( InternalsOpts :: OstreeExt { args } ) => args,
1143
+ o => panic ! ( "unexpected {o:?}" ) ,
1144
+ }
1145
+ }
1146
+ let args = peel ( Opt :: parse_including_static ( [
1147
+ "/usr/libexec/libostree/ext/ostree-ima-sign" ,
1148
+ "ima-sign" ,
1149
+ "--repo=foo" ,
1150
+ "foo" ,
1151
+ "bar" ,
1152
+ "baz" ,
1153
+ ] ) ) ;
1154
+ assert_eq ! (
1155
+ args. as_slice( ) ,
1156
+ [ "ima-sign" , "--repo=foo" , "foo" , "bar" , "baz" ]
1157
+ ) ;
1158
+
1159
+ let args = peel ( Opt :: parse_including_static ( [
1160
+ "/usr/libexec/libostree/ext/ostree-container" ,
1161
+ "container" ,
1162
+ "image" ,
1163
+ "pull" ,
1164
+ ] ) ) ;
1165
+ assert_eq ! ( args. as_slice( ) , [ "container" , "image" , "pull" ] ) ;
1136
1166
}
0 commit comments