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

Don't erase %{app_root} during %pre #80

Merged
merged 1 commit into from Oct 2, 2012

Conversation

jeckersb
Copy link
Member

Here's roughly what is happening here

  • RPM is asked to update aeolus-conductor
  • As part of the transaction, RPM checks the status of settings.yml.
    RPM finds that (1) settings.yml is marked as %config in the spec
    file, (2) settings.yml as shipped with $new_version contains the
    same content as shipped with $old_version (it ignores the contents
    of the file as it exists on the filesystem), and (3) settings.yml
    has local modifications (via aeolus-configure).
  • Because of 1-3 above, RPM marks settings.yml to be skipped during
    the transaction.
  • The %pre scriptlet runs, and removes %{app_root}, which in turn
    removes settings.yml.
  • Because the transaction has already decided to skip settings.yml, no
    action is taken on it. At this point, the file is gone. RPM will
    not lay down the file as it exists in the RPM, nor will it produce
    any sort of .rpmsave or .rpmnew file.

Related bug:
860822 - aeolus-conductor RPM upgrade deletes settings.yml
https://bugzilla.redhat.com/show_bug.cgi?id=860822

Here's roughly what is happening here

- RPM is asked to update aeolus-conductor

- As part of the transaction, RPM checks the status of settings.yml.
  RPM finds that (1) settings.yml is marked as %config in the spec
  file, (2) settings.yml as shipped with $new_version contains the
  same content as shipped with $old_version (it ignores the contents
  of the file as it exists on the filesystem), and (3) settings.yml
  has local modifications (via aeolus-configure).

- Because of 1-3 above, RPM marks settings.yml to be skipped during
  the transaction.

- The %pre scriptlet runs, and removes %{app_root}, which in turn
  removes settings.yml.

- Because the transaction has already decided to skip settings.yml, no
  action is taken on it.  At this point, the file is gone.  RPM will
  not lay down the file as it exists in the RPM, nor will it produce
  any sort of .rpmsave or .rpmnew file.

Related bug:
860822 - aeolus-conductor RPM upgrade deletes settings.yml
https://bugzilla.redhat.com/show_bug.cgi?id=860822
@sseago
Copy link
Contributor

sseago commented Oct 2, 2012

ACK - works for me

sseago added a commit that referenced this pull request Oct 2, 2012
Don't erase %{app_root} during %pre
@sseago sseago merged commit 0d32ab2 into aeolusproject:master Oct 2, 2012
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.

None yet

2 participants