Merge lp:~townsend/libertine/1.0.1 into lp:libertine/trunk

Proposed by Christopher Townsend
Status: Merged
Approved by: Stephen M. Webb
Approved revision: 124
Merged at revision: 124
Proposed branch: lp:~townsend/libertine/1.0.1
Merge into: lp:libertine/trunk
Diff against target: 1885 lines (+656/-378)
22 files modified
data/puritine-click.conf (+9/-4)
debian/changelog (+26/-0)
libertine/ContainerConfig.cpp (+2/-1)
libertine/ContainerConfig.h (+2/-2)
libertine/ContainerManager.cpp (+3/-3)
libertine/ContainerManager.h (+3/-3)
libertine/main.cpp (+8/-0)
libertine/qml/ContainerApps.qml (+0/-27)
libertine/qml/ContainerInfoView.qml (+1/-1)
libertine/qml/ContainersView.qml (+15/-9)
libertine/qml/ExtraArchivesView.qml (+26/-9)
libertine/qml/HomeView.qml (+32/-21)
libertine/qml/ManageContainer.qml (+53/-4)
libertine/qml/PackageInfoView.qml (+0/-34)
libertine/qml/PackageOperationFailureDialog.qml (+36/-0)
libertine/qml/SearchResultsView.qml (+2/-0)
libertine/qml/libertine.qml (+19/-1)
po/en_US.po (+89/-53)
po/libertine.pot (+200/-175)
python/libertine/ChrootContainer.py (+4/-4)
python/libertine/Libertine.py (+41/-15)
tools/libertine-container-manager (+85/-12)
To merge this branch: bzr merge lp:~townsend/libertine/1.0.1
Reviewer Review Type Date Requested Status
Stephen M. Webb (community) Approve
Review via email: mp+292840@code.launchpad.net

Commit message

* Allow an explicitly set distro during the create operation if it matches the host's distro even if the distro is technically end-of-life. (LP: #1569397)
* More Libertine GUI improvements.
* Check to make sure a subcommand was given and if not, print out the usage. (LP: #1539104)
* Check to see if CLI and GUI is ran using sudo and if so, print a message and exit. (LP: #1570548)
* Catch runtime errors raised when starting a container so a crash file is not generated and to tell the GUI that there was an error so the user can be presented a proper notification. (LP: #1539105)
* Use shutil.which() instead of hardcoded path for detecting if proot is on the system. Fixes alternate $PATH locations such as in a snap. (LP: #1572591)
* Add a 'merge-configs' command to l-c-m which allows merging a specified ContainersConfig.json file with the existing config file. (LP: #1566391)
* Have the Puritine click linking occur before Unity 8 is started to avoid having a 0-byte ContainersConfig.json file from being created. (LP: #1573266)
* Fixing infinite package removal on error caused by bad apt command and variable access. (LP: #1573201)

To post a comment you must log in.
Revision history for this message
Stephen M. Webb (bregma) wrote :

OK, I se nothing nefarious here.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/puritine-click.conf'
--- data/puritine-click.conf 2016-03-02 13:23:42 +0000
+++ data/puritine-click.conf 2016-04-25 17:15:41 +0000
@@ -1,6 +1,6 @@
1description "Puritine Click chroot linking"1description "Puritine Click chroot linking"
22
3start on started unity83start on starting unity8
44
5script5script
6PACKAGE_PATH=`click pkgdir com.ubuntu.puritine`6PACKAGE_PATH=`click pkgdir com.ubuntu.puritine`
@@ -14,10 +14,15 @@
14 ln -s $CHROOT_PATH/rootfs $HOME/.cache/libertine-container/$CONTAINER_NAME/rootfs14 ln -s $CHROOT_PATH/rootfs $HOME/.cache/libertine-container/$CONTAINER_NAME/rootfs
15 fi15 fi
1616
17 # Link the container config17 # Copy or merge the container config files
18 if [ ! -L $HOME/.local/share/libertine/ContainersConfig.json ] ; then18 if [ ! -e $HOME/.local/share/libertine/ContainersConfig.json ] ; then
19 mkdir -p $HOME/.local/share/libertine/19 mkdir -p $HOME/.local/share/libertine/
20 ln -s $PACKAGE_PATH/libertine-config/libertine/ContainersConfig.json $HOME/.local/share/libertine/ContainersConfig.json20 cp $PACKAGE_PATH/libertine-config/libertine/ContainersConfig.json $HOME/.local/share/libertine/ContainersConfig.json
21 elif [ -L $HOME/.local/share/libertine/ContainersConfig.json ] ; then
22 rm $HOME/.local/share/libertine/ContainersConfig.json
23 cp $PACKAGE_PATH/libertine-config/libertine/ContainersConfig.json $HOME/.local/share/libertine/ContainersConfig.json
24 else
25 libertine-container-manager merge-configs -f $PACKAGE_PATH/libertine-config/libertine/ContainersConfig.json
21 fi26 fi
2227
23 # Create and copy the user-data dir from the click package28 # Create and copy the user-data dir from the click package
2429
=== modified file 'debian/changelog'
--- debian/changelog 2016-04-11 16:05:03 +0000
+++ debian/changelog 2016-04-25 17:15:41 +0000
@@ -1,3 +1,29 @@
1libertine (1.0.1-0ubuntu1) UNRELEASED; urgency=medium
2
3 [ Chris Townsend ]
4 * Allow an explicitly set distro during the create operation if it matches the
5 host's distro even if the distro is technically end-of-life. (LP: #1569397)
6 * More Libertine GUI improvements.
7 * Check to make sure a subcommand was given and if not, print out the usage.
8 (LP: #1539104)
9 * Check to see if CLI and GUI is ran using sudo and if so, print a message and
10 exit. (LP: #1570548)
11 * Catch runtime errors raised when starting a container so a crash file is not
12 generated and to tell the GUI that there was an error so the user can be
13 presented a proper notification. (LP: #1539105)
14 * Use shutil.which() instead of hardcoded path for detecting if proot is on the
15 system. Fixes alternate $PATH locations such as in a snap. (LP: #1572591)
16 * Add a 'merge-configs' command to l-c-m which allows merging a specified
17 ContainersConfig.json file with the existing config file. (LP: #1566391)
18 * Have the Puritine click linking occur before Unity 8 is started to avoid having
19 a 0-byte ContainersConfig.json file from being created. (LP: #1573266)
20
21 [ Larry Price ]
22 * Fixing infinite package removal on error caused by bad apt command and variable
23 access. (LP: #1573201)
24
25 -- Chris Townsend <christopher.townsend@canonical.com> Mon, 25 Apr 2016 12:49:22 -0400
26
1libertine (1.0.0+16.04.20160411-0ubuntu1) xenial; urgency=medium27libertine (1.0.0+16.04.20160411-0ubuntu1) xenial; urgency=medium
228
3 [ Chris Townsend ]29 [ Chris Townsend ]
430
=== modified file 'libertine/ContainerConfig.cpp'
--- libertine/ContainerConfig.cpp 2016-03-10 21:33:25 +0000
+++ libertine/ContainerConfig.cpp 2016-04-25 17:15:41 +0000
@@ -3,7 +3,7 @@
3 * @brief Libertine Manager containers configuration module3 * @brief Libertine Manager containers configuration module
4 */4 */
5/*5/*
6 * Copyright 2015 Canonical Ltd6 * Copyright 2015-2016 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -147,6 +147,7 @@
147 { QObject::tr("new"), ContainerConfig::InstallStatus::New },147 { QObject::tr("new"), ContainerConfig::InstallStatus::New },
148 { QObject::tr("installing"), ContainerConfig::InstallStatus::Installing },148 { QObject::tr("installing"), ContainerConfig::InstallStatus::Installing },
149 { QObject::tr("ready"), ContainerConfig::InstallStatus::Ready },149 { QObject::tr("ready"), ContainerConfig::InstallStatus::Ready },
150 { QObject::tr("updating"), ContainerConfig::InstallStatus::Updating },
150 { QObject::tr("removing"), ContainerConfig::InstallStatus::Removing },151 { QObject::tr("removing"), ContainerConfig::InstallStatus::Removing },
151 { QObject::tr("removed"), ContainerConfig::InstallStatus::Removed },152 { QObject::tr("removed"), ContainerConfig::InstallStatus::Removed },
152 { QObject::tr("failed"), ContainerConfig::InstallStatus::Failed },153 { QObject::tr("failed"), ContainerConfig::InstallStatus::Failed },
153154
=== modified file 'libertine/ContainerConfig.h'
--- libertine/ContainerConfig.h 2016-03-10 21:33:25 +0000
+++ libertine/ContainerConfig.h 2016-04-25 17:15:41 +0000
@@ -3,7 +3,7 @@
3 * @brief Libertine Manager containers configuration module3 * @brief Libertine Manager containers configuration module
4 */4 */
5/*5/*
6 * Copyright 2015 Canonical Ltd6 * Copyright 2015-2016 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -88,7 +88,7 @@
88public:88public:
89 /** The container's current install state. */89 /** The container's current install state. */
90 enum class InstallStatus90 enum class InstallStatus
91 { New, Installing, Ready, Removing, Removed, Failed };91 { New, Installing, Ready, Updating, Removing, Removed, Failed };
9292
9393
94public:94public:
9595
=== modified file 'libertine/ContainerManager.cpp'
--- libertine/ContainerManager.cpp 2016-04-01 17:48:28 +0000
+++ libertine/ContainerManager.cpp 2016-04-25 17:15:41 +0000
@@ -3,7 +3,7 @@
3 * @brief Threaded Libertine container manager3 * @brief Threaded Libertine container manager
4 */4 */
5/*5/*
6 * Copyright 2015 Canonical Ltd6 * Copyright 2015-2016 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -289,7 +289,7 @@
289 result = false;289 result = false;
290 }290 }
291291
292 emit finishedInstall(result, QString(error_msg));292 emit finishedInstall(package_name, result, QString(error_msg));
293 emit finished();293 emit finished();
294 quit();294 quit();
295}295}
@@ -319,7 +319,7 @@
319 result = false;319 result = false;
320 }320 }
321321
322 emit finishedRemove(result, QString(error_msg));322 emit finishedRemove(package_name, result, QString(error_msg));
323 emit finished();323 emit finished();
324 quit();324 quit();
325}325}
326326
=== modified file 'libertine/ContainerManager.h'
--- libertine/ContainerManager.h 2016-03-16 19:56:23 +0000
+++ libertine/ContainerManager.h 2016-04-25 17:15:41 +0000
@@ -3,7 +3,7 @@
3 * @brief Threaded Libertine container manager3 * @brief Threaded Libertine container manager
4 */4 */
5/*5/*
6 * Copyright 2015 Canonical Ltd6 * Copyright 2015-2016 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -150,8 +150,8 @@
150 void dataListChanged();150 void dataListChanged();
151 void finished();151 void finished();
152 void finishedDestroy(QString const& container_id);152 void finishedDestroy(QString const& container_id);
153 void finishedInstall(bool result, QString const& error_msg);153 void finishedInstall(QString const& package_name, bool result, QString const& error_msg);
154 void finishedRemove(bool result, QString const& error_msg);154 void finishedRemove(QString const& package_name, bool result, QString const& error_msg);
155 void finishedSearch(bool result, QList<QString> packageList);155 void finishedSearch(bool result, QList<QString> packageList);
156 void finishedCommand(QString const& command_output);156 void finishedCommand(QString const& command_output);
157 void finishedConfigure(bool result, QString const& error_msg);157 void finishedConfigure(bool result, QString const& error_msg);
158158
=== modified file 'libertine/main.cpp'
--- libertine/main.cpp 2015-05-13 13:42:12 +0000
+++ libertine/main.cpp 2016-04-25 17:15:41 +0000
@@ -19,10 +19,18 @@
19#include "libertine/config.h"19#include "libertine/config.h"
20#include "libertine/libertine.h"20#include "libertine/libertine.h"
2121
22#include <unistd.h>
23#include <QtCore/QDebug>
2224
23int25int
24main(int argc, char* argv[])26main(int argc, char* argv[])
25{27{
28 if (!geteuid())
29 {
30 qWarning() << "Please do not run " LIBERTINE_APPLICATION_NAME " using \'sudo\'.";
31 exit(1);
32 }
33
26 Libertine app(argc, argv);34 Libertine app(argc, argv);
27 return app.exec();35 return app.exec();
28}36}
2937
=== removed file 'libertine/qml/ContainerApps.qml'
--- libertine/qml/ContainerApps.qml 2015-07-09 15:22:37 +0000
+++ libertine/qml/ContainerApps.qml 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1/**
2 * @file ContainerApps.qml
3 * @brief Libertine container apps data source
4 */
5/*
6 * Copyright 2015 Canonical Ltd
7 *
8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the
10 * Free Software Foundation.
11 *
12 * Libertine is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19import QtQuick 2.4
20
21Item {
22 function are_apps_installed(containerId) {
23 var documentIds = {}
24
25 return documentIds.length > 0
26 }
27}
280
=== modified file 'libertine/qml/ContainerInfoView.qml'
--- libertine/qml/ContainerInfoView.qml 2016-04-07 12:45:29 +0000
+++ libertine/qml/ContainerInfoView.qml 2016-04-25 17:15:41 +0000
@@ -25,7 +25,7 @@
2525
26Page {26Page {
27 id: containerInfoView27 id: containerInfoView
28 title: i18n.tr("Container information for %1").arg(mainView.currentContainer)28 title: i18n.tr("Container information for %1").arg(containerConfigList.getContainerName(mainView.currentContainer))
29 property string currentContainer: mainView.currentContainer29 property string currentContainer: mainView.currentContainer
30 property string containerDistroText: containerConfigList.getContainerDistro(currentContainer)30 property string containerDistroText: containerConfigList.getContainerDistro(currentContainer)
31 property string containerNameText: containerConfigList.getContainerName(currentContainer)31 property string containerNameText: containerConfigList.getContainerName(currentContainer)
3232
=== modified file 'libertine/qml/ContainersView.qml'
--- libertine/qml/ContainersView.qml 2016-03-16 19:56:23 +0000
+++ libertine/qml/ContainersView.qml 2016-04-25 17:15:41 +0000
@@ -45,21 +45,25 @@
45 model: containerConfigList45 model: containerConfigList
4646
47 delegate: ListItem {47 delegate: ListItem {
48 Label {
49 text: name
50 anchors {
51 verticalCenter: parent.verticalCenter
52 left: parent.left
53 leftMargin: units.gu(2)
54 }
55 }
48 ActivityIndicator {56 ActivityIndicator {
49 id: containerActivity57 id: containerActivity
50 anchors.verticalCenter: parent.verticalCenter58 anchors {
59 verticalCenter: parent.verticalCenter
60 right: parent.right
61 rightMargin: units.gu(2)
62 }
51 visible: (installStatus === i18n.tr("installing") ||63 visible: (installStatus === i18n.tr("installing") ||
52 installStatus === i18n.tr("removing")) ? true : false64 installStatus === i18n.tr("removing")) ? true : false
53 running: containerActivity.visible65 running: containerActivity.visible
54 }66 }
55 Label {
56 text: name
57 anchors {
58 verticalCenter: parent.verticalCenter
59 left: containerActivity.running ? containerActivity.right : parent.left
60 leftMargin: units.gu(2)
61 }
62 }
6367
64 leadingActions: ListItemActions {68 leadingActions: ListItemActions {
65 actions: [69 actions: [
@@ -94,6 +98,8 @@
94 iconName: "edit"98 iconName: "edit"
95 text: i18n.tr("edit")99 text: i18n.tr("edit")
96 description: i18n.tr("Container Apps")100 description: i18n.tr("Container Apps")
101 visible: (installStatus === i18n.tr("ready") ||
102 installStatus === i18n.tr("updating")) ? true : false
97 onTriggered: {103 onTriggered: {
98 mainView.currentContainer = containerId104 mainView.currentContainer = containerId
99 containerAppsList.setContainerApps(mainView.currentContainer)105 containerAppsList.setContainerApps(mainView.currentContainer)
100106
=== modified file 'libertine/qml/ExtraArchivesView.qml'
--- libertine/qml/ExtraArchivesView.qml 2016-03-10 21:33:25 +0000
+++ libertine/qml/ExtraArchivesView.qml 2016-04-25 17:15:41 +0000
@@ -72,23 +72,28 @@
72 UbuntuListView {72 UbuntuListView {
73 id: extraArchiveList73 id: extraArchiveList
74 anchors.fill: parent74 anchors.fill: parent
75 visible: !containerArchivesList.empty() ? true : false
75 model: containerArchivesList76 model: containerArchivesList
76 delegate: ListItem {77 delegate: ListItem {
78 Label {
79 anchors {
80 verticalCenter: parent.verticalCenter
81 left: parent.left
82 leftMargin: units.gu(2)
83 }
84 text: archiveName
85 }
77 ActivityIndicator {86 ActivityIndicator {
78 id: extraArchiveActivity87 id: extraArchiveActivity
79 anchors.verticalCenter: parent.verticalCenter88 anchors {
89 verticalCenter: parent.verticalCenter
90 right: parent.right
91 rightMargin: units.gu(2)
92 }
80 visible: (archiveStatus === i18n.tr("installing") ||93 visible: (archiveStatus === i18n.tr("installing") ||
81 archiveStatus === i18n.tr("removing")) ? true : false94 archiveStatus === i18n.tr("removing")) ? true : false
82 running: extraArchiveActivity.visible95 running: extraArchiveActivity.visible
83 }96 }
84 Label {
85 anchors {
86 verticalCenter: parent.verticalCenter
87 left: extraArchiveActivity.running ? extraArchiveActivity.right : parent.left
88 leftMargin: units.gu(2)
89 }
90 text: archiveName
91 }
92 leadingActions: ListItemActions {97 leadingActions: ListItemActions {
93 actions: [98 actions: [
94 Action {99 Action {
@@ -104,6 +109,16 @@
104 }109 }
105 }110 }
106111
112 Label {
113 id: emptyLabel
114 anchors.centerIn: parent
115 visible: !extraArchiveList.visible ? true : false
116 wrapMode: Text.Wrap
117 width: parent.width
118 horizontalAlignment: Text.AlignHCenter
119 text: i18n.tr("No additional archives and PPA's have been added")
120 }
121
107 function addArchive(archive) {122 function addArchive(archive) {
108 var comp = Qt.createComponent("ContainerManager.qml")123 var comp = Qt.createComponent("ContainerManager.qml")
109 worker = comp.createObject(mainView, {"containerAction": ContainerManagerWorker.Configure,124 worker = comp.createObject(mainView, {"containerAction": ContainerManagerWorker.Configure,
@@ -154,6 +169,8 @@
154169
155 function reloadArchives() {170 function reloadArchives() {
156 containerArchivesList.setContainerArchives(mainView.currentContainer)171 containerArchivesList.setContainerArchives(mainView.currentContainer)
172
173 extraArchiveList.visible = !containerArchivesList.empty() ? true : false
157 }174 }
158175
159 function finishedConfigure(result, error_msg) {176 function finishedConfigure(result, error_msg) {
160177
=== modified file 'libertine/qml/HomeView.qml'
--- libertine/qml/HomeView.qml 2016-04-08 20:16:41 +0000
+++ libertine/qml/HomeView.qml 2016-04-25 17:15:41 +0000
@@ -24,7 +24,7 @@
2424
25Page {25Page {
26 id: homeView26 id: homeView
27 title: i18n.tr("Classic Apps - %1").arg(mainView.currentContainer)27 title: i18n.tr("Classic Apps - %1").arg(containerConfigList.getContainerName(mainView.currentContainer))
2828
29 head.actions: [29 head.actions: [
30 Action {30 Action {
@@ -99,15 +99,15 @@
99 ActionSelectionPopover {99 ActionSelectionPopover {
100 actions: ActionList {100 actions: ActionList {
101 Action {101 Action {
102 text: i18n.tr("Configure Container")102 text: i18n.tr("Manage Container")
103 onTriggered: {103 onTriggered: {
104 pageStack.push(Qt.resolvedUrl("ConfigureContainer.qml"))104 pageStack.push(Qt.resolvedUrl("ManageContainer.qml"))
105 }105 }
106 }106 }
107 Action {107 Action {
108 text: i18n.tr("Update Container")108 text: i18n.tr("Container Information")
109 onTriggered: {109 onTriggered: {
110 updateContainer()110 pageStack.push(Qt.resolvedUrl("ContainerInfoView.qml"))
111 }111 }
112 }112 }
113 Action {113 Action {
@@ -159,27 +159,35 @@
159159
160 function reloadAppList() {160 function reloadAppList() {
161 containerAppsList.setContainerApps(mainView.currentContainer)161 containerAppsList.setContainerApps(mainView.currentContainer)
162
163 appsList.visible = !containerAppsList.empty() ? true : false
162 }164 }
163165
164 UbuntuListView {166 UbuntuListView {
167 id: appsList
165 anchors.fill: parent168 anchors.fill: parent
166 model: containerAppsList169 model: containerAppsList
170 visible: !containerAppsList.empty() ? true : false
167 delegate: ListItem {171 delegate: ListItem {
172 Label {
173 text: packageName
174 anchors {
175 verticalCenter: parent.verticalCenter
176 left: parent.left
177 leftMargin: units.gu(2)
178 }
179 }
168 ActivityIndicator {180 ActivityIndicator {
169 id: appActivity181 id: appActivity
170 anchors.verticalCenter: parent.verticalCenter182 anchors {
183 verticalCenter: parent.verticalCenter
184 right: parent.right
185 rightMargin: units.gu(2)
186 }
171 visible: (appStatus === i18n.tr("installing") ||187 visible: (appStatus === i18n.tr("installing") ||
172 appStatus === i18n.tr("removing")) ? true : false188 appStatus === i18n.tr("removing")) ? true : false
173 running: appActivity.visible189 running: appActivity.visible
174 }190 }
175 Label {
176 text: packageName
177 anchors {
178 verticalCenter: parent.verticalCenter
179 left: appActivity.running ? appActivity.right : parent.left
180 leftMargin: units.gu(2)
181 }
182 }
183 leadingActions: ListItemActions {191 leadingActions: ListItemActions {
184 actions: [192 actions: [
185 Action {193 Action {
@@ -189,7 +197,6 @@
189 onTriggered: {197 onTriggered: {
190 mainView.currentPackage = packageName198 mainView.currentPackage = packageName
191 removePackage(packageName)199 removePackage(packageName)
192 pageStack.push(Qt.resolvedUrl("PackageInfoView.qml"))
193 }200 }
194 }201 }
195 ]202 ]
@@ -210,12 +217,14 @@
210 }217 }
211 }218 }
212219
213 function updateContainer() {220 Label {
214 var comp = Qt.createComponent("ContainerManager.qml")221 id: emptyLabel
215 var worker = comp.createObject(mainView, {"containerAction": ContainerManagerWorker.Update,222 anchors.centerIn: parent
216 "containerId": mainView.currentContainer,223 visible: !appsList.visible
217 "containerType": containerConfigList.getContainerType(mainView.currentContainer)})224 wrapMode: Text.Wrap
218 worker.start()225 width: parent.width
226 horizontalAlignment: Text.AlignHCenter
227 text: i18n.tr("No packages are installed")
219 }228 }
220229
221 function installPackage(package_name) {230 function installPackage(package_name) {
@@ -224,6 +233,7 @@
224 "containerId": mainView.currentContainer,233 "containerId": mainView.currentContainer,
225 "containerType": containerConfigList.getContainerType(mainView.currentContainer),234 "containerType": containerConfigList.getContainerType(mainView.currentContainer),
226 "data": package_name})235 "data": package_name})
236 worker.finishedInstall.connect(mainView.packageInstallFinished)
227 worker.start()237 worker.start()
228 }238 }
229239
@@ -233,6 +243,7 @@
233 "containerId": mainView.currentContainer,243 "containerId": mainView.currentContainer,
234 "containerType": containerConfigList.getContainerType(mainView.currentContainer),244 "containerType": containerConfigList.getContainerType(mainView.currentContainer),
235 "data": packageName})245 "data": packageName})
246 worker.finishedRemove.connect(mainView.packageRemoveFinished)
236 worker.start()247 worker.start()
237 }248 }
238}249}
239250
=== renamed file 'libertine/qml/ConfigureContainer.qml' => 'libertine/qml/ManageContainer.qml'
--- libertine/qml/ConfigureContainer.qml 2016-04-07 20:39:10 +0000
+++ libertine/qml/ManageContainer.qml 2016-04-25 17:15:41 +0000
@@ -1,6 +1,6 @@
1/**1/**
2 * @file ConfigureContainer.qml2 * @file ManageContainer.qml
3 * @brief Libertine configure container view3 * @brief Libertine manage container view
4 */4 */
5/*5/*
6 * Copyright 2016 Canonical Ltd6 * Copyright 2016 Canonical Ltd
@@ -23,8 +23,8 @@
2323
2424
25Page {25Page {
26 id: configureView26 id: manageView
27 title: i18n.tr("Configure %1").arg(mainView.currentContainer)27 title: i18n.tr("Manage %1").arg(containerConfigList.getContainerName(mainView.currentContainer))
2828
29 Column {29 Column {
30 anchors.left: parent.left30 anchors.left: parent.left
@@ -63,5 +63,54 @@
63 pageStack.push(Qt.resolvedUrl("ExtraArchivesView.qml"))63 pageStack.push(Qt.resolvedUrl("ExtraArchivesView.qml"))
64 }64 }
65 }65 }
66
67 ListItem.Standard {
68 control: Button {
69 id: updateButton
70 text: i18n.tr("Update…")
71 visible: (containerConfigList.getContainerStatus(mainView.currentContainer) === i18n.tr("ready")) ? true : false
72 onClicked: {
73 updateContainer()
74 }
75 }
76 ActivityIndicator {
77 id: updateActivity
78 anchors {
79 verticalCenter: parent.verticalCenter
80 right: parent.right
81 rightMargin: units.gu(2)
82 }
83 visible: (containerConfigList.getContainerStatus(mainView.currentContainer) === i18n.tr("updating")) ? true : false
84 running: updateActivity.visible
85 }
86 text: i18n.tr("Update container")
87 }
88 }
89
90 Component.onCompleted: {
91 containerConfigList.configChanged.connect(updateStatus)
92 }
93
94 Component.onDestruction: {
95 containerConfigList.configChanged.disconnect(updateStatus)
96 }
97
98 function updateContainer() {
99 var comp = Qt.createComponent("ContainerManager.qml")
100 var worker = comp.createObject(mainView, {"containerAction": ContainerManagerWorker.Update,
101 "containerId": mainView.currentContainer,
102 "containerType": containerConfigList.getContainerType(mainView.currentContainer)})
103 worker.start()
104 }
105
106 function updateStatus() {
107 if (containerConfigList.getContainerStatus(mainView.currentContainer) === i18n.tr("updating")) {
108 updateButton.visible = false
109 updateActivity.visible = true
110 }
111 else if (containerConfigList.getContainerStatus(mainView.currentContainer) === i18n.tr("ready")) {
112 updateButton.visible = true
113 updateActivity.visible = false
114 }
66 }115 }
67}116}
68117
=== modified file 'libertine/qml/PackageInfoView.qml'
--- libertine/qml/PackageInfoView.qml 2016-04-07 19:17:30 +0000
+++ libertine/qml/PackageInfoView.qml 2016-04-25 17:15:41 +0000
@@ -29,10 +29,8 @@
29 property string currentContainer: mainView.currentContainer29 property string currentContainer: mainView.currentContainer
30 property var currentPackage: mainView.currentPackage30 property var currentPackage: mainView.currentPackage
31 property var statusText: containerConfigList.getAppStatus(currentContainer, currentPackage)31 property var statusText: containerConfigList.getAppStatus(currentContainer, currentPackage)
32 property var failureReasonText: ""
33 property var packageVersionText: i18n.tr("Obtaining package version…")32 property var packageVersionText: i18n.tr("Obtaining package version…")
34 property var worker: null33 property var worker: null
35 property var install_signal: null
3634
3735
38 Flickable {36 Flickable {
@@ -60,26 +58,10 @@
60 text: statusText58 text: statusText
61 }59 }
62 }60 }
63
64 ListItem.Standard {
65 id: failureReason
66 text: i18n.tr("Failure reason")
67 visible: false
68 control: Label {
69 text: failureReasonText
70 wrapMode: Text.Wrap
71 width: parent.parent.width/2
72 horizontalAlignment: Qt.AlignRight
73 onHeightChanged: updateFailureReasonHeight()
74 }
75 }
76 }61 }
77 }62 }
7863
79 Component.onCompleted: {64 Component.onCompleted: {
80 if (install_signal) {
81 install_signal.connect(installFinished)
82 }
83 containerConfigList.configChanged.connect(reloadStatus)65 containerConfigList.configChanged.connect(reloadStatus)
84 var command = "apt-cache policy " + currentPackage66 var command = "apt-cache policy " + currentPackage
85 var comp = Qt.createComponent("ContainerManager.qml")67 var comp = Qt.createComponent("ContainerManager.qml")
@@ -94,13 +76,6 @@
94 Component.onDestruction: {76 Component.onDestruction: {
95 containerConfigList.configChanged.disconnect(reloadStatus)77 containerConfigList.configChanged.disconnect(reloadStatus)
96 worker.finishedCommand.disconnect(getPackageVersion)78 worker.finishedCommand.disconnect(getPackageVersion)
97 if (install_signal) {
98 install_signal.disconnect(installFinished)
99 }
100 }
101
102 function updateFailureReasonHeight() {
103 failureReason.height = Math.max(failureReason.control.height + 10, 48)
104 }79 }
10580
106 function reloadStatus() {81 function reloadStatus() {
@@ -114,13 +89,4 @@
114 function getPackageVersion(command_output) {89 function getPackageVersion(command_output) {
115 packageVersionText = containerConfigList.getAppVersion(command_output)90 packageVersionText = containerConfigList.getAppVersion(command_output)
116 }91 }
117
118 function installFinished(success, error_msg) {
119 if (!success) {
120 statusText = i18n.tr("failed")
121 failureReasonText = error_msg
122 failureReason.visible = true
123 }
124 install_signal.disconnect(installFinished)
125 }
126}92}
12793
=== added file 'libertine/qml/PackageOperationFailureDialog.qml'
--- libertine/qml/PackageOperationFailureDialog.qml 1970-01-01 00:00:00 +0000
+++ libertine/qml/PackageOperationFailureDialog.qml 2016-04-25 17:15:41 +0000
@@ -0,0 +1,36 @@
1/**
2 * @file PackageOperationFailureDialog.qml
3 * @brief Libertine package operation failure dialog
4 */
5/*
6 * Copyright 2016 Canonical Ltd
7 *
8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the
10 * Free Software Foundation.
11 *
12 * Libertine is distributed in the hope that it will be useful, but WITHOUT ANY
13 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19import QtQuick 2.4
20import Ubuntu.Components 1.2
21import Ubuntu.Components.Popups 1.2
22
23Dialog {
24 id: packageOperationFailedDialog
25 property var package_name: null
26 property var error_msg: null
27 property var operation: null // Either "installing" or "removing"
28
29 title: i18n.tr("Failure %1 the %2 package.").arg(operation).arg(package_name)
30 text: error_msg
31
32 Button {
33 text: i18n.tr("Dismiss")
34 onClicked: PopupUtils.close(packageOperationFailedDialog)
35 }
36}
037
=== modified file 'libertine/qml/SearchResultsView.qml'
--- libertine/qml/SearchResultsView.qml 2016-03-16 19:56:23 +0000
+++ libertine/qml/SearchResultsView.qml 2016-04-25 17:15:41 +0000
@@ -83,6 +83,8 @@
83 anchors {83 anchors {
84 top: parent.top84 top: parent.top
85 topMargin: units.gu(2)85 topMargin: units.gu(2)
86 left: parent.left
87 leftMargin: units.gu(2)
86 }88 }
87 }89 }
88 Label {90 Label {
8991
=== modified file 'libertine/qml/libertine.qml'
--- libertine/qml/libertine.qml 2016-01-20 17:34:19 +0000
+++ libertine/qml/libertine.qml 2016-04-25 17:15:41 +0000
@@ -3,7 +3,7 @@
3 * @brief Libertine app main view.3 * @brief Libertine app main view.
4 */4 */
5/*5/*
6 * Copyright 2015 Canonical Ltd6 * Copyright 2015-2016 Canonical Ltd
7 *7 *
8 * Libertine is free software: you can redistribute it and/or modify it under8 * Libertine is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU General Public License, version 3, as published by the9 * the terms of the GNU General Public License, version 3, as published by the
@@ -18,6 +18,7 @@
18 */18 */
19import QtQuick 2.419import QtQuick 2.4
20import Ubuntu.Components 1.220import Ubuntu.Components 1.2
21import Ubuntu.Components.Popups 1.2
2122
2223
23MainView {24MainView {
@@ -29,6 +30,9 @@
29 property var currentContainer: undefined30 property var currentContainer: undefined
30 property var currentPackage: undefined31 property var currentPackage: undefined
3132
33 signal packageInstallFinished(string package_name, bool result, string message)
34 signal packageRemoveFinished(string package_name, bool result, string message)
35
32 PageStack {36 PageStack {
33 id: pageStack37 id: pageStack
34 }38 }
@@ -47,4 +51,18 @@
47 pageStack.push(Qt.resolvedUrl("WelcomeView.qml"))51 pageStack.push(Qt.resolvedUrl("WelcomeView.qml"))
48 }52 }
49 }53 }
54
55 onPackageInstallFinished: {
56 if (!result) {
57 PopupUtils.open(Qt.resolvedUrl("PackageOperationFailureDialog.qml"), null,
58 {"package_name": package_name, "error_msg": message, "operation": i18n.tr("installing")})
59 }
60 }
61
62 onPackageRemoveFinished: {
63 if (!result) {
64 PopupUtils.open(Qt.resolvedUrl("PackageOperationFailureDialog.qml"), null,
65 {"package_name": package_name, "error_msg": message, "operation": i18n.tr("removing")})
66 }
67 }
50}68}
5169
=== modified file 'po/en_US.po'
--- po/en_US.po 2016-04-08 20:16:41 +0000
+++ po/en_US.po 2016-04-25 17:15:41 +0000
@@ -7,7 +7,7 @@
7msgstr ""7msgstr ""
8"Project-Id-Version: PACKAGE VERSION\n"8"Project-Id-Version: PACKAGE VERSION\n"
9"Report-Msgid-Bugs-To: \n"9"Report-Msgid-Bugs-To: \n"
10"POT-Creation-Date: 2016-04-08 16:01-0400\n"10"POT-Creation-Date: 2016-04-22 09:44-0400\n"
11"PO-Revision-Date: 2016-03-21 10:21-0400\n"11"PO-Revision-Date: 2016-03-21 10:21-0400\n"
12"Last-Translator: Chris Townsend <christopher.townsend@canonical.com>\n"12"Last-Translator: Chris Townsend <christopher.townsend@canonical.com>\n"
13"Language-Team: English\n"13"Language-Team: English\n"
@@ -25,7 +25,7 @@
25msgid "Add additional PPA"25msgid "Add additional PPA"
26msgstr ""26msgstr ""
2727
28#: ../libertine/qml/ExtraArchivesView.qml:13328#: ../libertine/qml/ExtraArchivesView.qml:148
29msgid "Adding archive failed"29msgid "Adding archive failed"
30msgstr ""30msgstr ""
3131
@@ -33,7 +33,7 @@
33msgid "Additional Archives and PPAs"33msgid "Additional Archives and PPAs"
34msgstr ""34msgstr ""
3535
36#: ../libertine/qml/ConfigureContainer.qml:5936#: ../libertine/qml/ManageContainer.qml:59
37msgid "Additional archives and PPAs"37msgid "Additional archives and PPAs"
38msgstr ""38msgstr ""
3939
@@ -41,14 +41,14 @@
41msgid "Authentication required"41msgid "Authentication required"
42msgstr ""42msgstr ""
4343
44#: ../libertine/qml/DebianPackagePicker.qml:744#: ../libertine/qml/DebianPackagePicker.qml:26
45msgid "Available Debian Packages to Install"45msgid "Available Debian Packages to Install"
46msgstr ""46msgstr ""
4747
48#: ../libertine/qml/ContainerOptionsDialog.qml:75
49#: ../libertine/qml/ContainerPasswordDialog.qml:70
48#: ../libertine/qml/SearchPackagesDialog.qml:5750#: ../libertine/qml/SearchPackagesDialog.qml:57
49#: ../libertine/qml/ContainerPasswordDialog.qml:70
50#: ../libertine/qml/HomeView.qml:86 ../libertine/qml/ExtraArchivesView.qml:6251#: ../libertine/qml/HomeView.qml:86 ../libertine/qml/ExtraArchivesView.qml:62
51#: ../libertine/qml/ContainerOptionsDialog.qml:75
52msgid "Cancel"52msgid "Cancel"
53msgstr ""53msgstr ""
5454
@@ -60,27 +60,24 @@
60msgid "Classic Apps - %1"60msgid "Classic Apps - %1"
61msgstr "Classic Apps - %1"61msgstr "Classic Apps - %1"
6262
63#: ../libertine/qml/ConfigureContainer.qml:27
64msgid "Configure %1"
65msgstr "Configure %1"
66
67#: ../libertine/qml/HomeView.qml:102
68msgid "Configure Container"
69msgstr "Configure Container"
70
71#: ../libertine/qml/ContainerOptionsDialog.qml:2863#: ../libertine/qml/ContainerOptionsDialog.qml:28
72#, fuzzy64#, fuzzy
73msgid "Configure options for container creation."65msgid "Configure options for container creation."
74msgstr "Configure Container"66msgstr "Configure Container"
7567
76#: ../libertine/qml/ContainersView.qml:9668#: ../libertine/qml/ContainersView.qml:100
77msgid "Container Apps"69msgid "Container Apps"
78msgstr "Container Apps"70msgstr "Container Apps"
7971
80#: ../libertine/qml/ContainersView.qml:8772#: ../libertine/qml/ContainersView.qml:91
81msgid "Container Info"73msgid "Container Info"
82msgstr "Container Info"74msgstr "Container Info"
8375
76#: ../libertine/qml/HomeView.qml:108
77#, fuzzy
78msgid "Container Information"
79msgstr "Container information for %1"
80
84#: ../libertine/qml/ContainerOptionsDialog.qml:2781#: ../libertine/qml/ContainerOptionsDialog.qml:27
85#, fuzzy82#, fuzzy
86msgid "Container Options"83msgid "Container Options"
@@ -90,11 +87,12 @@
90msgid "Container information for %1"87msgid "Container information for %1"
91msgstr "Container information for %1"88msgstr "Container information for %1"
9289
93#: ../libertine/qml/ContainersView.qml:6990#: ../libertine/qml/ContainersView.qml:73
94msgid "Delete Container"91msgid "Delete Container"
95msgstr "Delete Container"92msgstr "Delete Container"
9693
97#: ../libertine/qml/ExtraArchivesView.qml:13794#: ../libertine/qml/PackageOperationFailureDialog.qml:33
95#: ../libertine/qml/ExtraArchivesView.qml:152
98msgid "Dismiss"96msgid "Dismiss"
99msgstr ""97msgstr ""
10098
@@ -121,9 +119,11 @@
121msgid "Enter package name or Debian file"119msgid "Enter package name or Debian file"
122msgstr "Please enter the exact package name of the app to install:"120msgstr "Please enter the exact package name of the app to install:"
123121
124#: ../libertine/qml/PackageInfoView.qml:66122#. Either "installing" or "removing"
125msgid "Failure reason"123#: ../libertine/qml/PackageOperationFailureDialog.qml:29
126msgstr ""124#, fuzzy
125msgid "Failure %1 the %2 package."
126msgstr "Information for the %1 package"
127127
128#: ../libertine/qml/ContainerInfoView.qml:48128#: ../libertine/qml/ContainerInfoView.qml:48
129msgid "ID"129msgid "ID"
@@ -137,8 +137,8 @@
137msgid "Install"137msgid "Install"
138msgstr "Install"138msgstr "Install"
139139
140#: ../libertine/qml/DebianPackagePicker.qml:53
140#: ../libertine/qml/SearchResults.qml:42141#: ../libertine/qml/SearchResults.qml:42
141#: ../libertine/qml/DebianPackagePicker.qml:34
142msgid "Install Package"142msgid "Install Package"
143msgstr "Install Package"143msgstr "Install Package"
144144
@@ -147,7 +147,7 @@
147msgid "Install new package"147msgid "Install new package"
148msgstr "Install Package"148msgstr "Install Package"
149149
150#: ../libertine/qml/PackageInfoView.qml:58150#: ../libertine/qml/PackageInfoView.qml:56
151#, fuzzy151#, fuzzy
152msgid "Install status"152msgid "Install status"
153msgstr "Install status: %1"153msgstr "Install status: %1"
@@ -156,6 +156,15 @@
156msgid "Invalid password entered"156msgid "Invalid password entered"
157msgstr ""157msgstr ""
158158
159#: ../libertine/qml/ManageContainer.qml:27
160msgid "Manage %1"
161msgstr ""
162
163#: ../libertine/qml/HomeView.qml:102
164#, fuzzy
165msgid "Manage Container"
166msgstr "My Containers"
167
159#: ../libertine/qml/ContainersView.qml:31168#: ../libertine/qml/ContainersView.qml:31
160msgid "My Containers"169msgid "My Containers"
161msgstr "My Containers"170msgstr "My Containers"
@@ -165,7 +174,7 @@
165msgid "Name"174msgid "Name"
166msgstr "Name: %1"175msgstr "Name: %1"
167176
168#: ../libertine/qml/DebianPackagePicker.qml:53177#: ../libertine/qml/DebianPackagePicker.qml:72
169msgid "No Debian packages available"178msgid "No Debian packages available"
170msgstr ""179msgstr ""
171180
@@ -174,18 +183,27 @@
174msgid "No Search Results Found"183msgid "No Search Results Found"
175msgstr "No search results for %1."184msgstr "No search results for %1."
176185
186#: ../libertine/qml/ExtraArchivesView.qml:119
187msgid "No additional archives and PPA's have been added"
188msgstr ""
189
190#: ../libertine/qml/HomeView.qml:227
191#, fuzzy
192msgid "No packages are installed"
193msgstr "Please enter the exact package name of the app to install:"
194
195#: ../libertine/qml/ContainerOptionsDialog.qml:64
196#: ../libertine/qml/ContainerPasswordDialog.qml:52
177#: ../libertine/qml/SearchPackagesDialog.qml:39197#: ../libertine/qml/SearchPackagesDialog.qml:39
178#: ../libertine/qml/ContainerPasswordDialog.qml:52
179#: ../libertine/qml/HomeView.qml:65 ../libertine/qml/ExtraArchivesView.qml:54198#: ../libertine/qml/HomeView.qml:65 ../libertine/qml/ExtraArchivesView.qml:54
180#: ../libertine/qml/ContainerOptionsDialog.qml:64
181msgid "OK"199msgid "OK"
182msgstr ""200msgstr ""
183201
184#: ../libertine/qml/PackageInfoView.qml:33202#: ../libertine/qml/PackageInfoView.qml:32
185msgid "Obtaining package version…"203msgid "Obtaining package version…"
186msgstr "Obtaining package version…"204msgstr "Obtaining package version…"
187205
188#: ../libertine/qml/HomeView.qml:202206#: ../libertine/qml/HomeView.qml:209
189msgid "Package Info"207msgid "Package Info"
190msgstr "Package Info"208msgstr "Package Info"
191209
@@ -197,7 +215,7 @@
197msgid "Package name or Debian package path"215msgid "Package name or Debian package path"
198msgstr ""216msgstr ""
199217
200#: ../libertine/qml/PackageInfoView.qml:51218#: ../libertine/qml/PackageInfoView.qml:49
201#, fuzzy219#, fuzzy
202msgid "Package version"220msgid "Package version"
203msgstr "Package version: %1"221msgstr "Package version: %1"
@@ -206,11 +224,11 @@
206msgid "Password is required to create a Libertine container"224msgid "Password is required to create a Libertine container"
207msgstr ""225msgstr ""
208226
209#: ../libertine/qml/HomeView.qml:188227#: ../libertine/qml/HomeView.qml:196
210msgid "Remove Package"228msgid "Remove Package"
211msgstr "Remove Package"229msgstr "Remove Package"
212230
213#: ../libertine/qml/ExtraArchivesView.qml:97231#: ../libertine/qml/ExtraArchivesView.qml:102
214msgid "Remove extra archive"232msgid "Remove extra archive"
215msgstr ""233msgstr ""
216234
@@ -247,12 +265,12 @@
247msgid "Search archives for packages"265msgid "Search archives for packages"
248msgstr ""266msgstr ""
249267
268#: ../libertine/qml/SearchResultsView.qml:39
250#: ../libertine/qml/SearchPackagesDialog.qml:26269#: ../libertine/qml/SearchPackagesDialog.qml:26
251#: ../libertine/qml/SearchResultsView.qml:39
252msgid "Search for packages"270msgid "Search for packages"
253msgstr ""271msgstr ""
254272
255#: ../libertine/qml/SearchResultsView.qml:90273#: ../libertine/qml/SearchResultsView.qml:92
256#, fuzzy274#, fuzzy
257msgid "Searching for packages…"275msgid "Searching for packages…"
258msgstr "Obtaining package version…"276msgstr "Obtaining package version…"
@@ -277,10 +295,15 @@
277"The %1 package is already installed. Please try a different package name."295"The %1 package is already installed. Please try a different package name."
278msgstr "Package %1 already installed. Please try a different package name."296msgstr "Package %1 already installed. Please try a different package name."
279297
280#: ../libertine/qml/HomeView.qml:108298#: ../libertine/qml/ManageContainer.qml:86
281msgid "Update Container"299#, fuzzy
300msgid "Update container"
282msgstr "Update Container"301msgstr "Update Container"
283302
303#: ../libertine/qml/ManageContainer.qml:70
304msgid "Update…"
305msgstr ""
306
284#: ../libertine/qml/WelcomeView.qml:27307#: ../libertine/qml/WelcomeView.qml:27
285msgid "Welcome"308msgid "Welcome"
286msgstr "Welcome"309msgstr "Welcome"
@@ -308,39 +331,38 @@
308msgid "container name"331msgid "container name"
309msgstr "Container Info"332msgstr "Container Info"
310333
311#: ../libertine/qml/ContainersView.qml:68 ../libertine/qml/HomeView.qml:187334#: ../libertine/qml/ContainersView.qml:72 ../libertine/qml/HomeView.qml:195
312msgid "delete"335msgid "delete"
313msgstr "delete"336msgstr "delete"
314337
315#: ../libertine/qml/ContainersView.qml:95338#: ../libertine/qml/ContainersView.qml:99
316msgid "edit"339msgid "edit"
317msgstr "edit"340msgstr "edit"
318341
319#: ../libertine/ContainerConfig.cpp:152 ../libertine/ContainerConfig.cpp:186342#: ../libertine/ContainerConfig.cpp:153 ../libertine/ContainerConfig.cpp:187
320#: ../libertine/qml/PackageInfoView.qml:120
321msgid "failed"343msgid "failed"
322msgstr "failed"344msgstr "failed"
323345
324#: ../libertine/qml/ConfigureContainer.qml:55
325#: ../libertine/qml/ContainerOptionsDialog.qml:40346#: ../libertine/qml/ContainerOptionsDialog.qml:40
347#: ../libertine/qml/ManageContainer.qml:55
326msgid "i386 multiarch support"348msgid "i386 multiarch support"
327msgstr "i386 multiarch support"349msgstr "i386 multiarch support"
328350
329#: ../libertine/qml/ContainersView.qml:86 ../libertine/qml/HomeView.qml:201351#: ../libertine/qml/ContainersView.qml:90 ../libertine/qml/HomeView.qml:208
330msgid "info"352msgid "info"
331msgstr "info"353msgstr "info"
332354
333#: ../libertine/ContainerConfig.cpp:185355#: ../libertine/ContainerConfig.cpp:186
334msgid "installed"356msgid "installed"
335msgstr "installed"357msgstr "installed"
336358
337#: ../libertine/ContainerConfig.cpp:148 ../libertine/ContainerConfig.cpp:184359#: ../libertine/ContainerConfig.cpp:148 ../libertine/ContainerConfig.cpp:185
338#: ../libertine/qml/ContainersView.qml:51 ../libertine/qml/HomeView.qml:171360#: ../libertine/qml/libertine.qml:58 ../libertine/qml/ContainersView.qml:63
339#: ../libertine/qml/ExtraArchivesView.qml:80361#: ../libertine/qml/HomeView.qml:187 ../libertine/qml/ExtraArchivesView.qml:93
340msgid "installing"362msgid "installing"
341msgstr "installing"363msgstr "installing"
342364
343#: ../libertine/ContainerConfig.cpp:147 ../libertine/ContainerConfig.cpp:183365#: ../libertine/ContainerConfig.cpp:147 ../libertine/ContainerConfig.cpp:184
344msgid "new"366msgid "new"
345msgstr "new"367msgstr "new"
346368
@@ -349,24 +371,26 @@
349msgid "password"371msgid "password"
350msgstr "Password"372msgstr "Password"
351373
352#: ../libertine/ContainerConfig.cpp:149374#: ../libertine/ContainerConfig.cpp:149 ../libertine/qml/ContainersView.qml:101
375#: ../libertine/qml/ManageContainer.qml:71
376#: ../libertine/qml/ManageContainer.qml:111
353msgid "ready"377msgid "ready"
354msgstr "ready"378msgstr "ready"
355379
356#: ../libertine/qml/ExtraArchivesView.qml:96380#: ../libertine/qml/ExtraArchivesView.qml:101
357#, fuzzy381#, fuzzy
358msgid "remove"382msgid "remove"
359msgstr "removed"383msgstr "removed"
360384
361#: ../libertine/ContainerConfig.cpp:151 ../libertine/ContainerConfig.cpp:188385#: ../libertine/ContainerConfig.cpp:152 ../libertine/ContainerConfig.cpp:189
362#: ../libertine/qml/PackageInfoView.qml:110
363#: ../libertine/qml/ContainerInfoView.qml:88386#: ../libertine/qml/ContainerInfoView.qml:88
387#: ../libertine/qml/PackageInfoView.qml:85
364msgid "removed"388msgid "removed"
365msgstr "removed"389msgstr "removed"
366390
367#: ../libertine/ContainerConfig.cpp:150 ../libertine/ContainerConfig.cpp:187391#: ../libertine/ContainerConfig.cpp:151 ../libertine/ContainerConfig.cpp:188
368#: ../libertine/qml/ContainersView.qml:52 ../libertine/qml/HomeView.qml:172392#: ../libertine/qml/libertine.qml:65 ../libertine/qml/ContainersView.qml:64
369#: ../libertine/qml/ExtraArchivesView.qml:81393#: ../libertine/qml/HomeView.qml:188 ../libertine/qml/ExtraArchivesView.qml:94
370msgid "removing"394msgid "removing"
371msgstr "removing"395msgstr "removing"
372396
@@ -374,6 +398,18 @@
374msgid "search"398msgid "search"
375msgstr ""399msgstr ""
376400
401#: ../libertine/ContainerConfig.cpp:150 ../libertine/qml/ContainersView.qml:102
402#: ../libertine/qml/ManageContainer.qml:83
403#: ../libertine/qml/ManageContainer.qml:107
404msgid "updating"
405msgstr ""
406
407#~ msgid "Configure %1"
408#~ msgstr "Configure %1"
409
410#~ msgid "Configure Container"
411#~ msgstr "Configure Container"
412
377#~ msgid "ID: %1"413#~ msgid "ID: %1"
378#~ msgstr "ID: %1"414#~ msgstr "ID: %1"
379415
380416
=== modified file 'po/libertine.pot'
--- po/libertine.pot 2016-04-08 20:16:41 +0000
+++ po/libertine.pot 2016-04-25 17:15:41 +0000
@@ -8,7 +8,7 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: \n"10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2016-04-08 16:01-0400\n"11"POT-Creation-Date: 2016-04-22 09:44-0400\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"14"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,145 +17,83 @@
17"Content-Type: text/plain; charset=UTF-8\n"17"Content-Type: text/plain; charset=UTF-8\n"
18"Content-Transfer-Encoding: 8bit\n"18"Content-Transfer-Encoding: 8bit\n"
1919
20#: ../libertine/ContainerConfig.cpp:147 ../libertine/ContainerConfig.cpp:18320#: ../libertine/ContainerConfig.cpp:147 ../libertine/ContainerConfig.cpp:184
21msgid "new"21msgid "new"
22msgstr ""22msgstr ""
2323
24#: ../libertine/ContainerConfig.cpp:148 ../libertine/ContainerConfig.cpp:18424#: ../libertine/ContainerConfig.cpp:148 ../libertine/ContainerConfig.cpp:185
25#: ../libertine/qml/ContainersView.qml:51 ../libertine/qml/HomeView.qml:17125#: ../libertine/qml/libertine.qml:58 ../libertine/qml/ContainersView.qml:63
26#: ../libertine/qml/ExtraArchivesView.qml:8026#: ../libertine/qml/HomeView.qml:187 ../libertine/qml/ExtraArchivesView.qml:93
27msgid "installing"27msgid "installing"
28msgstr ""28msgstr ""
2929
30#: ../libertine/ContainerConfig.cpp:14930#: ../libertine/ContainerConfig.cpp:149 ../libertine/qml/ContainersView.qml:101
31#: ../libertine/qml/ManageContainer.qml:71
32#: ../libertine/qml/ManageContainer.qml:111
31msgid "ready"33msgid "ready"
32msgstr ""34msgstr ""
3335
34#: ../libertine/ContainerConfig.cpp:150 ../libertine/ContainerConfig.cpp:18736#: ../libertine/ContainerConfig.cpp:150 ../libertine/qml/ContainersView.qml:102
35#: ../libertine/qml/ContainersView.qml:52 ../libertine/qml/HomeView.qml:17237#: ../libertine/qml/ManageContainer.qml:83
36#: ../libertine/qml/ExtraArchivesView.qml:8138#: ../libertine/qml/ManageContainer.qml:107
39msgid "updating"
40msgstr ""
41
42#: ../libertine/ContainerConfig.cpp:151 ../libertine/ContainerConfig.cpp:188
43#: ../libertine/qml/libertine.qml:65 ../libertine/qml/ContainersView.qml:64
44#: ../libertine/qml/HomeView.qml:188 ../libertine/qml/ExtraArchivesView.qml:94
37msgid "removing"45msgid "removing"
38msgstr ""46msgstr ""
3947
40#: ../libertine/ContainerConfig.cpp:151 ../libertine/ContainerConfig.cpp:18848#: ../libertine/ContainerConfig.cpp:152 ../libertine/ContainerConfig.cpp:189
41#: ../libertine/qml/PackageInfoView.qml:110
42#: ../libertine/qml/ContainerInfoView.qml:8849#: ../libertine/qml/ContainerInfoView.qml:88
50#: ../libertine/qml/PackageInfoView.qml:85
43msgid "removed"51msgid "removed"
44msgstr ""52msgstr ""
4553
46#: ../libertine/ContainerConfig.cpp:152 ../libertine/ContainerConfig.cpp:18654#: ../libertine/ContainerConfig.cpp:153 ../libertine/ContainerConfig.cpp:187
47#: ../libertine/qml/PackageInfoView.qml:120
48msgid "failed"55msgid "failed"
49msgstr ""56msgstr ""
5057
51#: ../libertine/ContainerConfig.cpp:18558#: ../libertine/ContainerConfig.cpp:186
52msgid "installed"59msgid "installed"
53msgstr ""60msgstr ""
5461
55#: ../libertine/qml/PackageExistsDialog.qml:2862#: ../libertine/qml/ContainerOptionsDialog.qml:27
56msgid "The %1 package is already installed."63msgid "Container Options"
57msgstr ""64msgstr ""
5865
59#: ../libertine/qml/PackageExistsDialog.qml:2966#: ../libertine/qml/ContainerOptionsDialog.qml:28
60msgid "Search again or return to search results."67msgid "Configure options for container creation."
61msgstr ""68msgstr ""
6269
63#: ../libertine/qml/PackageExistsDialog.qml:33
64msgid "Search again"
65msgstr ""
66
67#: ../libertine/qml/PackageExistsDialog.qml:43
68msgid "Return to search results"
69msgstr ""
70
71#: ../libertine/qml/ContainersView.qml:31
72msgid "My Containers"
73msgstr ""
74
75#: ../libertine/qml/ContainersView.qml:68 ../libertine/qml/HomeView.qml:187
76msgid "delete"
77msgstr ""
78
79#: ../libertine/qml/ContainersView.qml:69
80msgid "Delete Container"
81msgstr ""
82
83#: ../libertine/qml/ContainersView.qml:86 ../libertine/qml/HomeView.qml:201
84msgid "info"
85msgstr ""
86
87#: ../libertine/qml/ContainersView.qml:87
88msgid "Container Info"
89msgstr ""
90
91#: ../libertine/qml/ContainersView.qml:95
92msgid "edit"
93msgstr ""
94
95#: ../libertine/qml/ContainersView.qml:96
96msgid "Container Apps"
97msgstr ""
98
99#: ../libertine/qml/ConfigureContainer.qml:27
100msgid "Configure %1"
101msgstr ""
102
103#: ../libertine/qml/ConfigureContainer.qml:55
104#: ../libertine/qml/ContainerOptionsDialog.qml:4070#: ../libertine/qml/ContainerOptionsDialog.qml:40
71#: ../libertine/qml/ManageContainer.qml:55
105msgid "i386 multiarch support"72msgid "i386 multiarch support"
106msgstr ""73msgstr ""
10774
108#: ../libertine/qml/ConfigureContainer.qml:5975#: ../libertine/qml/ContainerOptionsDialog.qml:50
109msgid "Additional archives and PPAs"76msgid "Enter or name for the container or leave blank for default name"
110msgstr ""77msgstr ""
11178
112#: ../libertine/qml/SearchPackagesDialog.qml:2679#: ../libertine/qml/ContainerOptionsDialog.qml:56
113#: ../libertine/qml/SearchResultsView.qml:3980msgid "container name"
114msgid "Search for packages"81msgstr ""
115msgstr ""82
11683#: ../libertine/qml/ContainerOptionsDialog.qml:64
117#: ../libertine/qml/SearchPackagesDialog.qml:2784#: ../libertine/qml/ContainerPasswordDialog.qml:52
118msgid "Search archives for packages"
119msgstr ""
120
121#: ../libertine/qml/SearchPackagesDialog.qml:31
122msgid "search"
123msgstr ""
124
125#: ../libertine/qml/SearchPackagesDialog.qml:3985#: ../libertine/qml/SearchPackagesDialog.qml:39
126#: ../libertine/qml/ContainerPasswordDialog.qml:52
127#: ../libertine/qml/HomeView.qml:65 ../libertine/qml/ExtraArchivesView.qml:5486#: ../libertine/qml/HomeView.qml:65 ../libertine/qml/ExtraArchivesView.qml:54
128#: ../libertine/qml/ContainerOptionsDialog.qml:64
129msgid "OK"87msgid "OK"
130msgstr ""88msgstr ""
13189
90#: ../libertine/qml/ContainerOptionsDialog.qml:75
91#: ../libertine/qml/ContainerPasswordDialog.qml:70
132#: ../libertine/qml/SearchPackagesDialog.qml:5792#: ../libertine/qml/SearchPackagesDialog.qml:57
133#: ../libertine/qml/ContainerPasswordDialog.qml:70
134#: ../libertine/qml/HomeView.qml:86 ../libertine/qml/ExtraArchivesView.qml:6293#: ../libertine/qml/HomeView.qml:86 ../libertine/qml/ExtraArchivesView.qml:62
135#: ../libertine/qml/ContainerOptionsDialog.qml:75
136msgid "Cancel"94msgid "Cancel"
137msgstr ""95msgstr ""
13896
139#: ../libertine/qml/PackageInfoView.qml:28
140msgid "Information for the %1 package"
141msgstr ""
142
143#: ../libertine/qml/PackageInfoView.qml:33
144msgid "Obtaining package version…"
145msgstr ""
146
147#: ../libertine/qml/PackageInfoView.qml:51
148msgid "Package version"
149msgstr ""
150
151#: ../libertine/qml/PackageInfoView.qml:58
152msgid "Install status"
153msgstr ""
154
155#: ../libertine/qml/PackageInfoView.qml:66
156msgid "Failure reason"
157msgstr ""
158
159#: ../libertine/qml/SearchResultsView.qml:2897#: ../libertine/qml/SearchResultsView.qml:28
160msgid "Package Search Results"98msgid "Package Search Results"
161msgstr ""99msgstr ""
@@ -164,6 +102,11 @@
164msgid "Search"102msgid "Search"
165msgstr ""103msgstr ""
166104
105#: ../libertine/qml/SearchResultsView.qml:39
106#: ../libertine/qml/SearchPackagesDialog.qml:26
107msgid "Search for packages"
108msgstr ""
109
167#: ../libertine/qml/SearchResultsView.qml:49110#: ../libertine/qml/SearchResultsView.qml:49
168msgid "No Search Results Found"111msgid "No Search Results Found"
169msgstr ""112msgstr ""
@@ -176,20 +119,20 @@
176msgid "Return to Apps Page"119msgid "Return to Apps Page"
177msgstr ""120msgstr ""
178121
179#: ../libertine/qml/SearchResultsView.qml:90122#: ../libertine/qml/SearchResultsView.qml:92
180msgid "Searching for packages…"123msgid "Searching for packages…"
181msgstr ""124msgstr ""
182125
126#: ../libertine/qml/DebianPackagePicker.qml:26
127msgid "Available Debian Packages to Install"
128msgstr ""
129
130#: ../libertine/qml/DebianPackagePicker.qml:53
183#: ../libertine/qml/SearchResults.qml:42131#: ../libertine/qml/SearchResults.qml:42
184#: ../libertine/qml/DebianPackagePicker.qml:34
185msgid "Install Package"132msgid "Install Package"
186msgstr ""133msgstr ""
187134
188#: ../libertine/qml/DebianPackagePicker.qml:7135#: ../libertine/qml/DebianPackagePicker.qml:72
189msgid "Available Debian Packages to Install"
190msgstr ""
191
192#: ../libertine/qml/DebianPackagePicker.qml:53
193msgid "No Debian packages available"136msgid "No Debian packages available"
194msgstr ""137msgstr ""
195138
@@ -209,6 +152,88 @@
209msgid "password"152msgid "password"
210msgstr ""153msgstr ""
211154
155#: ../libertine/qml/ContainerInfoView.qml:28
156msgid "Container information for %1"
157msgstr ""
158
159#: ../libertine/qml/ContainerInfoView.qml:48
160msgid "ID"
161msgstr ""
162
163#: ../libertine/qml/ContainerInfoView.qml:55
164msgid "Name"
165msgstr ""
166
167#: ../libertine/qml/ContainerInfoView.qml:62
168msgid "Distribution"
169msgstr ""
170
171#: ../libertine/qml/ContainerInfoView.qml:69
172msgid "Status"
173msgstr ""
174
175#. Either "installing" or "removing"
176#: ../libertine/qml/PackageOperationFailureDialog.qml:29
177msgid "Failure %1 the %2 package."
178msgstr ""
179
180#: ../libertine/qml/PackageOperationFailureDialog.qml:33
181#: ../libertine/qml/ExtraArchivesView.qml:152
182msgid "Dismiss"
183msgstr ""
184
185#: ../libertine/qml/ContainersView.qml:31
186msgid "My Containers"
187msgstr ""
188
189#: ../libertine/qml/ContainersView.qml:72 ../libertine/qml/HomeView.qml:195
190msgid "delete"
191msgstr ""
192
193#: ../libertine/qml/ContainersView.qml:73
194msgid "Delete Container"
195msgstr ""
196
197#: ../libertine/qml/ContainersView.qml:90 ../libertine/qml/HomeView.qml:208
198msgid "info"
199msgstr ""
200
201#: ../libertine/qml/ContainersView.qml:91
202msgid "Container Info"
203msgstr ""
204
205#: ../libertine/qml/ContainersView.qml:99
206msgid "edit"
207msgstr ""
208
209#: ../libertine/qml/ContainersView.qml:100
210msgid "Container Apps"
211msgstr ""
212
213#: ../libertine/qml/SearchPackagesDialog.qml:27
214msgid "Search archives for packages"
215msgstr ""
216
217#: ../libertine/qml/SearchPackagesDialog.qml:31
218msgid "search"
219msgstr ""
220
221#: ../libertine/qml/ManageContainer.qml:27
222msgid "Manage %1"
223msgstr ""
224
225#: ../libertine/qml/ManageContainer.qml:59
226msgid "Additional archives and PPAs"
227msgstr ""
228
229#: ../libertine/qml/ManageContainer.qml:70
230msgid "Update…"
231msgstr ""
232
233#: ../libertine/qml/ManageContainer.qml:86
234msgid "Update container"
235msgstr ""
236
212#: ../libertine/qml/HomeView.qml:27237#: ../libertine/qml/HomeView.qml:27
213msgid "Classic Apps - %1"238msgid "Classic Apps - %1"
214msgstr ""239msgstr ""
@@ -231,11 +256,11 @@
231msgstr ""256msgstr ""
232257
233#: ../libertine/qml/HomeView.qml:102258#: ../libertine/qml/HomeView.qml:102
234msgid "Configure Container"259msgid "Manage Container"
235msgstr ""260msgstr ""
236261
237#: ../libertine/qml/HomeView.qml:108262#: ../libertine/qml/HomeView.qml:108
238msgid "Update Container"263msgid "Container Information"
239msgstr ""264msgstr ""
240265
241#: ../libertine/qml/HomeView.qml:114266#: ../libertine/qml/HomeView.qml:114
@@ -254,14 +279,53 @@
254msgid "Search archives for a package"279msgid "Search archives for a package"
255msgstr ""280msgstr ""
256281
257#: ../libertine/qml/HomeView.qml:188282#: ../libertine/qml/HomeView.qml:196
258msgid "Remove Package"283msgid "Remove Package"
259msgstr ""284msgstr ""
260285
261#: ../libertine/qml/HomeView.qml:202286#: ../libertine/qml/HomeView.qml:209
262msgid "Package Info"287msgid "Package Info"
263msgstr ""288msgstr ""
264289
290#: ../libertine/qml/HomeView.qml:227
291msgid "No packages are installed"
292msgstr ""
293
294#: ../libertine/qml/PackageInfoView.qml:28
295msgid "Information for the %1 package"
296msgstr ""
297
298#: ../libertine/qml/PackageInfoView.qml:32
299msgid "Obtaining package version…"
300msgstr ""
301
302#: ../libertine/qml/PackageInfoView.qml:49
303msgid "Package version"
304msgstr ""
305
306#: ../libertine/qml/PackageInfoView.qml:56
307msgid "Install status"
308msgstr ""
309
310#: ../libertine/qml/WelcomeView.qml:27
311msgid "Welcome"
312msgstr ""
313
314#: ../libertine/qml/WelcomeView.qml:42
315msgid "Welcome to the Ubuntu Legacy Application Support Manager."
316msgstr ""
317
318#: ../libertine/qml/WelcomeView.qml:50
319msgid ""
320"You do not have Legacy Application Support configured at this time. "
321"Downloading and setting up the required environment takes some time and "
322"network bandwidth."
323msgstr ""
324
325#: ../libertine/qml/WelcomeView.qml:58
326msgid "Install"
327msgstr ""
328
265#: ../libertine/qml/ExtraArchivesView.qml:26329#: ../libertine/qml/ExtraArchivesView.qml:26
266msgid "Additional Archives and PPAs"330msgid "Additional Archives and PPAs"
267msgstr ""331msgstr ""
@@ -282,73 +346,34 @@
282msgid "Enter name of PPA in the form ppa:user/ppa-name:"346msgid "Enter name of PPA in the form ppa:user/ppa-name:"
283msgstr ""347msgstr ""
284348
285#: ../libertine/qml/ExtraArchivesView.qml:96349#: ../libertine/qml/ExtraArchivesView.qml:101
286msgid "remove"350msgid "remove"
287msgstr ""351msgstr ""
288352
289#: ../libertine/qml/ExtraArchivesView.qml:97353#: ../libertine/qml/ExtraArchivesView.qml:102
290msgid "Remove extra archive"354msgid "Remove extra archive"
291msgstr ""355msgstr ""
292356
293#: ../libertine/qml/ExtraArchivesView.qml:133357#: ../libertine/qml/ExtraArchivesView.qml:119
358msgid "No additional archives and PPA's have been added"
359msgstr ""
360
361#: ../libertine/qml/ExtraArchivesView.qml:148
294msgid "Adding archive failed"362msgid "Adding archive failed"
295msgstr ""363msgstr ""
296364
297#: ../libertine/qml/ExtraArchivesView.qml:137365#: ../libertine/qml/PackageExistsDialog.qml:28
298msgid "Dismiss"366msgid "The %1 package is already installed."
299msgstr ""367msgstr ""
300368
301#: ../libertine/qml/WelcomeView.qml:27369#: ../libertine/qml/PackageExistsDialog.qml:29
302msgid "Welcome"370msgid "Search again or return to search results."
303msgstr ""371msgstr ""
304372
305#: ../libertine/qml/WelcomeView.qml:42373#: ../libertine/qml/PackageExistsDialog.qml:33
306msgid "Welcome to the Ubuntu Legacy Application Support Manager."374msgid "Search again"
307msgstr ""375msgstr ""
308376
309#: ../libertine/qml/WelcomeView.qml:50377#: ../libertine/qml/PackageExistsDialog.qml:43
310msgid ""378msgid "Return to search results"
311"You do not have Legacy Application Support configured at this time. "
312"Downloading and setting up the required environment takes some time and "
313"network bandwidth."
314msgstr ""
315
316#: ../libertine/qml/WelcomeView.qml:58
317msgid "Install"
318msgstr ""
319
320#: ../libertine/qml/ContainerInfoView.qml:28
321msgid "Container information for %1"
322msgstr ""
323
324#: ../libertine/qml/ContainerInfoView.qml:48
325msgid "ID"
326msgstr ""
327
328#: ../libertine/qml/ContainerInfoView.qml:55
329msgid "Name"
330msgstr ""
331
332#: ../libertine/qml/ContainerInfoView.qml:62
333msgid "Distribution"
334msgstr ""
335
336#: ../libertine/qml/ContainerInfoView.qml:69
337msgid "Status"
338msgstr ""
339
340#: ../libertine/qml/ContainerOptionsDialog.qml:27
341msgid "Container Options"
342msgstr ""
343
344#: ../libertine/qml/ContainerOptionsDialog.qml:28
345msgid "Configure options for container creation."
346msgstr ""
347
348#: ../libertine/qml/ContainerOptionsDialog.qml:50
349msgid "Enter or name for the container or leave blank for default name"
350msgstr ""
351
352#: ../libertine/qml/ContainerOptionsDialog.qml:56
353msgid "container name"
354msgstr ""379msgstr ""
355380
=== modified file 'python/libertine/ChrootContainer.py'
--- python/libertine/ChrootContainer.py 2016-04-07 18:03:04 +0000
+++ python/libertine/ChrootContainer.py 2016-04-25 17:15:41 +0000
@@ -199,8 +199,8 @@
199 return returncode199 return returncode
200200
201 def _build_proot_command(self):201 def _build_proot_command(self):
202 proot_cmd = '/usr/bin/proot'202 proot_cmd = shutil.which('proot')
203 if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):203 if not proot_cmd:
204 raise RuntimeError('executable proot not found')204 raise RuntimeError('executable proot not found')
205205
206 proot_cmd += " -R " + self.root_path206 proot_cmd += " -R " + self.root_path
@@ -234,8 +234,8 @@
234 return proot_cmd234 return proot_cmd
235235
236 def _build_privileged_proot_cmd(self):236 def _build_privileged_proot_cmd(self):
237 proot_cmd = '/usr/bin/proot'237 proot_cmd = shutil.which('proot')
238 if not os.path.isfile(proot_cmd) or not os.access(proot_cmd, os.X_OK):238 if not proot_cmd:
239 raise RuntimeError('executable proot not found')239 raise RuntimeError('executable proot not found')
240240
241 proot_cmd += " -b /usr/lib/locale -S " + self.root_path241 proot_cmd += " -b /usr/lib/locale -S " + self.root_path
242242
=== modified file 'python/libertine/Libertine.py'
--- python/libertine/Libertine.py 2016-04-07 20:39:10 +0000
+++ python/libertine/Libertine.py 2016-04-25 17:15:41 +0000
@@ -56,7 +56,14 @@
5656
5757
58def apt_command_prefix(verbosity):58def apt_command_prefix(verbosity):
59 return '/usr/bin/apt ' + apt_args_for_verbosity_level(verbosity) + ' '59 return '/usr/bin/apt-get ' + apt_args_for_verbosity_level(verbosity) + \
60 ' --option Apt::Cmd::Disable-Script-Warning=true --option Dpkg::Progress-Fancy=1' + \
61 ' --option Apt::Color=1 '
62
63
64def handle_runtime_error(error):
65 print("%s" % error)
66 return False
6067
6168
62class BaseContainer(metaclass=abc.ABCMeta):69class BaseContainer(metaclass=abc.ABCMeta):
@@ -311,15 +318,21 @@
311 """318 """
312 Updates the contents of the container.319 Updates the contents of the container.
313 """320 """
314 with ContainerRunning(self.container):321 try:
315 self.container.update_packages(verbosity)322 with ContainerRunning(self.container):
323 self.container.update_packages(verbosity)
324 except RuntimeError as e:
325 return handle_runtime_error(e)
316326
317 def install_package(self, package_name, verbosity=1):327 def install_package(self, package_name, verbosity=1):
318 """328 """
319 Installs a package in the container.329 Installs a package in the container.
320 """330 """
321 with ContainerRunning(self.container):331 try:
322 return self.container.install_package(package_name, verbosity)332 with ContainerRunning(self.container):
333 return self.container.install_package(package_name, verbosity)
334 except RuntimeError as e:
335 return handle_runtime_error(e)
323336
324 def remove_package(self, package_name, verbosity=1):337 def remove_package(self, package_name, verbosity=1):
325 """338 """
@@ -328,9 +341,13 @@
328 :param package_name: The name of the package to be removed.341 :param package_name: The name of the package to be removed.
329 :param verbosity: The verbosity level of the progress reporting.342 :param verbosity: The verbosity level of the progress reporting.
330 """343 """
331 with ContainerRunning(self.container):344 try:
332 self.container.run_in_container(apt_command_prefix(verbosity) + "purge '" + package_name + "'") == 0345 with ContainerRunning(self.container):
333 self.container.run_in_container(apt_command_prefix(verbosity) + "autoremove --purge") == 0346 if self.container.run_in_container(apt_command_prefix(verbosity) + "purge '" + package_name + "'") != 0:
347 return False
348 return self.container.run_in_container(apt_command_prefix(verbosity) + "autoremove --purge") == 0
349 except RuntimeError as e:
350 return handle_runtime_error(e)
334351
335 def search_package_cache(self, search_string):352 def search_package_cache(self, search_string):
336 """353 """
@@ -339,8 +356,11 @@
339 :param search_string: the (regex) to use to search the package cache.356 :param search_string: the (regex) to use to search the package cache.
340 The regex is quoted to sanitize it.357 The regex is quoted to sanitize it.
341 """358 """
342 with ContainerRunning(self.container):359 try:
343 self.container.run_in_container("/usr/bin/apt-cache search '" + search_string + "'")360 with ContainerRunning(self.container):
361 self.container.run_in_container("/usr/bin/apt-cache search '" + search_string + "'")
362 except RuntimeError as e:
363 return handle_runtime_error(e)
344364
345 def launch_application(self, app_exec_line):365 def launch_application(self, app_exec_line):
346 """366 """
@@ -350,7 +370,7 @@
350 ubuntu-app-launch370 ubuntu-app-launch
351 """371 """
352 if libertine.utils.container_exists(self.container.container_id):372 if libertine.utils.container_exists(self.container.container_id):
353 self.container.launch_application(app_exec_line) 373 self.container.launch_application(app_exec_line)
354 else:374 else:
355 raise RuntimeError("Container with id %s does not exist." % self.container.container_id)375 raise RuntimeError("Container with id %s does not exist." % self.container.container_id)
356376
@@ -380,9 +400,15 @@
380 example, 'apt-cache policy package-foo'400 example, 'apt-cache policy package-foo'
381 :rtype: The output of the given command.401 :rtype: The output of the given command.
382 """402 """
383 with ContainerRunning(self.container):403 try:
384 return self.container.run_in_container(exec_line)404 with ContainerRunning(self.container):
405 return self.container.run_in_container(exec_line)
406 except RuntimeError as e:
407 return handle_runtime_error(e)
385408
386 def configure_command(self, command, *args):409 def configure_command(self, command, *args):
387 with ContainerRunning(self.container):410 try:
388 return self.container.configure_command(command, *args)411 with ContainerRunning(self.container):
412 return self.container.configure_command(command, *args)
413 except RuntimeError as e:
414 return handle_runtime_error(e)
389415
=== modified file 'tools/libertine-container-manager'
--- tools/libertine-container-manager 2016-04-11 13:42:37 +0000
+++ tools/libertine-container-manager 2016-04-25 17:15:41 +0000
@@ -31,6 +31,40 @@
31from libertine import LibertineContainer31from libertine import LibertineContainer
3232
3333
34def find_duplicate_container_entry(container_list, container_id):
35 for container in container_list['containerList']:
36 if container['id'] == container_id:
37 return container
38
39 return None
40
41
42def merge_container_config_files(filepath):
43 merged_json = []
44 main_config = read_container_config_file()
45
46 with open(filepath, 'r') as fd:
47 merge_source = json.load(fd)
48
49 if "containerList" in main_config:
50 # Finds any duplicate entries and assumes we want to update the main config
51 # with entries from the merge source.
52 for i, container in enumerate(main_config['containerList']):
53 merge_container = find_duplicate_container_entry(merge_source, container['id'])
54 if merge_container:
55 main_config['containerList'][i] = merge_container
56 merge_source['containerList'].remove(merge_container)
57
58 # Merges in any remaining non-duplicate entries.
59 for container in merge_source['containerList']:
60 main_config['containerList'].append(container)
61
62 else:
63 main_config = merge_source
64
65 write_container_config_file(main_config)
66
67
34def read_container_config_file():68def read_container_config_file():
35 container_list = {}69 container_list = {}
36 container_config_file = libertine.utils.get_libertine_database_file_path()70 container_config_file = libertine.utils.get_libertine_database_file_path()
@@ -83,7 +117,10 @@
83117
84def is_distro_valid(distro, force):118def is_distro_valid(distro, force):
85 if force:119 if force:
86 return UbuntuDistroInfo().valid(distro)120 return UbuntuDistroInfo().valid(distro)
121
122 if distro == get_host_distro_release():
123 return True
87124
88 supported_distros = UbuntuDistroInfo().supported()125 supported_distros = UbuntuDistroInfo().supported()
89126
@@ -418,7 +455,10 @@
418 container = LibertineContainer(args.id)455 container = LibertineContainer(args.id)
419 update_package_install_status(args.id, args.package, "removing")456 update_package_install_status(args.id, args.package, "removing")
420457
421 container.remove_package(args.package, args.verbosity)458 if not container.remove_package(args.package, args.verbosity):
459 update_package_install_status(args.id, args.package, "installed")
460 sys.exit(1)
461
422 update_package_install_status(args.id, args.package, "removed")462 update_package_install_status(args.id, args.package, "removed")
423463
424 delete_package(args.id, args.package)464 delete_package(args.id, args.package)
@@ -432,7 +472,8 @@
432 args.id = get_default_container_id()472 args.id = get_default_container_id()
433473
434 container = LibertineContainer(args.id)474 container = LibertineContainer(args.id)
435 container.search_package_cache(args.search_string)475 if not container.search_package_cache(args.search_string):
476 sys.exit(1)
436477
437478
438def update(args):479def update(args):
@@ -443,7 +484,13 @@
443 args.id = get_default_container_id()484 args.id = get_default_container_id()
444485
445 container = LibertineContainer(args.id)486 container = LibertineContainer(args.id)
446 container.update_libertine_container(args.verbosity)487
488 update_container_install_status(args.id, "updating")
489 if not container.update_libertine_container(args.verbosity):
490 update_container_install_status(args.id, "ready")
491 sys.exit(1)
492
493 update_container_install_status(args.id, "ready")
447494
448495
449def list(args):496def list(args):
@@ -494,7 +541,9 @@
494 print("i386 multiarch support is already %s" % multiarch)541 print("i386 multiarch support is already %s" % multiarch)
495 sys.exit(1)542 sys.exit(1)
496543
497 container.configure_command('multiarch', args.multiarch)544 if not container.configure_command('multiarch', args.multiarch):
545 sys.exit(1)
546
498 update_container_multiarch_support(args.id, multiarch)547 update_container_multiarch_support(args.id, multiarch)
499548
500 elif args.add_archive:549 elif args.add_archive:
@@ -523,15 +572,26 @@
523 delete_container_archive(args.id, args.delete_archive)572 delete_container_archive(args.id, args.delete_archive)
524573
525574
575def merge(args):
576 merge_container_config_files(args.file)
577
578
526if __name__ == '__main__':579if __name__ == '__main__':
527 parser = argparse.ArgumentParser(description="Legacy X application support for Unity 8")580 parser = argparse.ArgumentParser(description="Legacy X application support for Unity 8")
581
582 if not os.geteuid():
583 print("Please do not run %s using sudo" % parser.prog)
584 sys.exit(1)
585
528 parser.add_argument('-q', '--quiet',586 parser.add_argument('-q', '--quiet',
529 action='store_const', dest='verbosity', const=0,587 action='store_const', dest='verbosity', const=0,
530 help=('do not print status updates on stdout'))588 help=('do not print status updates on stdout'))
531 parser.add_argument('-v', '--verbose',589 parser.add_argument('-v', '--verbose',
532 action='store_const', dest='verbosity', const=2,590 action='store_const', dest='verbosity', const=2,
533 help=('extra verbose output'))591 help=('extra verbose output'))
534 subparsers = parser.add_subparsers(dest="subparser_name")592 subparsers = parser.add_subparsers(dest="subparser_name",
593 title="subcommands",
594 metavar='create, destroy, install-package, remove-package, search-cache, update, list, list-apps, configure')
535595
536 # Handle the create command and its options596 # Handle the create command and its options
537 parser_create = subparsers.add_parser(597 parser_create = subparsers.add_parser(
@@ -587,17 +647,17 @@
587 parser_install.set_defaults(func=install_package)647 parser_install.set_defaults(func=install_package)
588648
589 # Handle the remove-package command and its options649 # Handle the remove-package command and its options
590 parser_install = subparsers.add_parser(650 parser_remove = subparsers.add_parser(
591 'remove-package',651 'remove-package',
592 help=("Remove a package in the specified Libertine container."))652 help=("Remove a package in the specified Libertine container."))
593 parser_install.add_argument(653 parser_remove.add_argument(
594 '-p', '--package',654 '-p', '--package',
595 required=True,655 required=True,
596 help=("Name of package to remove. Required."))656 help=("Name of package to remove. Required."))
597 parser_install.add_argument(657 parser_remove.add_argument(
598 '-i', '--id',658 '-i', '--id',
599 help=("Container identifier. Default container is used if omitted."))659 help=("Container identifier. Default container is used if omitted."))
600 parser_install.set_defaults(func=remove_package)660 parser_remove.set_defaults(func=remove_package)
601661
602 # Handle the search-cache command and its options662 # Handle the search-cache command and its options
603 parser_search = subparsers.add_parser(663 parser_search = subparsers.add_parser(
@@ -643,7 +703,8 @@
643 # Handle the execute command and it's options703 # Handle the execute command and it's options
644 parser_exec = subparsers.add_parser(704 parser_exec = subparsers.add_parser(
645 'exec',705 'exec',
646 help=("Run an arbitrary command in the specified Libertine container."))706 add_help=False)
707 #help=("Run an arbitrary command in the specified Libertine container."))
647 parser_exec.add_argument(708 parser_exec.add_argument(
648 '-i', '--id',709 '-i', '--id',
649 help=("Container identifier. Default container is used if omitted."))710 help=("Container identifier. Default container is used if omitted."))
@@ -677,9 +738,21 @@
677 "Needs to be in the form of \"ppa:user/ppa-name\"."))738 "Needs to be in the form of \"ppa:user/ppa-name\"."))
678 parser_configure.set_defaults(func=configure)739 parser_configure.set_defaults(func=configure)
679740
741 # Handle merging another ContainersConfig.json file into the main ContainersConfig.json file
742 parser_merge = subparsers.add_parser(
743 'merge-configs',
744 add_help=False)
745 parser_merge.add_argument(
746 '-f', '--file',
747 required=True)
748 parser_merge.set_defaults(func=merge)
749
680 # Actually parse the args750 # Actually parse the args
681 args = parser.parse_args()751 args = parser.parse_args()
682 if args.verbosity is None:752 if args.verbosity is None:
683 args.verbosity = 1753 args.verbosity = 1
684754
685 args.func(args)755 if args.subparser_name == None:
756 parser.print_help()
757 else:
758 args.func(args)

Subscribers

People subscribed via source and target branches