@@ -8,7 +8,7 @@ use crate::cxxrsutil::*;
88use crate :: ffi:: {
99 OverrideReplacementSource , OverrideReplacementType , ParsedRevision , ParsedRevisionKind ,
1010} ;
11- use anyhow:: { anyhow, format_err, Context , Result } ;
11+ use anyhow:: { anyhow, format_err, Result } ;
1212use cap_std:: fs:: Dir ;
1313use cap_std_ext:: dirext:: CapStdExtDirExt ;
1414use cap_std_ext:: { cap_std, rustix} ;
@@ -135,25 +135,6 @@ fn deployment_populate_variant_origin(
135135 Ok ( ( ) )
136136}
137137
138- /// Connect to the client socket and ensure the daemon is initialized;
139- /// this avoids DBus and ensures that we get any early startup errors
140- /// returned cleanly.
141- pub ( crate ) fn start_daemon_via_socket ( ) -> CxxResult < ( ) > {
142- let address = "/run/rpm-ostree/client.sock" ;
143- tracing:: debug!( "Starting daemon via {address}" ) ;
144- let s = std:: os:: unix:: net:: UnixStream :: connect ( address)
145- . with_context ( || anyhow ! ( "Failed to connect to {}" , address) ) ?;
146- let mut s = std:: io:: BufReader :: new ( s) ;
147- let mut r = String :: new ( ) ;
148- s. read_to_string ( & mut r)
149- . context ( "Reading from client socket" ) ?;
150- if r. is_empty ( ) {
151- Ok ( ( ) )
152- } else {
153- Err ( anyhow ! ( "{r}" ) . into ( ) )
154- }
155- }
156-
157138async fn send_ok_result_to_client ( _client : UnixStream ) {
158139 // On success we close the stream without writing anything,
159140 // which acknowledges successful startup to the client.
0 commit comments