Commit Graph

11 Commits

Author SHA1 Message Date
Giuseppe Scrivano
1bc2029173 rpm-ostree: support 'reboot' immediately after a rollback
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-10-05 09:18:50 +02:00
Matthew Barnes
7aed790da5 app: Fix local operations with non-default sysroot paths
Some vestigial option parsing cruft revealed the need for the Sysroot
interface to grow a "Path" property.
2015-09-09 22:00:05 -04:00
Matthew Barnes
19e626c087 daemon: Use a peer-to-peer connection for transactions
Transaction progress and message signals are really only intended for
one recipient: the client that invoked the method.  Use a peer-to-peer
connection for transactions so we're not spamming the system bus.

This entails returning a bus address rather than an object path in
methods that use transactions.  The client opens a connection to the
bus address, connects handlers to the Transaction interface (on path
"/"), and then invokes the Start() method.

To finish a transaction, the client need only close the connection,
either explicitly or by terminating.  The server will detect this
and clean up resources for that transaction.
2015-09-09 22:00:05 -04:00
Matthew Barnes
7b8c67fc6a app: Tweak transaction DBus helper function
Take an RPMOSTreeSysroot object instead of a GDBusConnection in
rpmostree_transaction_get_response_sync().  Makes the API slightly
more convenient.
2015-09-09 22:00:05 -04:00
Matthew Barnes
d54f25a9e4 app: Collect D-Bus CLI options into main.c
In the style of ostree's CLI, add some option parsing flags

    RPM_OSTREE_BUILTIN_FLAG_NONE
    RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD

and extend rpmostree_option_context_parse() to handle the --sysroot and
--peer options and return an OstreeSysroot proxy object (unless the flag
RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD is passed).
2015-09-09 22:00:05 -04:00
Matthew Barnes
c57cc38c6e app: Extract GDBusConnection from GDBusProxy
Remove another redundant "out" parameter from DBus helper functions.
Use g_dbus_proxy_get_connection() if the connection object is needed.
2015-09-09 22:00:05 -04:00
Matthew Barnes
7190f7b351 app: Detect peer connection from GDBusConnection
If g_dbus_connection_get_unique_name() returns a name, we're connected
to a message bus.  Otherwise we're connected directly to a peer.

Remove redundant "out" parameters from DBus helper functions.
2015-09-09 22:00:05 -04:00
Matthew Barnes
463d3676ea daemon: Miscellaneous cleanups 2015-09-09 22:00:05 -04:00
petervo
f525730187 daemon: Make parts of cli use the daemon 2015-09-09 22:00:04 -04:00
Colin Walters
e414be8ae2 Move diff printing code into client
This is a step forward to deduplicating; the client tooling now calls
into the public API for diffs, rather than using the older internal
function.

Note: this patch also links the client against the public library.
2015-04-23 16:30:18 -04:00
Colin Walters
a8a2049443 build: Split up src into app/ and libpriv/
We currently have an internal-only library, but the sources for it are
in the same dir as the app.  For future work on a public shared
library, we'll need a clearer source structure.

Start by just renaming the app files into `src/app/`, and the internal
private library into `src/libpriv/`, with the appropriate
`Makefile.am` changes.

Closes: https://github.com/projectatomic/rpm-ostree/pull/123
2015-04-08 16:17:06 -04:00