Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-storage-ng for 
openSUSE:Factory checked in at 2026-06-23 17:38:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1956 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-storage-ng"

Tue Jun 23 17:38:42 2026 rev:187 rq:1361171 version:5.0.49

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes        
2026-05-16 19:26:00.881697571 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-storage-ng.new.1956/yast2-storage-ng.changes  
    2026-06-23 17:40:49.534195736 +0200
@@ -1,0 +2,7 @@
+Fri Jun 19 13:25:53 UTC 2026 - José Iván López González <[email protected]>
+
+- Add method to get the required package objects (needed for
+  gh#agama-project/agama#3649).
+- 5.0.49
+
+-------------------------------------------------------------------

Old:
----
  yast2-storage-ng-5.0.48.tar.bz2

New:
----
  yast2-storage-ng-5.0.49.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-storage-ng.spec ++++++
--- /var/tmp/diff_new_pack.fqsnOY/_old  2026-06-23 17:40:51.306257529 +0200
+++ /var/tmp/diff_new_pack.fqsnOY/_new  2026-06-23 17:40:51.318257948 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-storage-ng
-Version:        5.0.48
+Version:        5.0.49
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only

++++++ yast2-storage-ng-5.0.48.tar.bz2 -> yast2-storage-ng-5.0.49.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.48/package/yast2-storage-ng.changes 
new/yast2-storage-ng-5.0.49/package/yast2-storage-ng.changes
--- old/yast2-storage-ng-5.0.48/package/yast2-storage-ng.changes        
2026-05-15 16:18:41.000000000 +0200
+++ new/yast2-storage-ng-5.0.49/package/yast2-storage-ng.changes        
2026-06-22 16:42:43.000000000 +0200
@@ -1,9 +1,16 @@
 -------------------------------------------------------------------
+Fri Jun 19 13:25:53 UTC 2026 - José Iván López González <[email protected]>
+
+- Add method to get the required package objects (needed for
+  gh#agama-project/agama#3649).
+- 5.0.49
+
+-------------------------------------------------------------------
 Fri May 15 13:43:54 UTC 2026 - Ancor Gonzalez Sosa <[email protected]>
 
 - Use the session keyring instead of the user one to communicate
   with sdbootutil (related to jsc#PED-10703).
-- 5.0.48 
+- 5.0.48
 
 -------------------------------------------------------------------
 Fri May 15 10:59:55 UTC 2026 - Ancor Gonzalez Sosa <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.48/package/yast2-storage-ng.spec 
new/yast2-storage-ng-5.0.49/package/yast2-storage-ng.spec
--- old/yast2-storage-ng-5.0.48/package/yast2-storage-ng.spec   2026-05-15 
16:18:41.000000000 +0200
+++ new/yast2-storage-ng-5.0.49/package/yast2-storage-ng.spec   2026-06-22 
16:42:43.000000000 +0200
@@ -16,7 +16,7 @@
 #
 
 Name:           yast2-storage-ng
-Version:        5.0.48
+Version:        5.0.49
 Release:        0
 Summary:        YaST2 - Storage Configuration
 License:        GPL-2.0-only OR GPL-3.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-storage-ng-5.0.48/src/lib/y2storage/feature.rb 
new/yast2-storage-ng-5.0.49/src/lib/y2storage/feature.rb
--- old/yast2-storage-ng-5.0.48/src/lib/y2storage/feature.rb    2026-05-15 
16:18:41.000000000 +0200
+++ new/yast2-storage-ng-5.0.49/src/lib/y2storage/feature.rb    2026-06-22 
16:42:43.000000000 +0200
@@ -1,4 +1,4 @@
-# Copyright (c) [2023] SUSE LLC
+# Copyright (c) [2023-2026] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -31,6 +31,42 @@
   #
   # This is the abstract base class for both.
   class Feature
+    # Nested class to represent a package associated to a feature
+    class Package
+      Yast.import "Package"
+
+      # Constructor
+      #
+      # @param name [String] see {#name}
+      # @param optional [Boolean] see {#optional?}
+      def initialize(name, optional: false)
+        @name = name
+        @optional = optional
+      end
+
+      # @return [String] name of the package
+      attr_reader :name
+
+      # Whether installation of the package can be skipped if the package is 
not
+      # available
+      #
+      # See the comment in {StorageFeature::OPTIONAL_PACKAGES} for more details
+      #
+      # @return [Boolean]
+      def optional?
+        !!@optional
+      end
+
+      # Check if a package is an optional package that is unavailable.
+      # See also bsc#1039830
+      #
+      # @return [Boolean] true if package is optional and unavailable,
+      #                   false if not optional or if available.
+      def unavailable_optional?
+        optional? && !Yast::Package.Available(name)
+      end
+    end
+
     include Yast::Logger
 
     # Constructor
@@ -49,27 +85,8 @@
     #
     # @return [Symbol]
     attr_reader :id
-
     alias_method :to_sym, :id
 
-    # Names of the packages that should be installed if the feature is going 
to be used
-    #
-    # @return [Array<String>]
-    def pkg_list
-      packages.map(&:name)
-    end
-
-    # Drop the cache about which packages related to the feature are available
-    def drop_cache
-      @packages = nil
-    end
-
-    private
-
-    # All packages that would be relevant for the feature, no matter if they 
are really available
-    # @return [Array<Feature::Package>]
-    attr_reader :all_packages
-
     # List of available packages associated to the feature
     #
     # @return [Array<Feature::Package>]
@@ -84,40 +101,22 @@
       @packages
     end
 
-    # Internal class to represent a package associated to a feature
-    class Package
-      Yast.import "Package"
-
-      # Constructor
-      #
-      # @param name [String] see {#name}
-      # @param optional [Boolean] see {#optional?}
-      def initialize(name, optional: false)
-        @name = name
-        @optional = optional
-      end
+    # Names of the packages that should be installed if the feature is going 
to be used
+    #
+    # @return [Array<String>]
+    def pkg_list
+      packages.map(&:name)
+    end
 
-      # @return [String] name of the package
-      attr_reader :name
+    # Drop the cache about which packages related to the feature are available
+    def drop_cache
+      @packages = nil
+    end
 
-      # Whether installation of the package can be skipped if the package is 
not
-      # available
-      #
-      # See the comment in {StorageFeature::OPTIONAL_PACKAGES} for more details
-      #
-      # @return [Boolean]
-      def optional?
-        !!@optional
-      end
+    private
 
-      # Check if a package is an optional package that is unavailable.
-      # See also bsc#1039830
-      #
-      # @return [Boolean] true if package is optional and unavailable,
-      #                   false if not optional or if available.
-      def unavailable_optional?
-        optional? && !Yast::Package.Available(name)
-      end
-    end
+    # All packages that would be relevant for the feature, no matter if they 
are really available
+    # @return [Array<Feature::Package>]
+    attr_reader :all_packages
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.48/src/lib/y2storage/storage_features_list.rb 
new/yast2-storage-ng-5.0.49/src/lib/y2storage/storage_features_list.rb
--- old/yast2-storage-ng-5.0.48/src/lib/y2storage/storage_features_list.rb      
2026-05-15 16:18:41.000000000 +0200
+++ new/yast2-storage-ng-5.0.49/src/lib/y2storage/storage_features_list.rb      
2026-06-22 16:42:43.000000000 +0200
@@ -72,6 +72,13 @@
       @pkg_list
     end
 
+    # Returns the list of required packages.
+    #
+    # @return [Array<Feature::Package>]
+    def packages
+      @features.flat_map(&:packages).uniq(&:name)
+    end
+
     # Concatenate the give features into the current list
     #
     # @param other_list [#to_a]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-storage-ng-5.0.48/test/y2storage/storage_features_list_test.rb 
new/yast2-storage-ng-5.0.49/test/y2storage/storage_features_list_test.rb
--- old/yast2-storage-ng-5.0.48/test/y2storage/storage_features_list_test.rb    
2026-05-15 16:18:41.000000000 +0200
+++ new/yast2-storage-ng-5.0.49/test/y2storage/storage_features_list_test.rb    
2026-06-22 16:42:43.000000000 +0200
@@ -2,7 +2,7 @@
 #
 # encoding: utf-8
 
-# Copyright (c) [2017-2023] SUSE LLC
+# Copyright (c) [2017-2026] SUSE LLC
 #
 # All Rights Reserved.
 #
@@ -126,4 +126,84 @@
       end
     end
   end
+
+  describe "#packages" do
+    subject(:list) { described_class.from_bitfield(bits) }
+
+    context "if several features require the same package" do
+      let(:bits) do
+        Storage::UF_EXT2 | Storage::UF_LUKS | Storage::UF_EXT3 | 
Storage::UF_PLAIN_ENCRYPTION
+      end
+
+      it "returns an array of Feature::Package objects" do
+        expect(list.packages).to all(be_a(Y2Storage::Feature::Package))
+      end
+
+      it "includes the package only once (no duplicates)" do
+        package_names = list.packages.map(&:name).sort
+        expect(package_names).to eq ["cryptsetup", "device-mapper", 
"e2fsprogs"]
+      end
+    end
+
+    context "if some packages are optional" do
+      let(:bits) { Storage::UF_NTFS | Storage::UF_EXT3 }
+
+      before do
+        Y2Storage::StorageFeature.drop_cache
+        allow(Yast::Package).to receive(:Available).and_return false
+        allow(Yast::Package).to 
receive(:Available).with("ntfsprogs").and_return true
+      end
+
+      it "returns Feature::Package objects with correct optional flag" do
+        packages = list.packages
+        e2fsprogs = packages.find { |p| p.name == "e2fsprogs" }
+        ntfsprogs = packages.find { |p| p.name == "ntfsprogs" }
+
+        expect(e2fsprogs.optional?).to be false
+        expect(ntfsprogs.optional?).to be true
+      end
+
+      it "includes the non-optional packages even if they are not available" do
+        package_names = list.packages.map(&:name)
+        expect(package_names).to include "e2fsprogs"
+      end
+
+      it "includes the optional packages that are available" do
+        package_names = list.packages.map(&:name)
+        expect(package_names).to include "ntfsprogs"
+      end
+
+      it "does not include the optional packages that are not available" do
+        package_names = list.packages.map(&:name)
+        expect(package_names).to_not include "ntfs-3g"
+      end
+    end
+
+    context "for a list created with a zero bit-field" do
+      let(:bits) { 0 }
+
+      it "returns an empty array" do
+        expect(list.packages).to eq []
+      end
+    end
+
+    context "when the list includes both storage and YaST features" do
+      let(:bits) { Storage::UF_LUKS }
+
+      before do
+        Y2Storage::YastFeature.drop_cache
+
+        list.concat(Y2Storage::YastFeature.all)
+      end
+
+      it "returns Feature::Package objects from both kinds of features" do
+        expect(list.packages).to all(be_a(Y2Storage::Feature::Package))
+      end
+
+      it "includes the packages related to both kind of features" do
+        package_names = list.packages.map(&:name)
+        expect(package_names).to include("device-mapper", "cryptsetup", 
"fde-tools")
+      end
+    end
+  end
 end

Reply via email to