Problem removing package from previous deployment

Hi, I have been trying to remove a layered package, and couldn’t seem to do it. It turned out that the package was removed from the most recent deployment, but was present in the other bootable deployment.

I rebooted, choosing the previous deployment in grub, and checked the rpm-ostree status command to confirm I was in the previous deployment, which listed the package. But it wasn’t available on the command line.

It seems that even though rpm-ostree status listed me as on the previous deployment, I was actually in the latest, and then I ran rpm-ostree reset and it removed all my layered packages from the most recent deployment, leaving the previous deployment alone.

That’s not right isn’t it?
Should I open an issue?

So, I was booted into 207, and ran ‘rpm-ostree reset’ and all the layered packages from 215 were removed.

Am I correct in thinking that that is not expected behaviour?

I wrote this a while ago for a tangentially related question:

Looking at rpm-ostree status, you’ll see up to three deployments by default (pinning can add more). First is the pending deployment that will be used on the next boot (if there is one), next is the booted deployment (marked with a ‘●’), and finally there’s the rollback deployment. Here’s a little visualization to help understand how this works:

If you boot the rollback deployment using the bootloader menu:

$ rpm-ostree status
  bad deployment  (0) # pending
● good deployment (1) # booted
  <none>              # rollback

If you then run rpm-ostree rollback:

$ rpm-ostree status
  <none>              # pending
● good deployment (0) # booted
  bad deployment  (1) # rollback

rpm-ostree rollback changes the default deployment (index 0). If the booted deployment is currently the default, it swaps places with the rollback deployment. If it’s not, it becomes the default, and the pending deployment becomes the rollback (as shown above).

All transactions are performed against the pending deployment, or the booted deployment if there isn’t one. When you booted the rollback deployment, the newer deployment became the pending deployment.

Were you looking at the booted deployment (●) or the pending one above it?

I was definitely in the booted deployment, and the dot was next to the 207 version.
I expected that I would be able to adjust that specific tree.

I didn’t use the rpm-ostree rollback command.

I am fairly certain that something is wrong.

I have restarted this morning, and without running any commands since the last time I was booted, I have just checked the rpm-ostree status, and the 207 deployment is no longer listed, only the 215 deployment.

So, as it stands, and with only the 215 deployment available, I can no longer investigate the issue. I am tempted to reinstall, but will see if I can continue for the moment. I am running an upgrade, and maybe I will experience a similar issue once two deployments are installed.