Skip to content

Commit

Permalink
Merge pull request #66 from ancorgs/offer-partitions
Browse files Browse the repository at this point in the history
RootPart partially adapted to use storage-ng
  • Loading branch information
ancorgs committed Mar 3, 2017
2 parents 4742758 + fcaa7bc commit da7ead6
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 224 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Expand Up @@ -6,6 +6,6 @@ services:
before_install:
- docker build -t yast-update-image .
script:
# the "yast-travis-ruby" script is included in the base yastdevel/ruby image
# see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-update-image yast-travis-ruby
# the "storage-ng-travis-ruby" script is included in the base yastdevel/storage-ng image
# see https://github.com/yast/docker-storage-ng/blob/master/storage-ng-travis-ruby
- docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-update-image storage-ng-travis-ruby
2 changes: 1 addition & 1 deletion Dockerfile
@@ -1,3 +1,3 @@
FROM yastdevel/ruby
FROM yastdevel/storage-ng
COPY . /usr/src/app

4 changes: 4 additions & 0 deletions Rakefile
Expand Up @@ -3,4 +3,8 @@ require "yast/rake"
Yast::Tasks.configuration do |conf|
#lets ignore license check for now
conf.skip_license_check << /.*/
# Commit to the storage-ng project
conf.obs_project = "YaST:storage-ng"
# Make sure 'rake osc:sr' fails
conf.obs_sr_project = nil
end
7 changes: 7 additions & 0 deletions package/yast2-update.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Mar 3 12:46:55 UTC 2017 - ancor@suse.com

- storage-ng: detection of previous systems partially adapted.
- Version temporarily bumped to 3.3.x to prioritize this branch
- 3.3.0

-------------------------------------------------------------------
Mon Jan 30 12:07:55 UTC 2017 - igonzalezsosa@suse.com

Expand Down
8 changes: 4 additions & 4 deletions package/yast2-update.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-update
Version: 3.2.1
Version: 3.3.0
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand All @@ -41,9 +41,9 @@ BuildRequires: yast2-installation-control
# Needed for tests
BuildRequires: rubygem(rspec)

# Stroage::ChangeDmNamesFromCrypttab
BuildRequires: yast2-storage >= 2.22.9
Requires: yast2-storage >= 2.22.9
BuildRequires: yast2-storage-ng
# EnumMappings with MOUNT_BY_TYPE
Requires: yast2-storage-ng >= 0.1.12
# FSSnapshotStore
Requires: yast2 >= 3.1.126
Requires: yast2-installation
Expand Down
12 changes: 10 additions & 2 deletions src/include/update/rootpart.rb
Expand Up @@ -47,21 +47,29 @@ def initialize_update_rootpart(include_target)
Yast.import "Report"
Yast.import "Update"
Yast.import "Installation"
# storage-ng
=begin
Yast.import "FileSystems"
=end
Yast.import "Mode"
Yast.import "Product"
end

# Returns boolean whether partition can be
# a Linux 'root' file system
def CanBeLinuxRootFS(partition_fs)
if partition_fs == nil
if partition_fs.nil?
Builtins.y2error("partition_fs not defined!")
return false
end

# possible_root_fs contains list of supported FSs
Builtins.contains(FileSystems.possible_root_fs, partition_fs)
# storage-ng
# FIXME: this kind of checks should be responsibility of the upcoming
# Y2Storage::FilesystemType (to be added as part of the
# "yast-storage-ng as a libstorage wrapper" change)
possible_root_fs = [:ext2, :ext3, :ext4, :btrfs, :reiser, :xfs]
possible_root_fs.include?(partition_fs)
end

# flavor is either `update or `boot
Expand Down

0 comments on commit da7ead6

Please sign in to comment.