Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libstorage-ng for openSUSE:Factory checked in at 2022-01-07 12:44:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1896 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Fri Jan 7 12:44:40 2022 rev:143 rq:944020 version:4.4.70 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2021-12-21 18:40:20.637858348 +0100 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1896/libstorage-ng.changes 2022-01-07 12:45:08.599793881 +0100 @@ -1,0 +2,36 @@ +Wed Jan 5 11:30:11 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#854 +- use make_shared instead of new when creating actions for the + actiongraph +- 4.4.70 + +-------------------------------------------------------------------- +Tue Jan 4 16:01:28 UTC 2022 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#853 +- added const +- 4.4.69 + +-------------------------------------------------------------------- +Wed Dec 22 16:13:50 UTC 2021 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#852 +- added Luks::reset_activation_infos() + +-------------------------------------------------------------------- +Wed Dec 22 02:23:47 UTC 2021 - opensuse-packag...@opensuse.org + +- Translated using Weblate (Japanese) (bsc#1149754) + +-------------------------------------------------------------------- +Tue Dec 21 19:34:00 UTC 2021 - opensuse-packag...@opensuse.org + +- Translated using Weblate (Catalan) (bsc#1149754) + +-------------------------------------------------------------------- +Tue Dec 21 07:46:02 UTC 2021 - opensuse-packag...@opensuse.org + +- Translated using Weblate (Slovak) (bsc#1149754) + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.4.68.tar.xz New: ---- libstorage-ng-4.4.70.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.JzK6Dr/_old 2022-01-07 12:45:09.299794367 +0100 +++ /var/tmp/diff_new_pack.JzK6Dr/_new 2022-01-07 12:45:09.307794373 +0100 @@ -1,7 +1,7 @@ # # spec file for package libstorage-ng # -# Copyright (c) 2021 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2022 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.4.68 +Version: 4.4.70 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.4.68.tar.xz -> libstorage-ng-4.4.70.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/LIBVERSION new/libstorage-ng-4.4.70/LIBVERSION --- old/libstorage-ng-4.4.68/LIBVERSION 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/LIBVERSION 2022-01-05 12:30:11.000000000 +0100 @@ -1 +1 @@ -1.71.0 +1.72.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/VERSION new/libstorage-ng-4.4.70/VERSION --- old/libstorage-ng-4.4.68/VERSION 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/VERSION 2022-01-05 12:30:11.000000000 +0100 @@ -1 +1 @@ -4.4.68 +4.4.70 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/po/ca.po new/libstorage-ng-4.4.70/po/ca.po --- old/libstorage-ng-4.4.68/po/ca.po 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/po/ca.po 2022-01-05 12:30:11.000000000 +0100 @@ -9,16 +9,16 @@ "Project-Id-Version: YaST (@memory@)\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-20 12:10+0100\n" -"PO-Revision-Date: 2021-12-03 20:13+0000\n" +"PO-Revision-Date: 2021-12-21 22:13+0000\n" "Last-Translator: David Medina <medi...@gmail.com>\n" -"Language-Team: Catalan <https://l10n.opensuse.org/projects/libstorage/ng-" -"master/ca/>\n" +"Language-Team: Catalan <https://l10n.opensuse.org/projects/libstorage/" +"ng-master/ca/>\n" "Language: 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" -"X-Generator: Weblate 4.8.1\n" +"X-Generator: Weblate 4.9.1\n" msgid "" "\n" @@ -1667,35 +1667,37 @@ #. %1$s is replaced by the filesystem type (e.g. ext4), #. %2$s is replaced by the partition table type (e.g. GPT), #. %3$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a %1$s file system next to a partition table of type %2$s on the\n" "device %3$s. The file system will be ignored." msgstr "" -"S'ha detectat un sistema de fitxers al costat d'una taula de\n" -"particions al dispositiu %1$s. S'ignorar?? el sistema de fitxers." +"S'ha detectat un sistema de fitxers %1$s al costat d'una taula de " +"particions\n" +"del tipus %2$s al dispositiu %3$s. S'ignorar?? el sistema de fitxers." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LUKS device next to a partition table of type %1$s on the\n" "device %2$s. The LUKS device will be ignored." msgstr "" -"S'ha detectat un dispositiu de LUKS al costat d'una taula de\n" -"particions al dispositiu %1$s. S'ignorar?? el dispositiu de LUKS." +"S'ha detectat un dispositiu de LUKS al costat d'una taula de particions\n" +"del tipus %1$s al dispositiu %2$s. S'ignorar?? el dispositiu de LUKS." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LVM logical volume next to a partition table of type %1$s on the\n" "device %2$s. The LVM logical volume will be ignored as good as possible." msgstr "" -"S'ha detectat un volum l??gic d'LVM al costat d'una taula de\n" -"particions al dispositiu %1$s. S'ignorar?? el volum l??gic d'LVM." +"S'ha detectat un volum l??gic d'LVM al costat d'una taula de particions del " +"tipus %1$s\n" +"al dispositiu %2$s. S'ignorar?? el volum l??gic d'LVM tant com sigui possible." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the filesystem type (e.g. minix), @@ -1705,6 +1707,8 @@ "Detected an unsupported file system of type %1$s on the\n" "device %2$s." msgstr "" +"S'ha detectat un sistema de fitxers no compatible de tipus %1$s al\n" +"dispositiu %2$s." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. BSD), @@ -1714,6 +1718,8 @@ "Detected an unsupported partition table of type %1$s on the\n" "device %2$s." msgstr "" +"S'ha detectat una taula de particions no admesa del tipus %1$s al\n" +"dispositiu %2$s." #. TRANSLATORS: name of partition type msgid "Diagnostics Partition" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/po/ja.po new/libstorage-ng-4.4.70/po/ja.po --- old/libstorage-ng-4.4.68/po/ja.po 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/po/ja.po 2022-01-05 12:30:11.000000000 +0100 @@ -11,16 +11,16 @@ "Project-Id-Version: libstorage\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-20 12:10+0100\n" -"PO-Revision-Date: 2021-12-04 01:18+0000\n" +"PO-Revision-Date: 2021-12-22 05:13+0000\n" "Last-Translator: Yasuhiko Kamata <belphe...@belbel.or.jp>\n" -"Language-Team: Japanese <https://l10n.opensuse.org/projects/libstorage/ng-" -"master/ja/>\n" +"Language-Team: Japanese <https://l10n.opensuse.org/projects/libstorage/" +"ng-master/ja/>\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.8.1\n" +"X-Generator: Weblate 4.9.1\n" msgid "" "\n" @@ -1683,34 +1683,34 @@ #. %1$s is replaced by the filesystem type (e.g. ext4), #. %2$s is replaced by the partition table type (e.g. GPT), #. %3$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a %1$s file system next to a partition table of type %2$s on the\n" "device %3$s. The file system will be ignored." msgstr "" -"???????????? %1$s ???????????????????????????????????????????????????\n" -"?????????????????????????????????????????????????????????????????????????????????????????????????????????" +"???????????? %3$s ?????? %2$s ????????????????????????????????????????????????\n" +"%1$s ?????????????????????????????????????????????????????????????????????????????????????????????????????????" #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LUKS device next to a partition table of type %1$s on the\n" "device %2$s. The LUKS device will be ignored." msgstr "" -"???????????? %1$s ???????????????????????????????????????????????????\n" +"???????????? %2$s ?????? %1$s ????????????????????????????????????????????????\n" "LUKS ????????????????????????????????????????????? LUKS ????????????????????????????????????" #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LVM logical volume next to a partition table of type %1$s on the\n" "device %2$s. The LVM logical volume will be ignored as good as possible." msgstr "" -"???????????? %1$s ???????????????????????????????????????????????????\n" +"???????????? %2$s ?????? %1$s ????????????????????????????????????????????????\n" "LVM ?????????????????????????????????????????????????????? LVM ?????????????????????????????????????????????" #. TRANSLATORS: Error message displayed during probing, @@ -1721,6 +1721,8 @@ "Detected an unsupported file system of type %1$s on the\n" "device %2$s." msgstr "" +"???????????? %2$s ?????? %1$s ????????????????????????????????????????????????\n" +"???????????????????????????????????????????????????????????????" #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. BSD), @@ -1730,6 +1732,8 @@ "Detected an unsupported partition table of type %1$s on the\n" "device %2$s." msgstr "" +"???????????? %2$s ?????? %1$s ????????????????????????????????????????????????\n" +"????????????????????????????????????????????????????????????????????????" #. TRANSLATORS: name of partition type msgid "Diagnostics Partition" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/po/sk.po new/libstorage-ng-4.4.70/po/sk.po --- old/libstorage-ng-4.4.68/po/sk.po 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/po/sk.po 2022-01-05 12:30:11.000000000 +0100 @@ -6,16 +6,16 @@ "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-12-20 12:10+0100\n" -"PO-Revision-Date: 2021-12-03 20:13+0000\n" +"PO-Revision-Date: 2021-12-21 10:14+0000\n" "Last-Translator: Ferdinand Galko <galko.ferdin...@gmail.com>\n" -"Language-Team: Slovak <https://l10n.opensuse.org/projects/libstorage/ng-" -"master/sk/>\n" +"Language-Team: Slovak <https://l10n.opensuse.org/projects/libstorage/" +"ng-master/sk/>\n" "Language: sk\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.8.1\n" +"X-Generator: Weblate 4.9.1\n" msgid "" "\n" @@ -1665,35 +1665,36 @@ #. %1$s is replaced by the filesystem type (e.g. ext4), #. %2$s is replaced by the partition table type (e.g. GPT), #. %3$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a %1$s file system next to a partition table of type %2$s on the\n" "device %3$s. The file system will be ignored." msgstr "" -"Zisten?? s??borov?? syst??m ved??a tabu??ky oddielov\n" -"na zariaden?? %1$s. S??borov?? syst??m bude ignorovan??." +"Zisten?? s??borov?? syst??m %1$s ved??a tabu??ky oddielov typu %2$s\n" +"na zariaden?? %3$s. S??borov?? syst??m bude ignorovan??." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LUKS device next to a partition table of type %1$s on the\n" "device %2$s. The LUKS device will be ignored." msgstr "" -"Zisten?? zariadenie LUKS ved??a tabu??ky oddielov\n" -"na zariaden?? %1$s. Zariadenie LUKS bude ignorovan??." +"Zisten?? zariadenie LUKS ved??a tabu??ky oddielov typu %1$s\n" +"na zariaden?? %2$s. Zariadenie LUKS bude ignorovan??." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. GPT), #. %2$s is replaced by the device name (e.g. /dev/sda) -#, fuzzy, c-format +#, c-format msgid "" "Detected a LVM logical volume next to a partition table of type %1$s on the\n" "device %2$s. The LVM logical volume will be ignored as good as possible." msgstr "" -"Zisten?? logick?? zv??zok LVM ved??a tabu??ky oddielov\n" -"na zariaden?? %1$s. Logick?? zv??zok LVM bude ignorovan??." +"Zisten?? logick?? zv??zok LVM ved??a tabu??ky oddielov typu %1$s\n" +"na zariaden?? %2$s. Logick?? zv??zok LVM bude ignorovan?? tak dobre, ako je to " +"mo??n??." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the filesystem type (e.g. minix), @@ -1703,6 +1704,8 @@ "Detected an unsupported file system of type %1$s on the\n" "device %2$s." msgstr "" +"Zisten?? nepodporovan?? s??borov?? syst??m typu %1$s\n" +"na zariaden?? %2$s." #. TRANSLATORS: Error message displayed during probing, #. %1$s is replaced by the partition table type (e.g. BSD), @@ -1712,6 +1715,8 @@ "Detected an unsupported partition table of type %1$s on the\n" "device %2$s." msgstr "" +"Zisten?? nepodporovan?? tabu??ka oddielov typu %1$s\n" +"na zariaden?? %2$s." #. TRANSLATORS: name of partition type msgid "Diagnostics Partition" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/ActiongraphImpl.cc new/libstorage-ng-4.4.70/storage/ActiongraphImpl.cc --- old/libstorage-ng-4.4.68/storage/ActiongraphImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/ActiongraphImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2021] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -234,9 +234,9 @@ Actiongraph::Impl::vertex_descriptor - Actiongraph::Impl::add_vertex(Action::Base* action) + Actiongraph::Impl::add_vertex(const shared_ptr<Action::Base>& action) { - return boost::add_vertex(shared_ptr<Action::Base>(action), graph); + return boost::add_vertex(action, graph); } @@ -250,11 +250,11 @@ void - Actiongraph::Impl::add_chain(const vector<Action::Base*>& actions) + Actiongraph::Impl::add_chain(const vector<shared_ptr<Action::Base>>& actions) { vertex_descriptor v1 = 0; - for (vector<Action::Base*>::const_iterator it = actions.begin(); it != actions.end(); ++it) + for (vector<shared_ptr<Action::Base>>::const_iterator it = actions.begin(); it != actions.end(); ++it) { (*it)->first = it == actions.begin(); (*it)->last = it == --actions.end(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/ActiongraphImpl.h new/libstorage-ng-4.4.70/storage/ActiongraphImpl.h --- old/libstorage-ng-4.4.68/storage/ActiongraphImpl.h 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/ActiongraphImpl.h 2022-01-05 12:30:11.000000000 +0100 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2020] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -128,7 +128,7 @@ uf_t used_features() const; - vertex_descriptor add_vertex(Action::Base* action); + vertex_descriptor add_vertex(const shared_ptr<Action::Base>& action); edge_descriptor add_edge(vertex_descriptor a, vertex_descriptor b); @@ -137,7 +137,7 @@ * the graph, linking each other with edges (dependencies) in the given * order. Also sets the first and last flag of the actions. */ - void add_chain(const vector<Action::Base*>& actions); + void add_chain(const vector<shared_ptr<Action::Base>>& actions); /** * Adds several edges (dependencies) to the graph, linking the actions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/BcacheCsetImpl.cc new/libstorage-ng-4.4.70/storage/Devices/BcacheCsetImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/BcacheCsetImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/BcacheCsetImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -226,11 +226,11 @@ void BcacheCset::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Deactivate(get_sid())); + actions.push_back(make_shared<Action::Deactivate>(get_sid())); - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/BcacheImpl.cc new/libstorage-ng-4.4.70/storage/Devices/BcacheImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/BcacheImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/BcacheImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -583,12 +583,12 @@ if(get_type() == BcacheType::BACKED) { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); if (has_bcache_cset()) - actions.push_back(new Action::AttachBcacheCset(get_sid())); + actions.push_back(make_shared<Action::AttachBcacheCset>(get_sid())); actiongraph.add_chain(actions); } @@ -604,27 +604,27 @@ if(get_type() == BcacheType::BACKED) { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if(lhs_bcache->has_bcache_cset() && has_bcache_cset()) { if(!lhs_bcache->get_bcache_cset()->get_impl().equal(get_bcache_cset()->get_impl())) { - actions.push_back(new Action::DetachBcacheCset(get_sid(), lhs_bcache->get_bcache_cset())); - actions.push_back(new Action::AttachBcacheCset(get_sid())); + actions.push_back(make_shared<Action::DetachBcacheCset>(get_sid(), lhs_bcache->get_bcache_cset())); + actions.push_back(make_shared<Action::AttachBcacheCset>(get_sid())); } } else if(lhs_bcache->has_bcache_cset() && !has_bcache_cset()) { - actions.push_back(new Action::DetachBcacheCset(get_sid(), lhs_bcache->get_bcache_cset())); + actions.push_back(make_shared<Action::DetachBcacheCset>(get_sid(), lhs_bcache->get_bcache_cset())); } else if(!lhs_bcache->has_bcache_cset() && has_bcache_cset()) { - actions.push_back(new Action::AttachBcacheCset(get_sid())); + actions.push_back(make_shared<Action::AttachBcacheCset>(get_sid())); } if(lhs_bcache->get_cache_mode() != get_cache_mode()) - actions.push_back(new Action::UpdateCacheMode(get_sid())); + actions.push_back(make_shared<Action::UpdateCacheMode>(get_sid())); actiongraph.add_chain(actions); } @@ -638,12 +638,12 @@ if(get_type() == BcacheType::BACKED) { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (is_active()) - actions.push_back(new Action::Deactivate(get_sid())); + actions.push_back(make_shared<Action::Deactivate>(get_sid())); - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } @@ -811,6 +811,7 @@ SystemCmd cmd(cmd_line, SystemCmd::DoThrow); } + Text Bcache::Impl::do_update_cache_mode_text(Tense tense) const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/BlkDeviceImpl.cc new/libstorage-ng-4.4.70/storage/Devices/BlkDeviceImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/BlkDeviceImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/BlkDeviceImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -535,7 +535,7 @@ // Only insert mount and resize actions if the devices exist in // LHS and RHS. - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (need_tmp_unmount && blk_filesystem_lhs) { @@ -549,13 +549,13 @@ { if (device_to_resize.child->exists_in_devicegraph(actiongraph.get_devicegraph(RHS))) { - actions.push_back(new Action::Resize(device_to_resize.child->get_sid(), resize_mode, + actions.push_back(make_shared<Action::Resize>(device_to_resize.child->get_sid(), resize_mode, device_to_resize.parent)); } } } - actions.push_back(new Action::Resize(get_sid(), resize_mode, nullptr)); + actions.push_back(make_shared<Action::Resize>(get_sid(), resize_mode, nullptr)); if (resize_mode == ResizeMode::GROW) { @@ -563,7 +563,7 @@ { if (device_to_resize.child->exists_in_devicegraph(actiongraph.get_devicegraph(LHS))) { - actions.push_back(new Action::Resize(device_to_resize.child->get_sid(), resize_mode, + actions.push_back(make_shared<Action::Resize>(device_to_resize.child->get_sid(), resize_mode, device_to_resize.parent)); } } @@ -580,12 +580,12 @@ if (!lhs.is_active() && is_active()) { - Action::Base* action = new Action::Activate(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::Activate>(get_sid()); actiongraph.add_vertex(action); } else if (lhs.is_active() && !is_active()) { - Action::Base* action = new Action::Deactivate(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::Deactivate>(get_sid()); actiongraph.add_vertex(action); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/DeviceImpl.cc new/libstorage-ng-4.4.70/storage/Devices/DeviceImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/DeviceImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/DeviceImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -276,9 +276,9 @@ void Device::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(sid)); + actions.push_back(make_shared<Action::Create>(sid)); actiongraph.add_chain(actions); } @@ -313,13 +313,13 @@ for (sid_t sid : added_sids) { const Device* device = actiongraph.get_devicegraph(RHS)->find_device(sid); - actiongraph.add_vertex(new Action::Reallot(get_sid(), ReallotMode::EXTEND, device)); + actiongraph.add_vertex(make_shared<Action::Reallot>(get_sid(), ReallotMode::EXTEND, device)); } for (sid_t sid : removed_sids) { const Device* device = actiongraph.get_devicegraph(LHS)->find_device(sid); - actiongraph.add_vertex(new Action::Reallot(get_sid(), ReallotMode::REDUCE, device)); + actiongraph.add_vertex(make_shared<Action::Reallot>(get_sid(), ReallotMode::REDUCE, device)); } } @@ -327,9 +327,9 @@ void Device::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Delete(sid)); + actions.push_back(make_shared<Action::Delete>(sid)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/DiskImpl.cc new/libstorage-ng-4.4.70/storage/Devices/DiskImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/DiskImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/DiskImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -254,9 +254,9 @@ const Environment& environment = actiongraph.get_storage().get_environment(); if (environment.get_target_mode() == TargetMode::IMAGE) { - vector<Action::Base*> actions; - actions.push_back(new Action::Create(get_sid())); - actions.push_back(new Action::Activate(get_sid())); + vector<shared_ptr<Action::Base>> actions; + actions.push_back(make_shared<Action::Create>(get_sid())); + actions.push_back(make_shared<Action::Activate>(get_sid())); actiongraph.add_chain(actions); } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/EncryptionImpl.cc new/libstorage-ng-4.4.70/storage/Devices/EncryptionImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/EncryptionImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/EncryptionImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -248,18 +248,18 @@ void Encryption::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); - actions.push_back(new Action::Activate(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); + actions.push_back(make_shared<Action::Activate>(get_sid())); if (in_etc_crypttab) - actions.push_back(new Action::AddToEtcCrypttab(get_sid())); + actions.push_back(make_shared<Action::AddToEtcCrypttab>(get_sid())); actiongraph.add_chain(actions); // Normally last means that the action is the last for the object. But - // this fails for LUKS encryption sind adding to /etc/crypttab must + // this fails for LUKS encryption since adding to /etc/crypttab must // happen after the root filesystem is mounted. If the root filesystem // in somehow located on the LUKS this results in a cycle in the // actiongraph. So set last to the activate action. @@ -283,12 +283,12 @@ if (!lhs.in_etc_crypttab && in_etc_crypttab) { - Action::Base* action = new Action::AddToEtcCrypttab(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::AddToEtcCrypttab>(get_sid()); actiongraph.add_vertex(action); } else if (lhs.in_etc_crypttab && !in_etc_crypttab) { - Action::Base* action = new Action::RemoveFromEtcCrypttab(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::RemoveFromEtcCrypttab>(get_sid()); actiongraph.add_vertex(action); } else if (lhs.in_etc_crypttab && in_etc_crypttab) @@ -297,7 +297,7 @@ if (get_blk_device()->get_name() != lhs.get_blk_device()->get_name()) { - Action::Base* action = new Action::RenameInEtcCrypttab(get_sid(), get_blk_device()); + shared_ptr<Action::Base> action = make_shared<Action::RenameInEtcCrypttab>(get_sid(), get_blk_device()); actiongraph.add_vertex(action); } } @@ -307,15 +307,15 @@ void Encryption::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (in_etc_crypttab) - actions.push_back(new Action::RemoveFromEtcCrypttab(get_sid())); + actions.push_back(make_shared<Action::RemoveFromEtcCrypttab>(get_sid())); if (is_active()) - actions.push_back(new Action::Deactivate(get_sid())); + actions.push_back(make_shared<Action::Deactivate>(get_sid())); - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/GptImpl.cc new/libstorage-ng-4.4.70/storage/Devices/GptImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/GptImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/GptImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -120,12 +120,12 @@ void Gpt::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); if (pmbr_boot) - actions.push_back(new Action::SetPmbrBoot(get_sid())); + actions.push_back(make_shared<Action::SetPmbrBoot>(get_sid())); actiongraph.add_chain(actions); } @@ -140,14 +140,14 @@ if (pmbr_boot != lhs.pmbr_boot) { - Action::Base* action = new Action::SetPmbrBoot(get_sid()); + shared_ptr<Action::SetPmbrBoot> action = make_shared<Action::SetPmbrBoot>(get_sid()); actiongraph.add_vertex(action); } if (!undersized && lhs.undersized) { - Action::Repair* repair = new Action::Repair(get_sid()); - actiongraph.add_vertex(repair); + shared_ptr<Action::Repair> action = make_shared<Action::Repair>(get_sid()); + actiongraph.add_vertex(action); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/ImplicitPtImpl.cc new/libstorage-ng-4.4.70/storage/Devices/ImplicitPtImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/ImplicitPtImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/ImplicitPtImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -175,9 +175,9 @@ void ImplicitPt::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid(), false, true)); + actions.push_back(make_shared<Action::Create>(get_sid(), false, true)); actiongraph.add_chain(actions); } @@ -186,9 +186,9 @@ void ImplicitPt::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Delete(get_sid(), false, true)); + actions.push_back(make_shared<Action::Delete>(get_sid(), false, true)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/Luks.cc new/libstorage-ng-4.4.70/storage/Devices/Luks.cc --- old/libstorage-ng-4.4.68/storage/Devices/Luks.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/Luks.cc 2022-01-05 12:30:11.000000000 +0100 @@ -131,6 +131,13 @@ } + void + Luks::reset_activation_infos() + { + Luks::Impl::reset_activation_infos(); + } + + bool is_luks(const Device* device) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/Luks.h new/libstorage-ng-4.4.70/storage/Devices/Luks.h --- old/libstorage-ng-4.4.68/storage/Devices/Luks.h 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/Luks.h 2022-01-05 12:30:11.000000000 +0100 @@ -97,6 +97,13 @@ */ void set_format_options(const std::string& format_options); + /** + * The library keeps track of whether the activation of a specific LUKS device was + * canceled and of the password. Using this function that information can be + * reset. + */ + static void reset_activation_infos(); + public: class Impl; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/LuksImpl.cc new/libstorage-ng-4.4.70/storage/Devices/LuksImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/LuksImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/LuksImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -133,22 +133,34 @@ } - /** - * Activation information about LUKS. - */ - struct LuksActivationInfo + namespace { - LuksActivationInfo() : canceled(false), password() {} - bool canceled; - string password; - }; + /** + * Activation information about LUKS. + */ + struct LuksActivationInfo + { + LuksActivationInfo() : canceled(false), password() {} + + bool canceled; + string password; + }; + + + /** + * Map with activation information about LUKS using the LUKS UUID as the key. + */ + map<string, LuksActivationInfo> luks_activation_infos; + + } - /** - * Map with activation information about LUKS using the LUKS UUID as the key. - */ - map<string, LuksActivationInfo> luks_activation_infos; + void + Luks::Impl::reset_activation_infos() + { + luks_activation_infos.clear(); + } bool diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/LuksImpl.h new/libstorage-ng-4.4.70/storage/Devices/LuksImpl.h --- old/libstorage-ng-4.4.68/storage/Devices/LuksImpl.h 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/LuksImpl.h 2022-01-05 12:30:11.000000000 +0100 @@ -47,7 +47,7 @@ public: Impl(const string& dm_name) - : Encryption::Impl(dm_name), uuid(), label(), format_options() {} + : Encryption::Impl(dm_name) {} Impl(const xmlNode* node); @@ -111,6 +111,8 @@ virtual void do_deactivate() const override; virtual uf_t do_deactivate_used_features() const override { return UF_LUKS; } + static void reset_activation_infos(); + protected: void probe_uuid(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/LvmLvImpl.cc new/libstorage-ng-4.4.70/storage/Devices/LvmLvImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/LvmLvImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/LvmLvImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -885,7 +885,7 @@ if (get_name() != lhs.get_name()) { - Action::Base* action = new Action::Rename(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::Rename>(get_sid()); actiongraph.add_vertex(action); action->first = action->last = true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/LvmVgImpl.cc new/libstorage-ng-4.4.70/storage/Devices/LvmVgImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/LvmVgImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/LvmVgImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -518,12 +518,12 @@ void LvmVg::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (is_partial()) - actions.push_back(new Action::ReduceMissing(get_sid())); + actions.push_back(make_shared<Action::ReduceMissing>(get_sid())); - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/MdImpl.cc new/libstorage-ng-4.4.70/storage/Devices/MdImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/MdImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/MdImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -584,12 +584,12 @@ void Md::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); if (in_etc_mdadm) - actions.push_back(new Action::AddToEtcMdadm(get_sid())); + actions.push_back(make_shared<Action::AddToEtcMdadm>(get_sid())); actiongraph.add_chain(actions); @@ -627,12 +627,12 @@ if (!lhs.in_etc_mdadm && in_etc_mdadm) { - Action::Base* action = new Action::AddToEtcMdadm(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::AddToEtcMdadm>(get_sid()); actiongraph.add_vertex(action); } else if (lhs.in_etc_mdadm && !in_etc_mdadm) { - Action::Base* action = new Action::RemoveFromEtcMdadm(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::RemoveFromEtcMdadm>(get_sid()); actiongraph.add_vertex(action); } } @@ -641,15 +641,15 @@ void Md::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (in_etc_mdadm) - actions.push_back(new Action::RemoveFromEtcMdadm(get_sid())); + actions.push_back(make_shared<Action::RemoveFromEtcMdadm>(get_sid())); if (is_active()) - actions.push_back(new Action::Deactivate(get_sid())); + actions.push_back(make_shared<Action::Deactivate>(get_sid())); - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.4.70/storage/Devices/PartitionImpl.cc --- old/libstorage-ng-4.4.68/storage/Devices/PartitionImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Devices/PartitionImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -315,11 +315,11 @@ void Partition::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; bool nop = is_implicit_pt(get_partition_table()); - actions.push_back(new Action::Create(get_sid(), false, nop)); + actions.push_back(make_shared<Action::Create>(get_sid(), false, nop)); if (default_id_for_type(type) != id) { @@ -331,17 +331,17 @@ }; if (!contains(skip_ids, id)) - actions.push_back(new Action::SetPartitionId(get_sid())); + actions.push_back(make_shared<Action::SetPartitionId>(get_sid())); } if (!label.empty()) - actions.push_back(new Action::SetPartitionLabel(get_sid())); + actions.push_back(make_shared<Action::SetPartitionLabel>(get_sid())); if (boot) - actions.push_back(new Action::SetBoot(get_sid())); + actions.push_back(make_shared<Action::SetBoot>(get_sid())); if (legacy_boot) - actions.push_back(new Action::SetLegacyBoot(get_sid())); + actions.push_back(make_shared<Action::SetLegacyBoot>(get_sid())); actiongraph.add_chain(actions); } @@ -366,25 +366,25 @@ if (get_id() != lhs.get_id()) { - Action::Base* action = new Action::SetPartitionId(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetPartitionId>(get_sid()); actiongraph.add_vertex(action); } if (label != lhs.label) { - Action::Base* action = new Action::SetPartitionLabel(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetPartitionLabel>(get_sid()); actiongraph.add_vertex(action); } if (boot != lhs.boot) { - Action::Base* action = new Action::SetBoot(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetBoot>(get_sid()); actiongraph.add_vertex(action); } if (legacy_boot != lhs.legacy_boot) { - Action::Base* action = new Action::SetLegacyBoot(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetLegacyBoot>(get_sid()); actiongraph.add_vertex(action); } } @@ -393,11 +393,11 @@ void Partition::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; bool nop = is_implicit_pt(get_partition_table()); - actions.push_back(new Action::Delete(get_sid(), false, nop)); + actions.push_back(make_shared<Action::Delete>(get_sid(), false, nop)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/BlkFilesystemImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/BlkFilesystemImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/BlkFilesystemImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/BlkFilesystemImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -507,18 +507,18 @@ void BlkFilesystem::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); if (!get_label().empty() && supports_modify_label()) - actions.push_back(new Action::SetLabel(get_sid())); + actions.push_back(make_shared<Action::SetLabel>(get_sid())); if (!get_uuid().empty() && supports_modify_uuid()) - actions.push_back(new Action::SetUuid(get_sid())); + actions.push_back(make_shared<Action::SetUuid>(get_sid())); if (!tune_options.empty()) - actions.push_back(new Action::SetTuneOptions(get_sid())); + actions.push_back(make_shared<Action::SetTuneOptions>(get_sid())); actiongraph.add_chain(actions); } @@ -531,7 +531,7 @@ const Impl& lhs = dynamic_cast<const Impl&>(lhs_base->get_impl()); - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (get_type() != lhs.get_type()) { @@ -540,17 +540,17 @@ if (get_label() != lhs.get_label()) { - actions.push_back(new Action::SetLabel(get_sid())); + actions.push_back(make_shared<Action::SetLabel>(get_sid())); } if (get_uuid() != lhs.get_uuid()) { - actions.push_back(new Action::SetUuid(get_sid())); + actions.push_back(make_shared<Action::SetUuid>(get_sid())); } if (get_tune_options() != lhs.get_tune_options()) { - actions.push_back(new Action::SetTuneOptions(get_sid())); + actions.push_back(make_shared<Action::SetTuneOptions>(get_sid())); } actiongraph.add_chain(actions); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -521,15 +521,15 @@ void Btrfs::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid())); + actions.push_back(make_shared<Action::Create>(get_sid())); if (!get_label().empty()) - actions.push_back(new Action::SetLabel(get_sid())); + actions.push_back(make_shared<Action::SetLabel>(get_sid())); if (quota) - actions.push_back(new Action::SetQuota(get_sid())); + actions.push_back(make_shared<Action::SetQuota>(get_sid())); actiongraph.add_chain(actions); } @@ -544,7 +544,7 @@ if (quota != lhs.quota) { - Action::Base* action = new Action::SetQuota(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetQuota>(get_sid()); actiongraph.add_vertex(action); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsQgroupImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsQgroupImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsQgroupImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsQgroupImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -268,7 +268,7 @@ void BtrfsQgroup::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; bool sync_only = false; @@ -301,10 +301,10 @@ } } - actions.push_back(new Action::Create(get_sid(), sync_only)); + actions.push_back(make_shared<Action::Create>(get_sid(), sync_only)); if (referenced_limit != std::nullopt || exclusive_limit != std::nullopt) - actions.push_back(new Action::SetLimits(get_sid())); + actions.push_back(make_shared<Action::SetLimits>(get_sid())); actiongraph.add_chain(actions); } @@ -317,10 +317,10 @@ const Impl& lhs = dynamic_cast<const Impl&>(lhs_base->get_impl()); - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (lhs.referenced_limit != referenced_limit || lhs.exclusive_limit != exclusive_limit) - actions.push_back(new Action::SetLimits(get_sid())); + actions.push_back(make_shared<Action::SetLimits>(get_sid())); actiongraph.add_chain(actions); } @@ -332,9 +332,9 @@ if (contains(actiongraph.btrfs_qgroup_delete_is_nop, get_btrfs()->get_sid())) return; - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Delete(get_sid())); + actions.push_back(make_shared<Action::Delete>(get_sid())); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsSubvolumeImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsSubvolumeImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/BtrfsSubvolumeImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/BtrfsSubvolumeImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -479,15 +479,15 @@ void BtrfsSubvolume::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid(), is_top_level())); + actions.push_back(make_shared<Action::Create>(get_sid(), is_top_level())); if (nocow) - actions.push_back(new Action::SetNocow(get_sid())); + actions.push_back(make_shared<Action::SetNocow>(get_sid())); if (default_btrfs_subvolume && !is_top_level()) - actions.push_back(new Action::SetDefaultBtrfsSubvolume(get_sid())); + actions.push_back(make_shared<Action::SetDefaultBtrfsSubvolume>(get_sid())); actiongraph.add_chain(actions); } @@ -507,13 +507,13 @@ if (nocow != lhs.nocow) { - Action::Base* action = new Action::SetNocow(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetNocow>(get_sid()); actiongraph.add_vertex(action); } if (default_btrfs_subvolume && !lhs.default_btrfs_subvolume) { - Action::Base* action = new Action::SetDefaultBtrfsSubvolume(get_sid()); + shared_ptr<Action::Base> action = make_shared<Action::SetDefaultBtrfsSubvolume>(get_sid()); actiongraph.add_vertex(action); } } @@ -522,7 +522,7 @@ void BtrfsSubvolume::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; // set sync_only if this is the top-level subvolume bool sync_only = is_top_level(); @@ -530,7 +530,7 @@ // set nop if the btrfs filesystem is also deleted bool nop = contains(actiongraph.btrfs_subvolume_delete_is_nop, get_btrfs()->get_sid()); - actions.push_back(new Action::Delete(get_sid(), sync_only, nop)); + actions.push_back(make_shared<Action::Delete>(get_sid(), sync_only, nop)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/MountPointImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/MountPointImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/MountPointImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/MountPointImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -405,13 +405,13 @@ void MountPoint::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (active) - actions.push_back(new Action::Mount(get_sid())); + actions.push_back(make_shared<Action::Mount>(get_sid())); if (in_etc_fstab) - actions.push_back(new Action::AddToEtcFstab(get_sid())); + actions.push_back(make_shared<Action::AddToEtcFstab>(get_sid())); actiongraph.add_chain(actions); } @@ -424,11 +424,11 @@ const Impl& lhs = dynamic_cast<const Impl&>(lhs_base->get_impl()); - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (lhs.in_etc_fstab && !in_etc_fstab) { - actions.push_back(new Action::RemoveFromEtcFstab(get_sid())); + actions.push_back(make_shared<Action::RemoveFromEtcFstab>(get_sid())); } // A unmount action could be required when the device is set as unmounted in the target system @@ -436,7 +436,7 @@ // currently mounted in the system. if (lhs.active && (!active || lhs.path != path)) { - actions.push_back(new Action::Unmount(get_sid())); + actions.push_back(make_shared<Action::Unmount>(get_sid())); } if (lhs.in_etc_fstab && in_etc_fstab) @@ -444,7 +444,7 @@ if (lhs.mount_by != mount_by || lhs.mount_options != mount_options || lhs.freq != freq || lhs.passno != passno || lhs.path != path) { - actions.push_back(new Action::UpdateInEtcFstab(get_sid())); + actions.push_back(make_shared<Action::UpdateInEtcFstab>(get_sid())); } } @@ -453,12 +453,12 @@ // mounted in the target system. if (active && (!lhs.active || lhs.path != path)) { - actions.push_back(new Action::Mount(get_sid())); + actions.push_back(make_shared<Action::Mount>(get_sid())); } if (!lhs.in_etc_fstab && in_etc_fstab) { - actions.push_back(new Action::AddToEtcFstab(get_sid())); + actions.push_back(make_shared<Action::AddToEtcFstab>(get_sid())); } // Check whether the name of the device used in fstab has changed. @@ -479,7 +479,7 @@ if (blk_device->get_name() != blk_device_lhs->get_name()) { - actions.push_back(new Action::RenameInEtcFstab(get_sid(), blk_device_lhs)); + actions.push_back(make_shared<Action::RenameInEtcFstab>(get_sid(), blk_device_lhs)); } } } @@ -492,13 +492,13 @@ void MountPoint::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (in_etc_fstab) - actions.push_back(new Action::RemoveFromEtcFstab(get_sid())); + actions.push_back(make_shared<Action::RemoveFromEtcFstab>(get_sid())); if (active) - actions.push_back(new Action::Unmount(get_sid())); + actions.push_back(make_shared<Action::Unmount>(get_sid())); actiongraph.add_chain(actions); } @@ -668,7 +668,7 @@ const string& - Mount::get_path(Actiongraph::Impl& actiongraph) const + Mount::get_path(const Actiongraph::Impl& actiongraph) const { const MountPoint* mount_point = to_mount_point(get_device(actiongraph)); return mount_point->get_path(); @@ -676,7 +676,7 @@ string - Mount::get_rootprefixed_path(Actiongraph::Impl& actiongraph) const + Mount::get_rootprefixed_path(const Actiongraph::Impl& actiongraph) const { const MountPoint* mount_point = to_mount_point(get_device(actiongraph)); return mount_point->get_impl().get_rootprefixed_path(); @@ -684,7 +684,7 @@ const MountPoint* - Mount::get_mount_point(Actiongraph::Impl& actiongraph) const + Mount::get_mount_point(const Actiongraph::Impl& actiongraph) const { return to_mount_point(get_device(actiongraph)); } @@ -715,7 +715,7 @@ const string& - Unmount::get_path(Actiongraph::Impl& actiongraph) const + Unmount::get_path(const Actiongraph::Impl& actiongraph) const { const MountPoint* mount_point = to_mount_point(get_device(actiongraph)); return mount_point->get_path(); @@ -723,7 +723,7 @@ string - Unmount::get_rootprefixed_path(Actiongraph::Impl& actiongraph) const + Unmount::get_rootprefixed_path(const Actiongraph::Impl& actiongraph) const { const MountPoint* mount_point = to_mount_point(get_device(actiongraph)); return mount_point->get_impl().get_rootprefixed_path(); @@ -747,7 +747,7 @@ const string& - AddToEtcFstab::get_path(Actiongraph::Impl& actiongraph) const + AddToEtcFstab::get_path(const Actiongraph::Impl& actiongraph) const { const MountPoint* mount_point = to_mount_point(get_device(actiongraph, RHS)); return mount_point->get_path(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/MountPointImpl.h new/libstorage-ng-4.4.70/storage/Filesystems/MountPointImpl.h --- old/libstorage-ng-4.4.68/storage/Filesystems/MountPointImpl.h 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/MountPointImpl.h 2022-01-05 12:30:11.000000000 +0100 @@ -238,10 +238,10 @@ virtual void commit(CommitData& commit_data, const CommitOptions& commit_options) const override; virtual uf_t used_features(const Actiongraph::Impl& actiongraph) const override; - const string& get_path(Actiongraph::Impl& actiongraph) const; - string get_rootprefixed_path(Actiongraph::Impl& actiongraph) const; + const string& get_path(const Actiongraph::Impl& actiongraph) const; + string get_rootprefixed_path(const Actiongraph::Impl& actiongraph) const; - const MountPoint* get_mount_point(Actiongraph::Impl& actiongraph) const; + const MountPoint* get_mount_point(const Actiongraph::Impl& actiongraph) const; }; @@ -255,8 +255,8 @@ virtual Text text(const CommitData& commit_data) const override; virtual void commit(CommitData& commit_data, const CommitOptions& commit_options) const override; - const string& get_path(Actiongraph::Impl& actiongraph) const; - string get_rootprefixed_path(Actiongraph::Impl& actiongraph) const; + const string& get_path(const Actiongraph::Impl& actiongraph) const; + string get_rootprefixed_path(const Actiongraph::Impl& actiongraph) const; }; @@ -270,7 +270,7 @@ virtual Text text(const CommitData& commit_data) const override; virtual void commit(CommitData& commit_data, const CommitOptions& commit_options) const override; - const string& get_path(Actiongraph::Impl& actiongraph) const; + const string& get_path(const Actiongraph::Impl& actiongraph) const; virtual void add_dependencies(Actiongraph::Impl::vertex_descriptor vertex, Actiongraph::Impl& actiongraph) const override; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/MountableImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/MountableImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/MountableImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/MountableImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -178,25 +178,25 @@ void - Mountable::Impl::insert_mount_action(vector<Action::Base*>& actions) const + Mountable::Impl::insert_mount_action(vector<shared_ptr<Action::Base>>& actions) const { if (has_mount_point()) { const MountPoint* mount_point = get_mount_point(); if (mount_point->is_active()) - actions.push_back(new Action::Mount(mount_point->get_sid())); + actions.push_back(make_shared<Action::Mount>(mount_point->get_sid())); } } void - Mountable::Impl::insert_unmount_action(vector<Action::Base*>& actions) const + Mountable::Impl::insert_unmount_action(vector<shared_ptr<Action::Base>>& actions) const { if (has_mount_point()) { const MountPoint* mount_point = get_mount_point(); if (mount_point->is_active()) - actions.push_back(new Action::Unmount(mount_point->get_sid())); + actions.push_back(make_shared<Action::Unmount>(mount_point->get_sid())); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/MountableImpl.h new/libstorage-ng-4.4.70/storage/Filesystems/MountableImpl.h --- old/libstorage-ng-4.4.68/storage/Filesystems/MountableImpl.h 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/MountableImpl.h 2022-01-05 12:30:11.000000000 +0100 @@ -125,12 +125,12 @@ /** * Add mount action for all active mount points. Likely always used on RHS. */ - virtual void insert_mount_action(vector<Action::Base*>& actions) const; + virtual void insert_mount_action(vector<shared_ptr<Action::Base>>& actions) const; /** * Add unmount action for all active mount points. Likely always used on LHS. */ - virtual void insert_unmount_action(vector<Action::Base*>& actions) const; + virtual void insert_unmount_action(vector<shared_ptr<Action::Base>>& actions) const; virtual void probe_pass_2b(Prober& prober); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/NfsImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/NfsImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/NfsImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/NfsImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -245,9 +245,9 @@ void Nfs::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid(), true)); + actions.push_back(make_shared<Action::Create>(get_sid(), true)); actiongraph.add_chain(actions); } @@ -256,9 +256,9 @@ void Nfs::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Delete(get_sid(), true)); + actions.push_back(make_shared<Action::Delete>(get_sid(), true)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Filesystems/TmpfsImpl.cc new/libstorage-ng-4.4.70/storage/Filesystems/TmpfsImpl.cc --- old/libstorage-ng-4.4.68/storage/Filesystems/TmpfsImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Filesystems/TmpfsImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -177,9 +177,9 @@ void Tmpfs::Impl::add_create_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Create(get_sid(), true)); + actions.push_back(make_shared<Action::Create>(get_sid(), true)); actiongraph.add_chain(actions); } @@ -188,9 +188,9 @@ void Tmpfs::Impl::add_delete_actions(Actiongraph::Impl& actiongraph) const { - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; - actions.push_back(new Action::Delete(get_sid(), true)); + actions.push_back(make_shared<Action::Delete>(get_sid(), true)); actiongraph.add_chain(actions); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.68/storage/Holders/BtrfsQgroupRelationImpl.cc new/libstorage-ng-4.4.70/storage/Holders/BtrfsQgroupRelationImpl.cc --- old/libstorage-ng-4.4.68/storage/Holders/BtrfsQgroupRelationImpl.cc 2021-12-20 12:11:39.000000000 +0100 +++ new/libstorage-ng-4.4.70/storage/Holders/BtrfsQgroupRelationImpl.cc 2022-01-05 12:30:11.000000000 +0100 @@ -96,10 +96,10 @@ // Only btrfs qgroup relations between btrfs qgroups must be created in the // system. Relations from a btrfs or from a subvolume do not exists in the system. - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (is_btrfs_qgroup(get_source()) && is_btrfs_qgroup(get_target())) - actions.push_back(new Action::Create(make_pair(get_source_sid(), get_target_sid()))); + actions.push_back(make_shared<Action::Create>(make_pair(get_source_sid(), get_target_sid()))); actiongraph.add_chain(actions); } @@ -113,10 +113,10 @@ // See above. - vector<Action::Base*> actions; + vector<shared_ptr<Action::Base>> actions; if (is_btrfs_qgroup(get_source()) && is_btrfs_qgroup(get_target())) - actions.push_back(new Action::Delete(make_pair(get_source_sid(), get_target_sid()))); + actions.push_back(make_shared<Action::Delete>(make_pair(get_source_sid(), get_target_sid()))); actiongraph.add_chain(actions); }