"path",
"arch",
"logger",
- "interactive",
"offline",
"conf",
"build",
const char* path = NULL;
const char* arch = NULL;
const char* conf = NULL;
- int interactive = 0;
int offline = 0;
int build = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "|zzOppzpO", kwlist,
- &path, &arch, &self->callbacks.log, &interactive, &offline, &conf, &build,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|zzOpzpO", kwlist,
+ &path, &arch, &self->callbacks.log, &offline, &conf, &build,
&self->callbacks.confirm))
return -1;
int flags = 0;
- // Enable interactive mode
- if (interactive)
- flags |= PAKFIRE_FLAGS_INTERACTIVE;
-
// Enable offline mode
if (offline)
flags |= PAKFIRE_FLAGS_OFFLINE;
DEBUG(archive->pakfire, "Extracting %s to %s\n", archive->path, path);
// Create a progressbar
- if (pakfire_has_flag(archive->pakfire, PAKFIRE_FLAGS_INTERACTIVE)) {
- r = pakfire_archive_extract_progressbar(archive, &progressbar);
- if (r)
- goto ERROR;
- }
+ r = pakfire_archive_extract_progressbar(archive, &progressbar);
+ if (r)
+ goto ERROR;
// Open payload
payload = pakfire_archive_open_payload(archive, &a, &size);
r = pakfire_build_stage(build, makefile, *stage);
if (r) {
// Drop to a shell for debugging
- if (pakfire_has_flag(build->pakfire, PAKFIRE_FLAGS_INTERACTIVE))
+ if (pakfire_has_flag(build->pakfire, PAKFIRE_BUILD_INTERACTIVE))
pakfire_build_shell(build);
goto ERROR;
#include <pakfire/repolist.h>
enum pakfire_flags {
- PAKFIRE_FLAGS_INTERACTIVE = (1 << 0),
PAKFIRE_FLAGS_OFFLINE = (1 << 1),
PAKFIRE_FLAGS_BUILD = (1 << 2),
};
DEBUG(p, " arch = %s\n", pakfire_get_arch(p));
DEBUG(p, " path = %s\n", pakfire_get_path(p));
- // Automatically disable interactive mode
- if (pakfire_has_flag(p, PAKFIRE_FLAGS_INTERACTIVE)) {
- if (pakfire_tty_is_noninteractive()) {
- DEBUG(p, "Interactive mode disabled\n");
-
- flags &= ~PAKFIRE_FLAGS_INTERACTIVE;
- }
- }
-
// Fetch sub UID/GIDs
if (!pakfire_on_root(p)) {
// UID
if (r)
goto ERROR;
- // Setup build stuff
- if (pakfire_has_flag(p, PAKFIRE_FLAGS_BUILD)) {
- // Builds are never interactive
- p->flags &= ~PAKFIRE_FLAGS_INTERACTIVE;
- }
-
*pakfire = p;
return 0;
return 0;
// Skip this, if running in non-interactive mode
+#if 0
if (!pakfire_has_flag(pakfire, PAKFIRE_FLAGS_INTERACTIVE))
return 0;
+#endif
// Run callback
return pakfire->callbacks.confirm(
char* dump = pakfire_transaction_dump(transaction, 80);
// Check if we should continue
- if (pakfire_has_flag(transaction->pakfire, PAKFIRE_FLAGS_INTERACTIVE)) {
- r = pakfire_confirm(transaction->pakfire, dump, _("Is this okay? [y/N]"));
- if (r) {
- ERROR(transaction->pakfire, "Transaction aborted upon user request\n");
- goto ERROR;
- }
+ r = pakfire_confirm(transaction->pakfire, dump, _("Is this okay? [y/N]"));
+ if (r) {
+ ERROR(transaction->pakfire, "Transaction aborted upon user request\n");
+ goto ERROR;
}
// Write transaction dump to log
static int pakfire_ui_enter_number(struct pakfire* pakfire, const char* question,
unsigned int* choice, unsigned int min, unsigned int max) {
- // Skip this, if running in non-interactive mode
- if (!pakfire_has_flag(pakfire, PAKFIRE_FLAGS_INTERACTIVE))
- return 0;
-
char* line = NULL;
size_t length = 0;
char* remainder = NULL;
free(solutions);
}
- // Skip this, if running in non-interactive mode
- if (!pakfire_has_flag(pakfire, PAKFIRE_FLAGS_INTERACTIVE)) {
- r = 1;
- goto ERROR;
- }
-
unsigned int choice = 0;
// Let the user choose which solution they want