Skip to content
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

rpm: do not always remove compatible symlink during upgrading #551

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

kenhys
Copy link
Contributor

@kenhys kenhys commented Jul 27, 2023

Before:

v4 => v5 => upgrading... it will remove cpmpatible symlinks => v5.x

After:

v4 => v5 => upgrading... do not remove compatible symlinks => v5.x

Before:

  v4 => v5 => upgrading... it will remove cpmpatible symlinks => v5.x

After:

  v4 => v5 => upgrading... do not remove compatible symlinks => v5.x

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
@kenhys
Copy link
Contributor Author

kenhys commented Jul 27, 2023

Try upgrade from v4 => v5 => v5.

$ sudo yum install -y ./rpmbuild/RPMS/x86_64/fluent-package-5.0.0-2.el7.x86_64.rpm 
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Examining ./rpmbuild/RPMS/x86_64/fluent-package-5.0.0-2.el7.x86_64.rpm: fluent-package-5.0.0-2.el7.x86_64
Marking ./rpmbuild/RPMS/x86_64/fluent-package-5.0.0-2.el7.x86_64.rpm as an update to fluent-package-5.0.0-1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package fluent-package.x86_64 0:5.0.0-1.el7 will be updated
---> Package fluent-package.x86_64 0:5.0.0-2.el7 will be an update
--> Finished Dependency Resolution

After upgrading, compatible symlink was kept.

$ ls -la /usr/sbin/td-agent*
lrwxrwxrwx. 1 root root 17 Jul 27 04:56 /usr/sbin/td-agent -> /usr/sbin/fluentd
lrwxrwxrwx. 1 root root 20 Jul 27 04:56 /usr/sbin/td-agent-gem -> /usr/sbin/fluent-gem

After removing fluent-package, symlink was removed (expected).

$ sudo yum remove fluent-package.x86_64 
Failed to set locale, defaulting to C
$ ls -la /usr/sbin/td*
ls: cannot access /usr/sbin/td*: No such file or directory

@kenhys kenhys requested a review from daipom July 27, 2023 05:06
Copy link
Contributor

@daipom daipom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@daipom daipom merged commit aa964d9 into fluent:master Jul 27, 2023
10 of 11 checks passed
@kenhys kenhys deleted the not-remove-symlink branch August 7, 2023 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants