From 25dac05b2307bee796580b2c75a95aa44d2b2cd8 Mon Sep 17 00:00:00 2001 From: ericbsd Date: Sat, 1 Feb 2025 20:06:42 -0400 Subject: [PATCH 1/2] Simplify the update-station backend Now that pkg has a better support for upgrading packages with base. I have cleanup the code that was forcing reinstall, replace pkg-static by pkg. this should take care of the loop issue. Also took time to clean some deprecated GTK code. --- compile_translations.sh | 3 - po/fr.po | 277 +++++++++++++++------------------ po/fr_CA.po | 251 +++++++++++++++++++++++++++++ po/pt_br.po | 109 +++++++------ po/ru.po | 102 ++++++------ po/update-station.pot | 93 +++++------ setup.py | 2 +- src/pkg_to_reinstall | 233 --------------------------- update_station/backend.py | 174 +++++---------------- update_station/data.py | 6 +- update_station/frontend.py | 143 +++++------------ update_station/notification.py | 3 +- update_translations.sh | 8 - 13 files changed, 593 insertions(+), 811 deletions(-) delete mode 100755 compile_translations.sh create mode 100644 po/fr_CA.po delete mode 100644 src/pkg_to_reinstall delete mode 100755 update_translations.sh diff --git a/compile_translations.sh b/compile_translations.sh deleted file mode 100755 index a53e322..0000000 --- a/compile_translations.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh - -msgfmt src/locale/ru/update-station.po -o src/locale/ru/update-station.mo diff --git a/po/fr.po b/po/fr.po index ad81c0a..2e662ce 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-02 22:45-0300\n" +"POT-Creation-Date: 2025-02-01 19:53-0400\n" "PO-Revision-Date: 2024-10-03 21:32-0300\n" "Last-Translator: Eric Turgeon \n" "Language-Team: French \n" @@ -17,256 +17,235 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: update_station/confirm_update.py:65 -msgid "Create boot environment backup" -msgstr "Créer une sauvegarde de l'environnement de démarrage" - -#: update_station/confirm_update.py:78 update_station/message.py:59 -#: update_station/message.py:148 update_station/message.py:182 -#: update_station/message.py:224 update_station/message.py:258 -#: update_station/message.py:292 update_station/message.py:328 -#: update_station/system_tray.py:47 -msgid "Close" -msgstr "Fermer" - -#: update_station/confirm_update.py:82 -msgid "Install update" -msgstr "Installer la mise à jour" - -#: update_station/confirm_update.py:95 -msgid "Update Manager" -msgstr "Gestionnaire de mise à jour" - -#: update_station/confirm_update.py:107 -msgid "Updates available!" -msgstr "Mises à jour disponibles !" - -#: update_station/confirm_update.py:146 -msgid "Installed packages to be REMOVED:" -msgstr "Paquets installés à SUPPRIMER:" - -#: update_station/confirm_update.py:153 -msgid "Installed packages to be UPGRADED" -msgstr "Packages installés à mettre à niveau" - -#: update_station/confirm_update.py:160 -msgid "New packages to be INSTALLED:" -msgstr "Nouveaux packages à INSTALLER:" - -#: update_station/confirm_update.py:167 -msgid "Installed packages to be REINSTALLED:" -msgstr "Packages installés à RÉINSTALLER:" - -#: update_station/look_for_updated.py:50 -msgid "Looking For Updates" -msgstr "À la recherche de mises à jour" - -#: update_station/look_for_updated.py:89 -msgid "Checking if the repository is online" -msgstr "" - -#: update_station/look_for_updated.py:93 -msgid "The repository is online" -msgstr "" - -#: update_station/look_for_updated.py:97 -msgid "The mirror is Syncing" -msgstr "" - -#: update_station/look_for_updated.py:102 -msgid "Updates are already running" -msgstr "" - -#: update_station/look_for_updated.py:106 -msgid "Checking for updates" -msgstr "" - -#: update_station/look_for_updated.py:110 -msgid "Getting the list of packages" -msgstr "" - -#: update_station/look_for_updated.py:114 -msgid "Open the update window" -msgstr "" - -#: update_station/look_for_updated.py:118 -msgid "No update found" -msgstr "" - -#: update_station/look_for_updated.py:124 -msgid "The Mirror is unreachable" -msgstr "" - -#: update_station/look_for_updated.py:145 -msgid "Major version upgrade" -msgstr "" - -#: update_station/look_for_updated.py:152 -#, python-brace-format -msgid "" -"Would you like to upgrade from {Data.current_abi} to {Data.new_abi}?\n" -"\n" -"If you select No, the upgrade will be skipped until the next boot." -msgstr "" - -#: update_station/message.py:42 +#: update_station/dialog.py:31 msgid "Update Failed" msgstr "" -#: update_station/message.py:48 +#: update_station/dialog.py:37 msgid "" "Press \"Detail\" to get information about the failure.\n" -" Get help at https://forums.ghostbsd.org." +" Get help at https://forums.ghostbsd.org or ." msgstr "" -#: update_station/message.py:57 +#: update_station/dialog.py:46 msgid "Detail" msgstr "" -#: update_station/message.py:92 update_station/message.py:136 +#: update_station/dialog.py:48 update_station/dialog.py:114 +#: update_station/dialog.py:148 update_station/dialog.py:181 +#: update_station/dialog.py:215 update_station/dialog.py:249 +#: update_station/dialog.py:285 update_station/dialog.py:313 +#: update_station/frontend.py:104 update_station/notification.py:86 +msgid "Close" +msgstr "Fermer" + +#: update_station/dialog.py:68 update_station/dialog.py:102 msgid "Update Completed" msgstr "" -#: update_station/message.py:97 +#: update_station/dialog.py:73 msgid "The computer needs to restart to run on the updated software." msgstr "" -#: update_station/message.py:105 +#: update_station/dialog.py:81 msgid "Restart Now" msgstr "" -#: update_station/message.py:107 +#: update_station/dialog.py:83 msgid "Restart Later" msgstr "" -#: update_station/message.py:141 +#: update_station/dialog.py:107 msgid "All software on this system is up to date." msgstr "" -#: update_station/message.py:167 +#: update_station/dialog.py:133 msgid "No Update Available" msgstr "" -#: update_station/message.py:175 +#: update_station/dialog.py:141 msgid "No update available. This system is up to date." msgstr "" -#: update_station/message.py:210 +#: update_station/dialog.py:167 msgid "Update Station already started" msgstr "" -#: update_station/message.py:218 +#: update_station/dialog.py:175 msgid "Update Station already open." msgstr "" -#: update_station/message.py:243 update_station/message.py:277 +#: update_station/dialog.py:200 update_station/dialog.py:234 msgid "Server Unreachable" msgstr "" -#: update_station/message.py:251 +#: update_station/dialog.py:208 msgid "Packages mirrors are syncing with new packages" msgstr "" -#: update_station/message.py:285 +#: update_station/dialog.py:242 msgid "" "The server is unreachable. Your internet could\n" "be down or software package server is down." msgstr "" -#: update_station/message.py:311 +#: update_station/dialog.py:268 msgid "Something Is Wrong" msgstr "" -#: update_station/message.py:320 +#: update_station/dialog.py:277 msgid "" "If you see this message it means that something is wrong.\n" " Please look at pkg upgrade output." msgstr "" -#: update_station/message.py:343 +#: update_station/dialog.py:301 msgid "Software Station" msgstr "" -#: update_station/message.py:349 +#: update_station/dialog.py:307 msgid "You need to be root" msgstr "" -#: update_station/message.py:355 -msgid "OK" -msgstr "" +#: update_station/frontend.py:91 +msgid "Create boot environment backup" +msgstr "Créer une sauvegarde de l'environnement de démarrage" -#: update_station/notification.py:23 -msgid "Software updates are now available." -msgstr "" +#: update_station/frontend.py:108 +msgid "Install update" +msgstr "Installer la mise à jour" -#: update_station/notification.py:31 -msgid "Major system version upgrade is now available." -msgstr "" +#: update_station/frontend.py:121 +msgid "Update Manager" +msgstr "Gestionnaire de mise à jour" -#: update_station/notification.py:33 -msgid "System and software updates are now available." -msgstr "" +#: update_station/frontend.py:133 +msgid "Updates available!" +msgstr "Mises à jour disponibles !" -#: update_station/notification.py:35 -msgid "Update Available" -msgstr "" +#: update_station/frontend.py:168 +msgid "Installed packages to be REMOVED:" +msgstr "Paquets installés à SUPPRIMER:" -#: update_station/system_tray.py:45 -msgid "Open Update" -msgstr "" +#: update_station/frontend.py:175 +msgid "Installed packages to be UPGRADED" +msgstr "Packages installés à mettre à niveau" -#: update_station/upgrade_progress.py:49 +#: update_station/frontend.py:182 +msgid "New packages to be INSTALLED:" +msgstr "Nouveaux packages à INSTALLER:" + +#: update_station/frontend.py:189 +msgid "Installed packages to be REINSTALLED:" +msgstr "Packages installés à RÉINSTALLER:" + +#: update_station/frontend.py:228 msgid "Installing Update" msgstr "" -#: update_station/upgrade_progress.py:93 +#: update_station/frontend.py:272 msgid "Cleaning old boot environment" msgstr "" -#: update_station/upgrade_progress.py:99 +#: update_station/frontend.py:278 msgid "Creating boot environment" msgstr "" -#: update_station/upgrade_progress.py:106 +#: update_station/frontend.py:285 msgid "Setting env and bootstrap pkg to upgrade" msgstr "" -#: update_station/upgrade_progress.py:134 +#: update_station/frontend.py:313 msgid "Downloading packages to upgrade" msgstr "" -#: update_station/upgrade_progress.py:161 +#: update_station/frontend.py:340 msgid "Packages to upgrade downloaded" msgstr "" -#: update_station/upgrade_progress.py:164 +#: update_station/frontend.py:343 msgid "Upgrading packages" msgstr "" -#: update_station/upgrade_progress.py:222 +#: update_station/frontend.py:401 msgid "Reinstalling" msgstr "" -#: update_station/upgrade_progress.py:224 +#: update_station/frontend.py:403 msgid "completed" msgstr "" -#: update_station/upgrade_progress.py:236 +#: update_station/frontend.py:415 msgid "Packages upgraded" msgstr "" -#: update_station/upgrade_progress.py:245 -msgid "Downloading packages depending on kernel" +#: update_station/frontend.py:470 +msgid "Looking For Updates" +msgstr "À la recherche de mises à jour" + +#: update_station/frontend.py:509 +msgid "Checking if the repository is online" +msgstr "" + +#: update_station/frontend.py:513 +msgid "The repository is online" msgstr "" -#: update_station/upgrade_progress.py:272 -msgid "Packages depending on kernel downloaded" +#: update_station/frontend.py:517 +msgid "The mirror is Syncing" msgstr "" -#: update_station/upgrade_progress.py:275 -msgid "Reinstalling packages depending on kernel" +#: update_station/frontend.py:522 +msgid "Updates are already running" msgstr "" -#: update_station/upgrade_progress.py:302 -msgid "Packages depending on kernel reinstalled" +#: update_station/frontend.py:526 +msgid "Checking for updates" +msgstr "" + +#: update_station/frontend.py:530 +msgid "Getting the list of packages" +msgstr "" + +#: update_station/frontend.py:534 +msgid "Open the update window" +msgstr "" + +#: update_station/frontend.py:538 +msgid "No update found" +msgstr "" + +#: update_station/frontend.py:544 +msgid "The Mirror is unreachable" +msgstr "" + +#: update_station/notification.py:24 +msgid "Software updates are now available." +msgstr "" + +#: update_station/notification.py:32 +msgid "Major system version upgrade is now available." +msgstr "" + +#: update_station/notification.py:34 +msgid "System and software updates are now available." +msgstr "" + +#: update_station/notification.py:36 +msgid "Update Available" +msgstr "" + +#: update_station/notification.py:84 +msgid "Open Update" +msgstr "" + +#: update_station/notification.py:129 +msgid "Major version upgrade" +msgstr "" + +#: update_station/notification.py:137 +msgid "" +"\n" +"\n" +"If you select No, the upgrade will be skipped until the next boot." msgstr "" diff --git a/po/fr_CA.po b/po/fr_CA.po new file mode 100644 index 0000000..ad2894b --- /dev/null +++ b/po/fr_CA.po @@ -0,0 +1,251 @@ +# French translations for PACKAGE package. +# Copyright (C) 2024 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Eric Turgeon , 2024. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-02-01 19:53-0400\n" +"PO-Revision-Date: 2024-11-15 19:12-0400\n" +"Last-Translator: Eric Turgeon \n" +"Language-Team: French \n" +"Language: fr_CA\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#: update_station/dialog.py:31 +msgid "Update Failed" +msgstr "" + +#: update_station/dialog.py:37 +msgid "" +"Press \"Detail\" to get information about the failure.\n" +" Get help at https://forums.ghostbsd.org or ." +msgstr "" + +#: update_station/dialog.py:46 +msgid "Detail" +msgstr "" + +#: update_station/dialog.py:48 update_station/dialog.py:114 +#: update_station/dialog.py:148 update_station/dialog.py:181 +#: update_station/dialog.py:215 update_station/dialog.py:249 +#: update_station/dialog.py:285 update_station/dialog.py:313 +#: update_station/frontend.py:104 update_station/notification.py:86 +msgid "Close" +msgstr "" + +#: update_station/dialog.py:68 update_station/dialog.py:102 +msgid "Update Completed" +msgstr "" + +#: update_station/dialog.py:73 +msgid "The computer needs to restart to run on the updated software." +msgstr "" + +#: update_station/dialog.py:81 +msgid "Restart Now" +msgstr "" + +#: update_station/dialog.py:83 +msgid "Restart Later" +msgstr "" + +#: update_station/dialog.py:107 +msgid "All software on this system is up to date." +msgstr "" + +#: update_station/dialog.py:133 +msgid "No Update Available" +msgstr "" + +#: update_station/dialog.py:141 +msgid "No update available. This system is up to date." +msgstr "" + +#: update_station/dialog.py:167 +msgid "Update Station already started" +msgstr "" + +#: update_station/dialog.py:175 +msgid "Update Station already open." +msgstr "" + +#: update_station/dialog.py:200 update_station/dialog.py:234 +msgid "Server Unreachable" +msgstr "" + +#: update_station/dialog.py:208 +msgid "Packages mirrors are syncing with new packages" +msgstr "" + +#: update_station/dialog.py:242 +msgid "" +"The server is unreachable. Your internet could\n" +"be down or software package server is down." +msgstr "" + +#: update_station/dialog.py:268 +msgid "Something Is Wrong" +msgstr "" + +#: update_station/dialog.py:277 +msgid "" +"If you see this message it means that something is wrong.\n" +" Please look at pkg upgrade output." +msgstr "" + +#: update_station/dialog.py:301 +msgid "Software Station" +msgstr "" + +#: update_station/dialog.py:307 +msgid "You need to be root" +msgstr "" + +#: update_station/frontend.py:91 +msgid "Create boot environment backup" +msgstr "" + +#: update_station/frontend.py:108 +msgid "Install update" +msgstr "" + +#: update_station/frontend.py:121 +msgid "Update Manager" +msgstr "" + +#: update_station/frontend.py:133 +msgid "Updates available!" +msgstr "" + +#: update_station/frontend.py:168 +msgid "Installed packages to be REMOVED:" +msgstr "" + +#: update_station/frontend.py:175 +msgid "Installed packages to be UPGRADED" +msgstr "" + +#: update_station/frontend.py:182 +msgid "New packages to be INSTALLED:" +msgstr "" + +#: update_station/frontend.py:189 +msgid "Installed packages to be REINSTALLED:" +msgstr "" + +#: update_station/frontend.py:228 +msgid "Installing Update" +msgstr "" + +#: update_station/frontend.py:272 +msgid "Cleaning old boot environment" +msgstr "" + +#: update_station/frontend.py:278 +msgid "Creating boot environment" +msgstr "" + +#: update_station/frontend.py:285 +msgid "Setting env and bootstrap pkg to upgrade" +msgstr "" + +#: update_station/frontend.py:313 +msgid "Downloading packages to upgrade" +msgstr "" + +#: update_station/frontend.py:340 +msgid "Packages to upgrade downloaded" +msgstr "" + +#: update_station/frontend.py:343 +msgid "Upgrading packages" +msgstr "" + +#: update_station/frontend.py:401 +msgid "Reinstalling" +msgstr "" + +#: update_station/frontend.py:403 +msgid "completed" +msgstr "" + +#: update_station/frontend.py:415 +msgid "Packages upgraded" +msgstr "" + +#: update_station/frontend.py:470 +msgid "Looking For Updates" +msgstr "" + +#: update_station/frontend.py:509 +msgid "Checking if the repository is online" +msgstr "" + +#: update_station/frontend.py:513 +msgid "The repository is online" +msgstr "" + +#: update_station/frontend.py:517 +msgid "The mirror is Syncing" +msgstr "" + +#: update_station/frontend.py:522 +msgid "Updates are already running" +msgstr "" + +#: update_station/frontend.py:526 +msgid "Checking for updates" +msgstr "" + +#: update_station/frontend.py:530 +msgid "Getting the list of packages" +msgstr "" + +#: update_station/frontend.py:534 +msgid "Open the update window" +msgstr "" + +#: update_station/frontend.py:538 +msgid "No update found" +msgstr "" + +#: update_station/frontend.py:544 +msgid "The Mirror is unreachable" +msgstr "" + +#: update_station/notification.py:24 +msgid "Software updates are now available." +msgstr "" + +#: update_station/notification.py:32 +msgid "Major system version upgrade is now available." +msgstr "" + +#: update_station/notification.py:34 +msgid "System and software updates are now available." +msgstr "" + +#: update_station/notification.py:36 +msgid "Update Available" +msgstr "" + +#: update_station/notification.py:84 +msgid "Open Update" +msgstr "" + +#: update_station/notification.py:129 +msgid "Major version upgrade" +msgstr "" + +#: update_station/notification.py:137 +msgid "" +"\n" +"\n" +"If you select No, the upgrade will be skipped until the next boot." +msgstr "" diff --git a/po/pt_br.po b/po/pt_br.po index 9cd2f75..aa7076b 100644 --- a/po/pt_br.po +++ b/po/pt_br.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-05 21:34-0300\n" +"POT-Creation-Date: 2025-02-01 19:55-0400\n" "PO-Revision-Date: 2024-12-13 22:50-0400\n" "Last-Translator: Edu_Amr \n" "Language-Team: Portuguese \n" @@ -26,7 +26,7 @@ msgid "" "Press \"Detail\" to get information about the failure.\n" " Get help at https://forums.ghostbsd.org or ." msgstr "" -""Pressione \"Detalhe\" para obter informações sobre a falha.\n" +"Pressione \"Detalhe\" para obter informações sobre a falha.\n" " Obtenha ajuda em https://forums.ghostbsd.org" #: update_station/dialog.py:46 @@ -37,7 +37,7 @@ msgstr "Detalhe" #: update_station/dialog.py:148 update_station/dialog.py:181 #: update_station/dialog.py:215 update_station/dialog.py:249 #: update_station/dialog.py:285 update_station/dialog.py:313 -#: update_station/frontend.py:105 update_station/notification.py:87 +#: update_station/frontend.py:104 update_station/notification.py:86 msgid "Close" msgstr "Fechar" @@ -113,165 +113,162 @@ msgstr "Estação de Software" msgid "You need to be root" msgstr "Você precisa ser root" -#: update_station/frontend.py:92 +#: update_station/frontend.py:91 msgid "Create boot environment backup" msgstr "Criar backup do ambiente de inicialização" -#: update_station/frontend.py:109 +#: update_station/frontend.py:108 msgid "Install update" msgstr "Instalar atualização" -#: update_station/frontend.py:122 +#: update_station/frontend.py:121 msgid "Update Manager" msgstr "Gerenciador de Atualizações" -#: update_station/frontend.py:134 +#: update_station/frontend.py:133 msgid "Updates available!" msgstr "Atualizações disponíveis!" -#: update_station/frontend.py:173 +#: update_station/frontend.py:168 msgid "Installed packages to be REMOVED:" msgstr "Pacotes instalados a serem REMOVIDOS:" -#: update_station/frontend.py:180 +#: update_station/frontend.py:175 msgid "Installed packages to be UPGRADED" msgstr "Pacotes instalados a serem ATUALIZADOS" -#: update_station/frontend.py:187 +#: update_station/frontend.py:182 msgid "New packages to be INSTALLED:" msgstr "Novos pacotes a serem INSTALADOS:" -#: update_station/frontend.py:194 +#: update_station/frontend.py:189 msgid "Installed packages to be REINSTALLED:" msgstr "Pacotes instalados a serem REINSTALADOS:" -#: update_station/frontend.py:234 +#: update_station/frontend.py:228 msgid "Installing Update" msgstr "Instalando Atualização" -#: update_station/frontend.py:278 +#: update_station/frontend.py:272 msgid "Cleaning old boot environment" msgstr "Limpando ambiente de inicialização antigo" -#: update_station/frontend.py:284 +#: update_station/frontend.py:278 msgid "Creating boot environment" msgstr "Criando ambiente de inicialização" -#: update_station/frontend.py:291 +#: update_station/frontend.py:285 msgid "Setting env and bootstrap pkg to upgrade" msgstr "Configurando ambiente e pacote bootstrap para atualização" -#: update_station/frontend.py:319 +#: update_station/frontend.py:313 msgid "Downloading packages to upgrade" msgstr "Baixando pacotes para atualização" -#: update_station/frontend.py:346 +#: update_station/frontend.py:340 msgid "Packages to upgrade downloaded" msgstr "Pacotes para atualização baixados" -#: update_station/frontend.py:349 +#: update_station/frontend.py:343 msgid "Upgrading packages" msgstr "Atualizando pacotes" -#: update_station/frontend.py:407 +#: update_station/frontend.py:401 msgid "Reinstalling" msgstr "Reinstalando" -#: update_station/frontend.py:409 +#: update_station/frontend.py:403 msgid "completed" msgstr "concluído" -#: update_station/frontend.py:421 +#: update_station/frontend.py:415 msgid "Packages upgraded" msgstr "Pacotes atualizados" -#: update_station/frontend.py:430 -msgid "Downloading packages depending on kernel" -msgstr "Baixando pacotes dependentes do kernel" - -#: update_station/frontend.py:457 -msgid "Packages depending on kernel downloaded" -msgstr "Pacotes dependentes do kernel baixados" - -#: update_station/frontend.py:460 -msgid "Reinstalling packages depending on kernel" -msgstr "Reinstalando pacotes dependentes do kernel" - -#: update_station/frontend.py:487 -msgid "Packages depending on kernel reinstalled" -msgstr "Pacotes dependentes do kernel reinstalados" - -#: update_station/frontend.py:541 +#: update_station/frontend.py:470 msgid "Looking For Updates" msgstr "Procurando Atualizações" -#: update_station/frontend.py:580 +#: update_station/frontend.py:509 msgid "Checking if the repository is online" msgstr "Verificando se o repositório está online" -#: update_station/frontend.py:584 +#: update_station/frontend.py:513 msgid "The repository is online" msgstr "O repositório está online" -#: update_station/frontend.py:588 +#: update_station/frontend.py:517 msgid "The mirror is Syncing" msgstr "O espelho está sincronizando" -#: update_station/frontend.py:593 +#: update_station/frontend.py:522 msgid "Updates are already running" msgstr "As atualizações já estão em andamento" -#: update_station/frontend.py:597 +#: update_station/frontend.py:526 msgid "Checking for updates" msgstr "Verificando atualizações" -#: update_station/frontend.py:601 +#: update_station/frontend.py:530 msgid "Getting the list of packages" msgstr "Obtendo a lista de pacotes" -#: update_station/frontend.py:605 +#: update_station/frontend.py:534 msgid "Open the update window" msgstr "Abrir a janela de atualização" -#: update_station/frontend.py:609 +#: update_station/frontend.py:538 msgid "No update found" msgstr "Nenhuma atualização encontrada" -#: update_station/frontend.py:615 +#: update_station/frontend.py:544 msgid "The Mirror is unreachable" msgstr "O espelho está inacessível" -#: update_station/notification.py:25 +#: update_station/notification.py:24 msgid "Software updates are now available." msgstr "Atualizações de software estão agora disponíveis." -#: update_station/notification.py:33 +#: update_station/notification.py:32 msgid "Major system version upgrade is now available." msgstr "Uma atualização importante de versão do sistema está agora disponível." -#: update_station/notification.py:35 +#: update_station/notification.py:34 msgid "System and software updates are now available." msgstr "Atualizações de sistema e software estão agora disponíveis." -#: update_station/notification.py:37 +#: update_station/notification.py:36 msgid "Update Available" msgstr "Atualização Disponível" -#: update_station/notification.py:85 +#: update_station/notification.py:84 msgid "Open Update" msgstr "Abrir Atualização" -#: update_station/notification.py:130 +#: update_station/notification.py:129 msgid "Major version upgrade" msgstr "Atualização de versão principal" #: update_station/notification.py:137 -#, python-brace-format +#, fuzzy msgid "" -"Would you like to upgrade from {Data.current_abi} to {Data.new_abi}?\n" +"\n" "\n" "If you select No, the upgrade will be skipped until the next boot." msgstr "" "Você gostaria de atualizar de {Data.current_abi} para {Data.new_abi}?\n" "\n" -"Se você selecionar Não, a atualização será ignorada até a próxima inicialização." +"Se você selecionar Não, a atualização será ignorada até a próxima " +"inicialização." + +#~ msgid "Downloading packages depending on kernel" +#~ msgstr "Baixando pacotes dependentes do kernel" + +#~ msgid "Packages depending on kernel downloaded" +#~ msgstr "Pacotes dependentes do kernel baixados" + +#~ msgid "Reinstalling packages depending on kernel" +#~ msgstr "Reinstalando pacotes dependentes do kernel" + +#~ msgid "Packages depending on kernel reinstalled" +#~ msgstr "Pacotes dependentes do kernel reinstalados" diff --git a/po/ru.po b/po/ru.po index 213beec..fa9578b 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-05 21:33-0300\n" +"POT-Creation-Date: 2025-02-01 19:53-0400\n" "PO-Revision-Date: 2024-07-28 17:57+0300\n" "Last-Translator: Alexander Alexeev \n" "Language-Team: Language locale/ru\n" @@ -37,7 +37,7 @@ msgstr "Подробности" #: update_station/dialog.py:148 update_station/dialog.py:181 #: update_station/dialog.py:215 update_station/dialog.py:249 #: update_station/dialog.py:285 update_station/dialog.py:313 -#: update_station/frontend.py:105 update_station/notification.py:87 +#: update_station/frontend.py:104 update_station/notification.py:86 msgid "Close" msgstr "Закрыть" @@ -116,167 +116,149 @@ msgstr "Центр приложений" msgid "You need to be root" msgstr "У Вас должны быть права root" -#: update_station/frontend.py:92 +#: update_station/frontend.py:91 msgid "Create boot environment backup" msgstr "Создать резервную копию загрузочной среды" -#: update_station/frontend.py:109 +#: update_station/frontend.py:108 msgid "Install update" msgstr "Установить обновление" -#: update_station/frontend.py:122 +#: update_station/frontend.py:121 msgid "Update Manager" msgstr "Менеджер обновлений" -#: update_station/frontend.py:134 +#: update_station/frontend.py:133 msgid "Updates available!" msgstr "Доступны обновления!" -#: update_station/frontend.py:173 +#: update_station/frontend.py:168 msgid "Installed packages to be REMOVED:" msgstr "Ранее установленные пакеты будут УДАЛЕНЫ:" -#: update_station/frontend.py:180 +#: update_station/frontend.py:175 msgid "Installed packages to be UPGRADED" msgstr "Ранее установленные пакеты будут ОБНОВЛЕНЫ:" -#: update_station/frontend.py:187 +#: update_station/frontend.py:182 msgid "New packages to be INSTALLED:" msgstr "Новые пакеты будут УСТАНОВЛЕНЫ:" -#: update_station/frontend.py:194 +#: update_station/frontend.py:189 msgid "Installed packages to be REINSTALLED:" msgstr "Ранее установленные пакеты будут ПЕРЕУСТАНОВЛЕНЫ:" -#: update_station/frontend.py:234 +#: update_station/frontend.py:228 msgid "Installing Update" msgstr "Установка обновлений" -#: update_station/frontend.py:278 +#: update_station/frontend.py:272 msgid "Cleaning old boot environment" msgstr "Очистка старой загрузочной среды" -#: update_station/frontend.py:284 +#: update_station/frontend.py:278 msgid "Creating boot environment" msgstr "Создание загрузочной среды" -#: update_station/frontend.py:291 +#: update_station/frontend.py:285 msgid "Setting env and bootstrap pkg to upgrade" msgstr "" -#: update_station/frontend.py:319 +#: update_station/frontend.py:313 #, fuzzy msgid "Downloading packages to upgrade" msgstr "Установка обновлений" -#: update_station/frontend.py:346 +#: update_station/frontend.py:340 #, fuzzy msgid "Packages to upgrade downloaded" msgstr "Обновления загружены" -#: update_station/frontend.py:349 +#: update_station/frontend.py:343 msgid "Upgrading packages" msgstr "" -#: update_station/frontend.py:407 +#: update_station/frontend.py:401 msgid "Reinstalling" msgstr "Переустановка" -#: update_station/frontend.py:409 +#: update_station/frontend.py:403 msgid "completed" msgstr "Завершена" -#: update_station/frontend.py:421 +#: update_station/frontend.py:415 #, fuzzy msgid "Packages upgraded" msgstr "Обновления загружены" -#: update_station/frontend.py:430 -msgid "Downloading packages depending on kernel" -msgstr "" - -#: update_station/frontend.py:457 -#, fuzzy -msgid "Packages depending on kernel downloaded" -msgstr "Обновления загружены" - -#: update_station/frontend.py:460 -#, fuzzy -msgid "Reinstalling packages depending on kernel" -msgstr "Установка обновлений" - -#: update_station/frontend.py:487 -msgid "Packages depending on kernel reinstalled" -msgstr "" - -#: update_station/frontend.py:541 +#: update_station/frontend.py:470 msgid "Looking For Updates" msgstr "Ищу обновления" -#: update_station/frontend.py:580 +#: update_station/frontend.py:509 msgid "Checking if the repository is online" msgstr "Проверка на доступность репозиторий" -#: update_station/frontend.py:584 +#: update_station/frontend.py:513 msgid "The repository is online" msgstr "Репозиторий доступен" -#: update_station/frontend.py:588 +#: update_station/frontend.py:517 msgid "The mirror is Syncing" msgstr "Зеркало синхронизируется" -#: update_station/frontend.py:593 +#: update_station/frontend.py:522 msgid "Updates are already running" msgstr "Ообновления уже запущены" -#: update_station/frontend.py:597 +#: update_station/frontend.py:526 msgid "Checking for updates" msgstr "Проверка обновлений" -#: update_station/frontend.py:601 +#: update_station/frontend.py:530 msgid "Getting the list of packages" msgstr "Получение списка пакетов" -#: update_station/frontend.py:605 +#: update_station/frontend.py:534 msgid "Open the update window" msgstr "Откройте окно обновления" -#: update_station/frontend.py:609 +#: update_station/frontend.py:538 msgid "No update found" msgstr "Обновление не найдено" -#: update_station/frontend.py:615 +#: update_station/frontend.py:544 msgid "The Mirror is unreachable" msgstr "Зеркало не доступно" -#: update_station/notification.py:25 +#: update_station/notification.py:24 msgid "Software updates are now available." msgstr "Доступны обновления программного обеспечения." -#: update_station/notification.py:33 +#: update_station/notification.py:32 msgid "Major system version upgrade is now available." msgstr "Доступно обновление версии основной системы." -#: update_station/notification.py:35 +#: update_station/notification.py:34 msgid "System and software updates are now available." msgstr "Доступны обновления системы и программного обеспечения" -#: update_station/notification.py:37 +#: update_station/notification.py:36 msgid "Update Available" msgstr "Доступно обновление" -#: update_station/notification.py:85 +#: update_station/notification.py:84 msgid "Open Update" msgstr "Открыть обновления" -#: update_station/notification.py:130 +#: update_station/notification.py:129 msgid "Major version upgrade" msgstr "Обновление основной версии" #: update_station/notification.py:137 -#, python-brace-format +#, fuzzy msgid "" -"Would you like to upgrade from {Data.current_abi} to {Data.new_abi}?\n" +"\n" "\n" "If you select No, the upgrade will be skipped until the next boot." msgstr "" @@ -284,5 +266,13 @@ msgstr "" "\n" "Если Вы виберете Нет, то обновлние будет пропущено до следующей перезагрузки." +#, fuzzy +#~ msgid "Packages depending on kernel downloaded" +#~ msgstr "Обновления загружены" + +#, fuzzy +#~ msgid "Reinstalling packages depending on kernel" +#~ msgstr "Установка обновлений" + #~ msgid "OK" #~ msgstr "ОК" diff --git a/po/update-station.pot b/po/update-station.pot index dc2703e..b2b704f 100644 --- a/po/update-station.pot +++ b/po/update-station.pot @@ -8,13 +8,13 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-05 21:34-0300\n" +"POT-Creation-Date: 2025-02-01 19:55-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: update_station/dialog.py:31 @@ -35,7 +35,7 @@ msgstr "" #: update_station/dialog.py:148 update_station/dialog.py:181 #: update_station/dialog.py:215 update_station/dialog.py:249 #: update_station/dialog.py:285 update_station/dialog.py:313 -#: update_station/frontend.py:105 update_station/notification.py:87 +#: update_station/frontend.py:104 update_station/notification.py:86 msgid "Close" msgstr "" @@ -107,162 +107,145 @@ msgstr "" msgid "You need to be root" msgstr "" -#: update_station/frontend.py:92 +#: update_station/frontend.py:91 msgid "Create boot environment backup" msgstr "" -#: update_station/frontend.py:109 +#: update_station/frontend.py:108 msgid "Install update" msgstr "" -#: update_station/frontend.py:122 +#: update_station/frontend.py:121 msgid "Update Manager" msgstr "" -#: update_station/frontend.py:134 +#: update_station/frontend.py:133 msgid "Updates available!" msgstr "" -#: update_station/frontend.py:173 +#: update_station/frontend.py:168 msgid "Installed packages to be REMOVED:" msgstr "" -#: update_station/frontend.py:180 +#: update_station/frontend.py:175 msgid "Installed packages to be UPGRADED" msgstr "" -#: update_station/frontend.py:187 +#: update_station/frontend.py:182 msgid "New packages to be INSTALLED:" msgstr "" -#: update_station/frontend.py:194 +#: update_station/frontend.py:189 msgid "Installed packages to be REINSTALLED:" msgstr "" -#: update_station/frontend.py:234 +#: update_station/frontend.py:228 msgid "Installing Update" msgstr "" -#: update_station/frontend.py:278 +#: update_station/frontend.py:272 msgid "Cleaning old boot environment" msgstr "" -#: update_station/frontend.py:284 +#: update_station/frontend.py:278 msgid "Creating boot environment" msgstr "" -#: update_station/frontend.py:291 +#: update_station/frontend.py:285 msgid "Setting env and bootstrap pkg to upgrade" msgstr "" -#: update_station/frontend.py:319 +#: update_station/frontend.py:313 msgid "Downloading packages to upgrade" msgstr "" -#: update_station/frontend.py:346 +#: update_station/frontend.py:340 msgid "Packages to upgrade downloaded" msgstr "" -#: update_station/frontend.py:349 +#: update_station/frontend.py:343 msgid "Upgrading packages" msgstr "" -#: update_station/frontend.py:407 +#: update_station/frontend.py:401 msgid "Reinstalling" msgstr "" -#: update_station/frontend.py:409 +#: update_station/frontend.py:403 msgid "completed" msgstr "" -#: update_station/frontend.py:421 +#: update_station/frontend.py:415 msgid "Packages upgraded" msgstr "" -#: update_station/frontend.py:430 -msgid "Downloading packages depending on kernel" -msgstr "" - -#: update_station/frontend.py:457 -msgid "Packages depending on kernel downloaded" -msgstr "" - -#: update_station/frontend.py:460 -msgid "Reinstalling packages depending on kernel" -msgstr "" - -#: update_station/frontend.py:487 -msgid "Packages depending on kernel reinstalled" -msgstr "" - -#: update_station/frontend.py:541 +#: update_station/frontend.py:470 msgid "Looking For Updates" msgstr "" -#: update_station/frontend.py:580 +#: update_station/frontend.py:509 msgid "Checking if the repository is online" msgstr "" -#: update_station/frontend.py:584 +#: update_station/frontend.py:513 msgid "The repository is online" msgstr "" -#: update_station/frontend.py:588 +#: update_station/frontend.py:517 msgid "The mirror is Syncing" msgstr "" -#: update_station/frontend.py:593 +#: update_station/frontend.py:522 msgid "Updates are already running" msgstr "" -#: update_station/frontend.py:597 +#: update_station/frontend.py:526 msgid "Checking for updates" msgstr "" -#: update_station/frontend.py:601 +#: update_station/frontend.py:530 msgid "Getting the list of packages" msgstr "" -#: update_station/frontend.py:605 +#: update_station/frontend.py:534 msgid "Open the update window" msgstr "" -#: update_station/frontend.py:609 +#: update_station/frontend.py:538 msgid "No update found" msgstr "" -#: update_station/frontend.py:615 +#: update_station/frontend.py:544 msgid "The Mirror is unreachable" msgstr "" -#: update_station/notification.py:25 +#: update_station/notification.py:24 msgid "Software updates are now available." msgstr "" -#: update_station/notification.py:33 +#: update_station/notification.py:32 msgid "Major system version upgrade is now available." msgstr "" -#: update_station/notification.py:35 +#: update_station/notification.py:34 msgid "System and software updates are now available." msgstr "" -#: update_station/notification.py:37 +#: update_station/notification.py:36 msgid "Update Available" msgstr "" -#: update_station/notification.py:85 +#: update_station/notification.py:84 msgid "Open Update" msgstr "" -#: update_station/notification.py:130 +#: update_station/notification.py:129 msgid "Major version upgrade" msgstr "" #: update_station/notification.py:137 -#, python-brace-format msgid "" -"Would you like to upgrade from {Data.current_abi} to {Data.new_abi}?\n" +"\n" "\n" "If you select No, the upgrade will be skipped until the next boot." msgstr "" diff --git a/setup.py b/setup.py index 09a442b..97a6012 100755 --- a/setup.py +++ b/setup.py @@ -90,7 +90,7 @@ def run(self): data_files = [ (f'{prefix}/etc/xdg/autostart', ['src/update-station.desktop']), (f'{prefix}/share/applications', ['src/update-manager.desktop']), - (f'{prefix}/lib/update-station', ['src/need_reboot.json', 'src/pkg_to_reinstall']), + (f'{prefix}/lib/update-station', ['src/need_reboot.json']), (f'{prefix}/etc/sudoers.d', ['src/sudoers.d/update-station']) ] diff --git a/src/pkg_to_reinstall b/src/pkg_to_reinstall deleted file mode 100644 index 12a9869..0000000 --- a/src/pkg_to_reinstall +++ /dev/null @@ -1,233 +0,0 @@ -acerhdf-kmod -acpi_call -aquantia-atlantic-kmod -arduino -arduino-avrdude -arduino-bsd-mk -arduino-builder -arduino-core -arduino-ctags -arduino-irremote -arduino-mk -arduino-openglcd -arduino-sevseg -arduino-tools -arduino18 -arduinoOTA -bhyve-firmware -bhyve-rc -biosfont -bwi-firmware-kmod -bwn-firmware-kmod -cciss_vol_status -cx88 -dahdi-kmod26 -devctl-jail-kmod -drm-61-kmod -drm-515-kmod -drm-kmod -gpu-firmware-amd-kmod-aldebaran -gpu-firmware-amd-kmod-arcturus -gpu-firmware-amd-kmod-banks -gpu-firmware-amd-kmod-beige-goby -gpu-firmware-amd-kmod-bonaire -gpu-firmware-amd-kmod-carrizo -gpu-firmware-amd-kmod-cyan-skillfish2 -gpu-firmware-amd-kmod-dcn-3-1-4 -gpu-firmware-amd-kmod-dcn-3-1-5 -gpu-firmware-amd-kmod-dcn-3-1-6 -gpu-firmware-amd-kmod-dcn-3-2-0 -gpu-firmware-amd-kmod-dcn-3-2-1 -gpu-firmware-amd-kmod-dimgrey-cavefish -gpu-firmware-amd-kmod-fiji -gpu-firmware-amd-kmod-gc-10-3-6 -gpu-firmware-amd-kmod-gc-10-3-7 -gpu-firmware-amd-kmod-gc-11-0-0 -gpu-firmware-amd-kmod-gc-11-0-1 -gpu-firmware-amd-kmod-gc-11-0-2 -gpu-firmware-amd-kmod-gc-11-0-3 -gpu-firmware-amd-kmod-gc-11-0-4 -gpu-firmware-amd-kmod-green-sardine -gpu-firmware-amd-kmod-hainan -gpu-firmware-amd-kmod-hawaii -gpu-firmware-amd-kmod-kabini -gpu-firmware-amd-kmod-kaveri -gpu-firmware-amd-kmod-mullins -gpu-firmware-amd-kmod-navi10 -gpu-firmware-amd-kmod-navi12 -gpu-firmware-amd-kmod-navi14 -gpu-firmware-amd-kmod-navy-flounder -gpu-firmware-amd-kmod-oland -gpu-firmware-amd-kmod-picasso -gpu-firmware-amd-kmod-pitcairn -gpu-firmware-amd-kmod-polaris10 -gpu-firmware-amd-kmod-polaris11 -gpu-firmware-amd-kmod-polaris12 -gpu-firmware-amd-kmod-psp-13-0-0 -gpu-firmware-amd-kmod-psp-13-0-4 -gpu-firmware-amd-kmod-psp-13-0-5 -gpu-firmware-amd-kmod-psp-13-0-7 -gpu-firmware-amd-kmod-psp-13-0-8 -gpu-firmware-amd-kmod-psp-13-0-10 -gpu-firmware-amd-kmod-psp-13-0-11 -gpu-firmware-amd-kmod-raven -gpu-firmware-amd-kmod-raven2 -gpu-firmware-amd-kmod-renoir -gpu-firmware-amd-kmod-sdma-5-2-6 -gpu-firmware-amd-kmod-sdma-5-2-7 -gpu-firmware-amd-kmod-sdma-6-0-0 -gpu-firmware-amd-kmod-sdma-6-0-1 -gpu-firmware-amd-kmod-sdma-6-0-2 -gpu-firmware-amd-kmod-sdma-6-0-3 -gpu-firmware-amd-kmod-si58 -gpu-firmware-amd-kmod-sienna-cichlid -gpu-firmware-amd-kmod-smu-13-0-0 -gpu-firmware-amd-kmod-smu-13-0-7 -gpu-firmware-amd-kmod-smu-13-0-10 -gpu-firmware-amd-kmod-stoney -gpu-firmware-amd-kmod-tahiti -gpu-firmware-amd-kmod-tonga -gpu-firmware-amd-kmod-topaz -gpu-firmware-amd-kmod-vangogh -gpu-firmware-amd-kmod-vcn-3-1-2 -gpu-firmware-amd-kmod-vcn-4-0-0 -gpu-firmware-amd-kmod-vcn-4-0-2 -gpu-firmware-amd-kmod-vcn-4-0-4 -gpu-firmware-amd-kmod-vega10 -gpu-firmware-amd-kmod-vega12 -gpu-firmware-amd-kmod-vega20 -gpu-firmware-amd-kmod-vegam -gpu-firmware-amd-kmod-verde -gpu-firmware-amd-kmod-yellow-carp -gpu-firmware-intel-kmod-alderlake -gpu-firmware-intel-kmod-broxton -gpu-firmware-intel-kmod-cannonlake -gpu-firmware-intel-kmod-dg1 -gpu-firmware-intel-kmod-dg2 -gpu-firmware-intel-kmod-elkhartlake -gpu-firmware-intel-kmod-geminilake -gpu-firmware-intel-kmod-icelake -gpu-firmware-intel-kmod-kabylake -gpu-firmware-intel-kmod-rocketlake -gpu-firmware-intel-kmod-skylake -gpu-firmware-intel-kmod-tigerlake -gpu-firmware-kmod -gpu-firmware-radeon-kmod-aruba -gpu-firmware-radeon-kmod-barts -gpu-firmware-radeon-kmod-bonaire -gpu-firmware-radeon-kmod-btc -gpu-firmware-radeon-kmod-caicos -gpu-firmware-radeon-kmod-cayman -gpu-firmware-radeon-kmod-cedar -gpu-firmware-radeon-kmod-cypress -gpu-firmware-radeon-kmod-hainan -gpu-firmware-radeon-kmod-hawaii -gpu-firmware-radeon-kmod-juniper -gpu-firmware-radeon-kmod-kabini -gpu-firmware-radeon-kmod-kaveri -gpu-firmware-radeon-kmod-mullins -gpu-firmware-radeon-kmod-oland -gpu-firmware-radeon-kmod-palm -gpu-firmware-radeon-kmod-pitcairn -gpu-firmware-radeon-kmod-r100 -gpu-firmware-radeon-kmod-r200 -gpu-firmware-radeon-kmod-r300 -gpu-firmware-radeon-kmod-r420 -gpu-firmware-radeon-kmod-r520 -gpu-firmware-radeon-kmod-r600 -gpu-firmware-radeon-kmod-r700 -gpu-firmware-radeon-kmod-redwood -gpu-firmware-radeon-kmod-rs600 -gpu-firmware-radeon-kmod-rs690 -gpu-firmware-radeon-kmod-rs780 -gpu-firmware-radeon-kmod-rv610 -gpu-firmware-radeon-kmod-rv620 -gpu-firmware-radeon-kmod-rv630 -gpu-firmware-radeon-kmod-rv635 -gpu-firmware-radeon-kmod-rv670 -gpu-firmware-radeon-kmod-rv710 -gpu-firmware-radeon-kmod-rv730 -gpu-firmware-radeon-kmod-rv740 -gpu-firmware-radeon-kmod-rv770 -gpu-firmware-radeon-kmod-sumo -gpu-firmware-radeon-kmod-sumo2 -gpu-firmware-radeon-kmod-tahiti -gpu-firmware-radeon-kmod-turks -gpu-firmware-radeon-kmod-verde -hammer2 -hv_kvp_cmd -intel-ixl-kmod -isal-kmod -isboot-kmod -linux_dvbwrapper-kmod -mac_nonet-kmod -mac_rtprio-kmod -malo-firmware-kmod -mbgtools -mdb -ndproxy -ng_ipacct -ng_mikrotik_eoip -nvidia-driver -nvidia-driver-304 -nvidia-driver-340 -nvidia-driver-390 -nvidia-driver-470 -nvidia-secondary-driver -nvidia-secondary-driver-390 -nvidia-settings -nvidia-texture-tools -nvidia-xconfig -open-vm-tools -open-vm-tools-nox11 -opencbm-kmod -opennurbs -openzfs-kmod -oss -parallels-tools -pefs-kmod -plasma-kmod -ptx-kmod -pwcbsd -py311-libzfs -py311-python-dtrace -quantis-kmod -realtek-re-kmod -realtek-re-kmod198 -sysctlbyname-improved-kmod -sysctlinfo-kmod -sysutils/lsof -twa-kmod -uarduno -utouch-kmod -vether-kmod -virtualbox-ose -virtualbox-ose-additions -virtualbox-ose-additions-legacy -virtualbox-ose-additions-nox11 -virtualbox-ose-additions-nox11-legacy -virtualbox-ose-kmod -virtualbox-ose-kmod-legacy -virtualbox-ose-legacy -wifi-firmware-kmod -wifibox -wifibox-alpine -wifibox-alpine-ath10k -wifibox-alpine-ath11k -wifibox-alpine-ath12k -wifibox-alpine-brcm -wifibox-alpine-iwlwifi -wifibox-alpine-marvell -wifibox-alpine-mediatek -wifibox-ath10k -wifibox-ath11k -wifibox-ath12k -wifibox-brcm -wifibox-core -wifibox-iwlwifi -wifibox-marvell -wifibox-mediatek -wifibox-rt61 -wifibox-rtlwifi -wifibox-rtw88 -wifibox-rtw89 \ No newline at end of file diff --git a/update_station/backend.py b/update_station/backend.py index 50e0fe9..991c860 100755 --- a/update_station/backend.py +++ b/update_station/backend.py @@ -7,7 +7,7 @@ import requests from gi.repository import Gtk from update_station.data import Data -from subprocess import Popen, PIPE, call, run, CompletedProcess +from subprocess import Popen, PIPE, run, CompletedProcess lib_path: str = f'{sys.prefix}/lib/update-station' update_station_db: str = '/var/db/update-station' @@ -41,15 +41,6 @@ def get_detail() -> None: Popen(f'sudo -u {Data.username} xdg-open {Data.home}/update.failed', shell=True) -def get_packages_to_reinstall() -> list: - """ - Get packages to reinstall on kernel upgrade. - :return: The list of packages to reinstall. - """ - packages = read_file(f'../src/pkg_to_reinstall').replace('\n', ' ') - return run_command(f'pkg query "%n" {packages}').stdout.splitlines() - - def run_command(command: str, check: bool = False) -> CompletedProcess: """ Run a shell command and optionally check for errors. @@ -70,17 +61,13 @@ def check_for_update() -> bool: Check if there is an update. :return: True if there is an update else False. """ - kernel_version_change() + update_local_pkg_database() upgrade_text = get_pkg_upgrade() if 'Your packages are up to date' in upgrade_text: return False elif 'UPGRADED:' in upgrade_text: return True - elif ' INSTALLED:' in upgrade_text: - return True - elif 'REINSTALLED:' in upgrade_text: - return True - elif 'REMOVED:' in upgrade_text: + elif 'INSTALLED:' in upgrade_text: return True else: return False @@ -132,40 +119,48 @@ def get_current_abi() -> str: return pkg_abi.stdout.read().strip() -def get_pkg_upgrade(option: str = '') -> str: - """ - Get the upgrade data from pkg. - :param option: f to get full upgrade data, n to get only the new packages data. - :return: The upgrade data. +def get_pkg_upgrade() -> str: """ + This function is used to get the upgrade data from pkg. + :return: This function returns the pkg upgrade output. + """ env = f'env ABI={Data.new_abi} ' if Data.major_upgrade else '' - print(f'{env}pkg upgrade -n{option}') pkg_upgrade = Popen( - f'{env}pkg upgrade -n{option}', + f'{env}pkg upgrade -n', shell=True, stdout=PIPE, close_fds=True, universal_newlines=True, encoding='utf-8' ) - upgrade_verbose = pkg_upgrade.stdout.read() - return upgrade_verbose + return pkg_upgrade.stdout.read() def get_pkg_upgrade_data() -> dict: """ - Get the upgrade data from pkg. - :return: The upgrade data. - """ - option = '' + This function is used to get the upgrade data from pkg. + + :return: Returns a dictionary with the following keys: + - system_upgrade: True if the system is upgrading else False. + - remove: The list of packages to remove. + - number_to_remove: The number of packages to remove. + - upgrade: The list of packages to upgrade. + - number_to_upgrade: The number of packages to upgrade. + - upgrade: The list of packages to upgrade. + - number_to_upgrade: The number of packages to upgrade. + - install: The list of packages to install. + - number_to_install: The number of packages to install. + - reinstall: The list of packages to reinstall. + - number_to_reinstall: The number of packages to reinstall. + - total_of_packages: The total number of packages to upgrade. + """ + update_pkg = get_pkg_upgrade() + update_pkg_list = update_pkg.splitlines() system_upgrade = False - if kernel_version_change() or Data.major_upgrade: - Data.kernel_upgrade = True + if 'kernel-generic' in update_pkg: + Data.system_upgrade = True system_upgrade = True - option = 'f' - update_pkg = get_pkg_upgrade(option) - update_pkg_list = update_pkg.splitlines() pkg_to_remove = [] pkg_to_upgrade = [] pkg_to_install = [] @@ -209,9 +204,14 @@ def get_pkg_upgrade_data() -> dict: pkg_dictionary = { 'system_upgrade': system_upgrade, 'remove': pkg_to_remove, + 'number_to_remove': len(pkg_to_remove), 'upgrade': pkg_to_upgrade, + 'number_to_upgrade': len(pkg_to_upgrade), 'install': pkg_to_install, - 'reinstall': pkg_to_reinstall + 'number_to_install': len(pkg_to_install), + 'reinstall': pkg_to_reinstall, + 'number_to_reinstall': len(pkg_to_reinstall), + 'total_of_packages': len(pkg_to_remove) + len(pkg_to_upgrade) + len(pkg_to_install) + len(pkg_to_reinstall) } return pkg_dictionary @@ -225,14 +225,13 @@ def is_major_upgrade_available() -> bool: return True if requests.get(next_version).status_code == 200 else False -def kernel_version_change() -> bool: +def update_local_pkg_database() -> None: """ Check if the kernel version has changed. :return: True if the kernel version has changed else False. """ env = f'env ABI={Data.new_abi} ' if Data.major_upgrade else '' - print(f'yes | {env}pkg update -f') - pkg_update = Popen( + run( f'yes | {env}pkg update -f', shell=True, stdout=PIPE, @@ -240,22 +239,6 @@ def kernel_version_change() -> bool: universal_newlines=True, encoding='utf-8' ) - if 'Newer FreeBSD version' in pkg_update.stdout.read(): - return True - else: - return False - - -def lock_pkg(lock_pkg_list: list) -> None: - """ - Lock all packages in the list. - :param lock_pkg_list: The list of pkg to lock. - """ - for line in lock_pkg_list: - call( - f'pkg lock -y {line.strip()}', - shell=True - ) def look_update_station() -> None: @@ -302,28 +285,6 @@ def repository_is_syncing() -> bool: return True if requests.get(syncing_url).status_code == 200 else False -def unlock_all_pkg() -> None: - """ - Unlock all locked packages. - """ - call( - 'pkg unlock -ay', - shell=True - ) - - -def unlock_pkg(lock_pkg_list: list) -> None: - """ - Unlock all packages in the list. - :param lock_pkg_list: The list of pkg to unlock. - """ - for line in lock_pkg_list: - call( - f'pkg unlock -y {line.strip()}', - shell=True - ) - - def unlock_update_station() -> None: """ Remove the lock file. @@ -340,64 +301,3 @@ def updating() -> bool: return True else: return False - - -# the code below is for upgrading to PKGBASE this will be removed in the future. -def find_if_os_generic_exists() -> bool: - """ - This function is look if there is some os generic packages installed. - :return: True if some os generic packages are exists else False. - """ - return run_command("pkg info -E -g 'os-generic*'").returncode == 0 - - -def set_package_base_config_file() -> CompletedProcess: - # /usr/local/etc/pkg/repos/GhostBSD.conf - config_path = '/usr/local/etc/pkg/repos/GhostBSD.conf' - return run_command(f'cp {config_path}.default {config_path}') - - -def remove_os_generic(mount_point: str) -> CompletedProcess: - """ - This function is used to remove all os generic packages. - :param mount_point: The mount point of the basepkg-test. - """ - return run_command(f'pkg-static -r {mount_point} delete -yf -g "os-generic*"') - - -def install_ghostbsd_pkgbase(mount_point: str) -> CompletedProcess: - """ - This function is used to install the GhostBSD-base package. - :param mount_point: The mount point of the basepkg-test. - """ - return run_command(f'pkg-static -r {mount_point} install -y -r GhostBSD-base -g "GhostBSD-*"') - - -def fetch_ghostbsd_pkgbase(mount_point: str) -> CompletedProcess: - """ - This function is used to download the GhostBSD-base package. - :param mount_point: The mount point of the basepkg-test. - """ - return run_command(f'pkg-static -r {mount_point} fetch -y -r GhostBSD-base -g "GhostBSD-*"') - - -def restore_vital_files(mount_point: str) -> None: - """ - This function is used to restart the vital files. - :param mount_point: The mount point of the basepkg-test. - """ - run_command(f'cp /etc/passwd {mount_point}/etc/passwd') - run_command(f'cp /etc/master.passwd {mount_point}/etc/master.passwd') - run_command(f'cp /etc/group {mount_point}/etc/group') - run_command(f'cp /etc/sysctl.conf {mount_point}/etc/sysctl.conf') - run_command(f'mkdir {mount_point}/proc') - run_command(f'chroot {mount_point} pwd_mkdb -p /etc/master.passwd') - - -def remove_package_config() -> CompletedProcess: - """ - This function is used to remove the package config file. - :return: The CompletedProcess object. - """ - config_path = '/usr/local/etc/pkg/repos/GhostBSD.conf' - return run_command(f'rm {config_path}') diff --git a/update_station/data.py b/update_station/data.py index 69546ad..ca4f130 100755 --- a/update_station/data.py +++ b/update_station/data.py @@ -12,14 +12,13 @@ class Data: current_abi: String that indicates the current ABI of the system. do_not_upgrade: Boolean that indicates if the update-station should not upgrade the system. home: String that indicates the home directory of the user that is running the update-station. - kernel_upgrade: Boolean that indicates if the update-station should upgrade the kernel. + system_upgrade: Boolean that indicates if the update-station should upgrade the kernel. packages_dictionary: Dictionary that contains all the packages that are installed on the system. major_upgrade: Boolean that indicates if the update-station should do a major upgrade. new_abi: String that indicates the new ABI of the system. second_update: Boolean that indicates if the update-station should do 2 update. stop_pkg_refreshing: Boolean that indicates if the update-station should stop refreshing the packages. system_tray: Object that contains the system tray of the update-station. - total_packages: Integer that indicates the total number of packages that are that will be updated. update_started: Boolean that indicates if the application has started updating the system. username: String that indicates the username of the user that is running the update-station. """ @@ -28,13 +27,12 @@ class Data: current_abi: str = '' do_not_upgrade: bool = False home: str = os.path.expanduser('~') - kernel_upgrade: bool = False + system_upgrade: bool = False major_upgrade: bool = False new_abi: str = '' packages_dictionary: dict = {} second_update: bool = False stop_pkg_refreshing: bool = False system_tray = None - total_packages: int = 0 update_started: bool = False username: str = os.environ.get('SUDO_USER') if 'SUDO_USER' in os.environ else getpass.getuser() diff --git a/update_station/frontend.py b/update_station/frontend.py index c3538d1..26518b4 100644 --- a/update_station/frontend.py +++ b/update_station/frontend.py @@ -23,7 +23,6 @@ ) from update_station.backend import ( check_for_update, - get_packages_to_reinstall, get_pkg_upgrade_data, unlock_update_station, updating, @@ -123,13 +122,13 @@ def __init__(self): self.window.set_border_width(0) self.window.set_position(Gtk.WindowPosition.CENTER) self.window.set_default_icon_name('system-software-update') - box1 = Gtk.VBox(homogeneous=False, spacing=0) - self.window.add(box1) - box1.show() - box2 = Gtk.VBox(homogeneous=False, spacing=0) - box2.set_border_width(20) - box1.pack_start(box2, True, True, 0) - box2.show() + vbox1 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=0) + self.window.add(vbox1) + vbox1.show() + vbox2 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=0) + vbox2.set_border_width(20) + vbox1.pack_start(vbox2, True, True, 0) + vbox2.show() # Title title_text = _("Updates available!") @@ -137,7 +136,7 @@ def __init__(self): label=f"{title_text}" ) update_title_label.set_use_markup(True) - box2.pack_start(update_title_label, False, False, 0) + vbox2.pack_start(update_title_label, False, False, 0) self.tree_store = Gtk.TreeStore(str, bool) sw = Gtk.ScrolledWindow() sw.set_shadow_type(Gtk.ShadowType.ETCHED_IN) @@ -149,13 +148,13 @@ def __init__(self): self.view.set_headers_visible(False) sw.add(self.view) sw.show() - box2.pack_start(sw, True, True, 10) - box2 = Gtk.HBox(homogeneous=False, spacing=10) - box2.set_border_width(5) - box1.pack_start(box2, False, False, 5) - box2.show() + vbox2.pack_start(sw, True, True, 10) + vbox2 = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, homogeneous=False, spacing=10) + vbox2.set_border_width(5) + vbox1.pack_start(vbox2, False, False, 5) + vbox2.show() # Add button - box2.pack_start(self.create_bbox(), True, True, 10) + vbox2.pack_start(self.create_bbox(), True, True, 10) self.window.show_all() def store(self): @@ -164,39 +163,34 @@ def store(self): :return: The store for the list of package to be updated. """ self.tree_store.clear() - r_num = 0 - u_num = 0 - i_num = 0 - ri_num = 0 if bool(Data.packages_dictionary['remove']): r_num = len(Data.packages_dictionary['remove']) message = _('Installed packages to be REMOVED:') - message += f' {r_num}' + message += f' {Data.packages_dictionary["number_to_remove"]}' r_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['remove']: self.tree_store.append(r_pinter, (line, True)) if bool(Data.packages_dictionary['upgrade']): u_num = len(Data.packages_dictionary['upgrade']) message = _('Installed packages to be UPGRADED') - message += f' {u_num}' + message += f' {Data.packages_dictionary["number_to_upgrade"]}' u_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['upgrade']: self.tree_store.append(u_pinter, (line, True)) if bool(Data.packages_dictionary['install']): i_num = len(Data.packages_dictionary['install']) message = _('New packages to be INSTALLED:') - message += f' {i_num}' + message += f' {Data.packages_dictionary["number_to_install"]}' i_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['install']: self.tree_store.append(i_pinter, (line, True)) if bool(Data.packages_dictionary['reinstall']): ri_num = len(Data.packages_dictionary['reinstall']) message = _('Installed packages to be REINSTALLED:') - message += f' {ri_num}' + message += f' {Data.packages_dictionary["number_to_reinstall"]}' ri_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['reinstall']: self.tree_store.append(ri_pinter, (line, True)) - Data.total_packages = r_num + u_num + i_num + ri_num return self.tree_store def display(self, model: Gtk.TreeStore) -> Gtk.TreeView: @@ -218,7 +212,7 @@ class InstallUpdate: """ The class for the window that is displayed the progress of the update. """ - def close_application(self, widget): + def close_application(self, widget, *args): if updating(): unlock_update_station() Gtk.main_quit() @@ -235,10 +229,10 @@ def __init__(self): self.win.set_border_width(0) self.win.set_position(Gtk.WindowPosition.CENTER) self.win.set_default_icon_name('system-software-update') - box1 = Gtk.VBox(homogeneous=False, spacing=0) + box1 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=0) self.win.add(box1) box1.show() - box2 = Gtk.VBox(homogeneous=False, spacing=10) + box2 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=10) box2.set_border_width(10) box1.pack_start(box2, True, True, 0) box2.show() @@ -269,7 +263,7 @@ def read_output(self, progress): Data.second_update = True else: Data.second_update = False - howmany: float = (Data.total_packages * 5) + 45 + howmany: float = (Data.packages_dictionary["total_of_packages"] * 7) + 45 fraction: float = 1.0 / howmany # TODO: make a function for this part. @@ -320,7 +314,7 @@ def read_output(self, progress): GLib.idle_add(update_progress, progress, fraction, txt) sleep(1) fetch = Popen( - f'{env}pkg-static upgrade -Fy{packages}', + f'{env}pkg upgrade -Fy{packages}', shell=True, stdout=PIPE, stderr=PIPE, @@ -351,7 +345,7 @@ def read_output(self, progress): sleep(1) while True: install = Popen( - f'{env}pkg-static upgrade -y{packages}', + f'{env}pkg upgrade -y{packages}', shell=True, stdout=PIPE, stderr=PIPE, @@ -372,7 +366,7 @@ def read_output(self, progress): raw_line = install_text.splitlines()[-2] failed_package = raw_line.split()[2].replace(':', '') pkg_rquery = run( - f'{env}pkg-static rquery -x "%n" "{failed_package}"', + f'{env}pkg rquery -x "%n" "{failed_package}"', shell=True, stdout=PIPE, stderr=PIPE, @@ -380,8 +374,8 @@ def read_output(self, progress): ) package_name = pkg_rquery.stdout.strip() reinstall = Popen( - f'{env}pkg-static delete -y {package_name} ;' - f'{env}pkg-static install -y {package_name}', + f'{env}pkg delete -y {package_name} ;' + f'{env}pkg install -y {package_name}', shell=True, stdout=PIPE, stderr=PIPE, @@ -422,71 +416,6 @@ def read_output(self, progress): GLib.idle_add(update_progress, progress, fraction, txt) sleep(1) break - if Data.kernel_upgrade: - all_packages = set(re.findall(r"(\S+):", " ".join(Data.packages_dictionary['reinstall']))) - all_packages.update(upgrade_packages) - packages_to_reinstall = set(get_packages_to_reinstall()) - packages = " ".join(list(packages_to_reinstall.difference(all_packages))) - txt = _("Downloading packages depending on kernel") - GLib.idle_add(update_progress, progress, fraction, txt) - sleep(1) - fetch = Popen( - f'{env}pkg-static upgrade -Fy {packages}', - shell=True, - stdout=PIPE, - stderr=PIPE, - close_fds=True, - universal_newlines=True - ) - fetch_text = "" - while True: - stdout_line = fetch.stdout.readline() - if fetch.poll() is not None: - break - fetch_text += stdout_line - GLib.idle_add(update_progress, progress, fraction, - stdout_line.strip()) - if fetch.returncode != 0: - stderr_line = fetch.stderr.read() - fetch_text += stderr_line - update_fail = open(f'{Data.home}/update.failed', 'w') - update_fail.writelines(fetch_text) - update_fail.close() - fail = True - else: - txt = _("Packages depending on kernel downloaded") - GLib.idle_add(update_progress, progress, fraction, txt) - sleep(1) - txt = _("Reinstalling packages depending on kernel") - GLib.idle_add(update_progress, progress, fraction, txt) - sleep(1) - install = Popen( - f'{env}pkg-static upgrade -fy {packages}', - shell=True, - stdout=PIPE, - stderr=PIPE, - close_fds=True, - universal_newlines=True - ) - install_text = "" - while True: - stdout_line = install.stdout.readline() - if install.poll() is not None: - break - install_text += stdout_line - GLib.idle_add(update_progress, progress, fraction, - stdout_line.strip()) - if install.returncode != 0: - stderr_line = install.stderr.readline() - install_text += stderr_line - update_fail = open(f'{Data.home}/update.failed', 'w') - update_fail.writelines(install_text) - update_fail.close() - fail = True - else: - txt = _("Packages depending on kernel reinstalled") - GLib.idle_add(update_progress, progress, fraction, txt) - sleep(1) GLib.idle_add(self.win.destroy) GLib.idle_add(self.stop_tread, fail, update_pkg, reboot) @@ -521,7 +450,7 @@ class StartCheckUpdate: """ Class for start check for update window. """ - def close_application(self, widget: Gtk.Widget): + def close_application(self, widget: Gtk.Widget, *args): """ The function to close the window. :param widget: The window widget. @@ -542,17 +471,17 @@ def __init__(self): self.win.set_border_width(0) self.win.set_position(Gtk.WindowPosition.CENTER) self.win.set_default_icon_name('system-software-update') - box1 = Gtk.VBox(homogeneous=False, spacing=0) - self.win.add(box1) - box1.show() - box2 = Gtk.VBox(homogeneous=False, spacing=10) - box2.set_border_width(10) - box1.pack_start(box2, True, True, 0) - box2.show() + vbox1 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=0) + self.win.add(vbox1) + vbox1.show() + vbox2 = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, homogeneous=False, spacing=10) + vbox2.set_border_width(10) + vbox1.pack_start(vbox2, True, True, 0) + vbox2.show() self.pbar = Gtk.ProgressBar() self.pbar.set_show_text(True) self.pbar.set_fraction(0.0) - box2.pack_start(self.pbar, False, False, 0) + vbox2.pack_start(self.pbar, False, False, 0) self.win.show_all() self.thr = threading.Thread( target=self.check_for_update, diff --git a/update_station/notification.py b/update_station/notification.py index 13fff49..06ce489 100644 --- a/update_station/notification.py +++ b/update_station/notification.py @@ -1,5 +1,4 @@ import gettext - from gi.repository import Gtk, GLib, Notify from update_station.data import Data from update_station.backend import updating @@ -31,7 +30,7 @@ def notify(self): """ if Data.major_upgrade is True: self.msg = _("Major system version upgrade is now available.") - elif Data.kernel_upgrade is True: + elif Data.system_upgrade is True: self.msg = _("System and software updates are now available.") self.notification = Notify.Notification().new( summary=_('Update Available'), diff --git a/update_translations.sh b/update_translations.sh deleted file mode 100755 index fb35ed9..0000000 --- a/update_translations.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -cp -f src/update-station src/update-station.py - -xgettext src/update-station.py -o src/locale/update-station.pot -msgmerge -U src/locale/ru/update-station.po src/locale/update-station.pot - -rm src/update-station.py From 9c7656b2ff99ed63f226fb03e63e39ce84c9b813 Mon Sep 17 00:00:00 2001 From: ericbsd Date: Sat, 1 Feb 2025 20:19:24 -0400 Subject: [PATCH 2/2] Remove some unused variable --- update_station/frontend.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/update_station/frontend.py b/update_station/frontend.py index 26518b4..bf11d47 100644 --- a/update_station/frontend.py +++ b/update_station/frontend.py @@ -164,28 +164,24 @@ def store(self): """ self.tree_store.clear() if bool(Data.packages_dictionary['remove']): - r_num = len(Data.packages_dictionary['remove']) message = _('Installed packages to be REMOVED:') message += f' {Data.packages_dictionary["number_to_remove"]}' r_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['remove']: self.tree_store.append(r_pinter, (line, True)) if bool(Data.packages_dictionary['upgrade']): - u_num = len(Data.packages_dictionary['upgrade']) message = _('Installed packages to be UPGRADED') message += f' {Data.packages_dictionary["number_to_upgrade"]}' u_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['upgrade']: self.tree_store.append(u_pinter, (line, True)) if bool(Data.packages_dictionary['install']): - i_num = len(Data.packages_dictionary['install']) message = _('New packages to be INSTALLED:') message += f' {Data.packages_dictionary["number_to_install"]}' i_pinter = self.tree_store.append(None, (message, True)) for line in Data.packages_dictionary['install']: self.tree_store.append(i_pinter, (line, True)) if bool(Data.packages_dictionary['reinstall']): - ri_num = len(Data.packages_dictionary['reinstall']) message = _('Installed packages to be REINSTALLED:') message += f' {Data.packages_dictionary["number_to_reinstall"]}' ri_pinter = self.tree_store.append(None, (message, True))