New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix path to media/build info file #738

Merged
merged 2 commits into from Sep 4, 2018

Conversation

Projects
None yet
3 participants
@dgdavid
Member

dgdavid commented Sep 4, 2018

From https://bugzilla.suse.com/show_bug.cgi?id=1062297

after installation I could not find /etc/YaST2/build

There is no more /build - it has been integrated into /media. And yast needs to copy it in place of /build

This RFC is to know your point of view about what to do with the destination of /media.1/media in the installed system:

* Keep as it is: /build
* Change to /media
* Copy to both: /media and /build (does have sense???)

This PR change the source from /media.1/build to /media.1/media and destination to /media, but also keeping /build for backward compatibility with other (not adapted yet) tools, as @lslezak suggested in #yast IRC channel.


Related to https://trello.com/c/O0F6RkaQ

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Sep 4, 2018

Coverage Status

Coverage increased (+0.03%) to 21.122% when pulling 0a2a3bd on feature/fix-bsc-1062297 into 463f7d3 on master.

coveralls commented Sep 4, 2018

Coverage Status

Coverage increased (+0.03%) to 21.122% when pulling 0a2a3bd on feature/fix-bsc-1062297 into 463f7d3 on master.

@dgdavid dgdavid changed the title from [RFC] Fix path to media/build info file to Fix path to media/build info file Sep 4, 2018

@lslezak

Just some minor issues...

log.info("Copying /media.1/media file to /media")
media_destination = File.join(Installation.destdir, Directory.etcdir, "media")
::FileUtils.cp(media_file, media_destination)
::FileUtils.chmod(0o644, media_destination)

This comment has been minimized.

@lslezak

lslezak Sep 4, 2018

Member

The o flag is not needed, in Ruby numbers starting with 0 are treated as octal numbers. IIRC we do not use it in the YaST code.

# irb
irb(main):001:0> 0o644
=> 420
irb(main):002:0> 0644
=> 420
@lslezak

lslezak Sep 4, 2018

Member

The o flag is not needed, in Ruby numbers starting with 0 are treated as octal numbers. IIRC we do not use it in the YaST code.

# irb
irb(main):001:0> 0o644
=> 420
irb(main):002:0> 0644
=> 420

This comment has been minimized.

@dgdavid

dgdavid Sep 4, 2018

Member

Good to know :) I'll replace all occurrences of 0o644 by 0644 in the project.

Thank you!

@dgdavid

dgdavid Sep 4, 2018

Member

Good to know :) I'll replace all occurrences of 0o644 by 0644 in the project.

Thank you!

This comment has been minimized.

@dgdavid

dgdavid Sep 4, 2018

Member

We changed them, but then we realize that it is an offense for the current Rubocop configuration 😜

@dgdavid

dgdavid Sep 4, 2018

Member

We changed them, but then we realize that it is an offense for the current Rubocop configuration 😜

This comment has been minimized.

@lslezak

lslezak Sep 4, 2018

Member

Ah, sorry for that, I thought the default is the opposite... 😬

@lslezak

lslezak Sep 4, 2018

Member

Ah, sorry for that, I thought the default is the opposite... 😬

Show outdated Hide outdated src/lib/installation/clients/copy_files_finish.rb

dgdavid added some commits Sep 4, 2018

Fix path to media/build info file (bsc#1062297)
From SLE15 on, /media.1/build file is not longer available. Instead, the
information used to be there is now in /media.1/media file. So, it was
needed to change both, the source and destination of file, but keeping
backward compatibility for those tools not adapted yet.
@lslezak

lslezak approved these changes Sep 4, 2018

LGTM

@dgdavid dgdavid merged commit 6f60f40 into master Sep 4, 2018

3 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 21.122%
Details

@dgdavid dgdavid deleted the feature/fix-bsc-1062297 branch Sep 4, 2018

@dgdavid dgdavid referenced this pull request Sep 10, 2018

Closed

Squad Sprint 62 Post Draft #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment