Support parallel installations. The idea is that for CAD screener, we want
to be able to install this on the same machine as a standard AVOT setup
(most notably for John's laptop). To allow for the possibility of a second
application that might have the same requirements, we add the concept of
vendor-specific distributions. Thus we can have one distribution for CAD
screener and one for The Next Big Thing. It doesn't seem trivial to have
both CAD screener and AVOT under the same vendor tag so we'll have to have
AVOT under "City Occupational" and CAD screener under "City Occupational Ltd"
or some such kludge.
Most of this is done although we are very short of test cases (in particular
we don't test that it's actually possible to install CAD screener in parallel
with AVOT or to update either of them once installed, which is fundamental).
We also have a lot of baggage left over, including an intercept of razor_set.
The problem that this was introduced to debug has been fixed but it looks
like there are a number of memory leaks which it might be useful to help
track down so it has been left in place for now.
There is still a lot of confusion in plover between path-based and URI-based
API. We should review the API, decide what we want and have a general clear up.
There is also confusion as to the purpose of RAZOR_ROOT (and meaning; path or
URI). This is not used at all in librazor (although it is used in razor.exe).
Ideally we shouldn't use it in plover or plover-gtk either although again, we
might want to support it or an equivalent in (some of) the various executables.
Work that would still to nice to do for CAD screener:
- uninstall (ideally as an installed program that hooks into Add/Remove programs
but even re-running the installer would be acceptable).
- xz support (smaller packages).
- repomd.xml and xml:base (would be needed for an Internet installer).
- graphical installer.
2 * Copyright (C) 2014, 2016 J. Ali Harlow <ali@juiblex.co.uk>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <plover/plover.h>
27 #include <plover/transaction.h>
28 #include <plover/packageset.h>
29 #include <plover-gtk/transactionhelper.h>
30 #include "app-manager.h"
32 gboolean setup(const char *base)
37 static PloverTransactionHelper *helper=NULL;
40 helper=plover_transaction_helper_new(ui);
41 plover_transaction_helper_set_base(helper,base);
42 prefix=plover_transaction_helper_get_prefix(helper,&error);
44 g_clear_error(&error);
47 s=g_strconcat(prefix?prefix:"","/var/log/setup",NULL);
51 plover_transaction_helper_set_check_vendor(helper,TRUE);
52 g_signal_connect(helper,"close",G_CALLBACK(gtk_main_quit),NULL);
54 if (!plover_transaction_helper_get_visible(helper))
56 if (!plover_transaction_helper_install_group(helper,"base",&error))
58 if (g_error_matches(error,PLOVER_GENERAL_ERROR,
59 PLOVER_GENERAL_ERROR_NO_WORK))
62 error=g_error_new_literal(PLOVER_GENERAL_ERROR,
63 PLOVER_GENERAL_ERROR_NO_WORK,
64 "All packages already installed");
65 plover_transaction_helper_set_error(helper,error,
66 "Software installation");
68 else if (g_error_matches(error,PLOVER_GENERAL_ERROR,
69 PLOVER_GENERAL_ERROR_REQUIREMENTS_NOT_MET))
72 error=g_error_new_literal(PLOVER_GENERAL_ERROR,
73 PLOVER_GENERAL_ERROR_REQUIREMENTS_NOT_MET,
74 "Software cannot be installed because of missing updates. "
75 "Installing all updates first should resolve this problem");
76 plover_transaction_helper_set_error(helper,error,
77 "Software installation failed");
80 plover_transaction_helper_set_error(helper,error,
81 "Software installation failed");
85 plover_transaction_helper_present(helper);