[Deployment] Upgrading Rails packages on CentOS uninstalls them
|Assignee:||Javier Bértoli||% Done:|
|Target version:||Arvados Future Sprints|
|Story points||0.5||Remaining (hours)||0.00 hour|
|Velocity based estimate||-|
When yum upgrades a package, it runs the postinst script for the newly installed version, then runs the cleanup script for the previously installed version. Our cleanup script always removes the package, so upgrading a package effectively uninstalls it. The cleanup script needs to recognize the "upgrade from previous version" call, and not clean up anything in that case.
#3 Updated by Brett Smith about 1 year ago
- Status changed from New to In Progress
http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TIME-SCRIPTS is the cite that explains why this is the correct change.
#5 Updated by Brett Smith about 1 year ago
Nico Cesar wrote:
review @ acab2f7c338f245baa7e5d9dca57476d12d863bf
I don't see a clear reason for the previous " [ "$1" = "1" ] || [ "$1" = "2" ] " . but whatever, LGTM now.
I think it was just copied over as boilerplate from the postinst (where it makes more sense). Thanks.
#8 Updated by Brett Smith 11 months ago
Brett Smith wrote:
Still an issue as of the 2016-03-30 packages.
Actually, this might be mistaken. It might be that the current packages are fine, but the postrm from previously-installed (and buggy) packages runs as you upgrade. If that's the case, there's really no way around this other than to go through, or somehow inhibit the buggy postrm from running.