Compare commits

...

3 Commits

4 changed files with 38 additions and 6 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
lubuntu-update-notifier (0.5) lunar; urgency=medium
* Add a frontend for config-file-conflict.
* Update Standards-version to 4.6.1, no changes needed.
-- Simon Quigley <tsimonq2@ubuntu.com> Wed, 07 Dec 2022 13:26:39 -0600
lubuntu-update-notifier (0.4) hirsute; urgency=medium
* Added internationalization support.

2
debian/control vendored
View File

@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (=13),
python3-all,
python3-apt,
python3-setuptools
Standards-Version: 4.5.0
Standards-Version: 4.6.1
Rules-Requires-Root: no
Testsuite: autopkgtest-pkg-python

5
debian/copyright vendored
View File

@ -2,8 +2,9 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://phab.lubuntu.me/source/lubuntu-update-notifier/
Files: *
Copyright: © 2019 Lubuntu Team.
© 2019 Hans P Möller <hmollercl@lubuntu.me>
Copyright: 2019-2022 Lubuntu Team <lubuntu-devel@lists.ubuntu.com>
2019 Hans P Möller <hmollercl@lubuntu.me>
2022 Simon Quigley <tsimonq2@lubuntu.me>
License: GPL-3+
License: GPL-3+

View File

@ -2,6 +2,7 @@
# coding=utf-8
# Copyright (C) 2019 Hans P. Möller <hmollercl@lubuntu.me>
# Copyright (C) 2022 Simon Quigley <tsimonq2@lubuntu.me>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -312,6 +313,29 @@ class DialogUpg(QWidget):
# print("PTY:" + str(self.slave))
print("Status Details:" + details)
def config_file_conflict(self, transaction, cur, new):
title = "Conflicting Configuration"
text = "Updating the system will result in the following file being "
text += "overwritten: " + cur + "\n\nWhat would you like to do?"
query = QMessageBox()
query.setWindowTitle(title)
query.setText(text)
query.setIcon(QMessageBox.Question)
query.setStandardButtons(QMessageBox.Yes|QMessageBox.No)
yes = query.button(QMessageBox.Yes)
yes.setText("Overwrite")
no = query.button(QMessageBox.No)
no.setText("Keep Existing")
query.setDefaultButton(no)
query.exec_()
if query.clickedButton() == yes:
answer = "replace"
elif query.clickedButton() == no:
answer = "keep"
self.trans2.resolve_config_file_conflict(config=cur, answer=answer)
def upgrade(self):
'''runs upgrade'''
try:
@ -327,6 +351,8 @@ class DialogUpg(QWidget):
self.trans2.connect("status-details-changed",
self.status_details_changed)
self.trans2.connect("status-changed", self.status_changed)
self.trans2.connect("config-file-conflict",
self.config_file_conflict)
# TODO make a terminal work to see more info
# self.trans2.set_terminal(os.ttyname(self.slave))
@ -334,8 +360,6 @@ class DialogUpg(QWidget):
'''
# TODO implement this
self.trans2.connect("medium-required", self._on_medium_required)
self.trans2.connect("config-file-conflict",
self._on_config_file_conflict)
remove_obsoleted_depends
'''
self.trans2.set_debconf_frontend('kde')