#606 Outdated info about scriptlet exit statuses
Opened 6 years ago by scop. Modified 3 years ago


The last chapter (the one starting with "Non-zero exit codes from scriptlets break installs/upgrades/erases") is mostly outdated information. I suggest removing it, or bringing it up to date with what actually happens nowadays.

Attached are two specfiles for a demonstration package that show the outdatedness: on upgrade, the %post failure in xx version 2 does not prevent removal of files owned only by the xx version 1 package, nor does it prevent running of the %preun of xx version 1. And the failure from xx version 1's %preun does not prevent removal of the files owned by xx version 1 on erase. No scriptlet errors leave any unexpected rpmdb entries behind.

I believe the only case where the exit status actually does matter these days is %pre; for example if a failing %pre scriptlet would be added to xx version 2, upgrade from 1 to 2 would not happen (nor would first install of xx version 2), but there would be no dupe rpmdb entries or unexpected files installed either. It would be a problem if something installed in the same transaction would require xx version 2 to be there after the upgrade or install transaction.

I think that it's important to know the exact RPM versions involved here. I assume this was tested on F22 and above, but if we drop that language then we'll at least need to let the EPEL people know whether any of it still applies to them.

So, is the language more outdated than in whatever horribly old RPM version is in EL5?

Also, note that I've been slowly trying to reorganize the Scriptlets page (which is why it was renamed from ScritletSnippets). I plan to try and move some scriptlet-related sections out of the main guidelines eventually.

Is the treatment of scriptlet exit codes documented upstream by RPM or DNF projects?

If not, would you be willing liaise with them to get some documentation contributed upstream?

I think I would rather simply link to the canonical sources of information instead of maintaining documentation in the guidelines.

We discussed this at this weeks meeting (http://meetbot.fedoraproject.org/fedora-meeting-1/2016-03-24/fpc.2016-03-24-16.01.txt):

  • Ticket #606 Outdated info about scriptlet exit statuses (geppetto, 16:14:20)
  • ACTION: Need answers and a draft, likely removing rpm/etc.
    documentation from guidlines (geppetto, 16:38:30)

Metadata Update from @tibbs:
- Issue assigned to tibbs

5 years ago

Just going over old tickets. It's been nearly year now and nothing has happened. And I just took a look at the initial sections of the scriptlets page and I see they could definitely use a cleanup pass. But if course I don't want to touch too much for fear of screwing it up.

Also, since EPEL5 goes EOL in six weeks, we're pretty much at the point where nothing needs to care about RPM older than 4.8. Does that make any of this easier?

Anyway, for the topic of this ticket, isn't it sufficient to just require that scriptlets exit 0 and not worry about providing a full explanation? We don't have to justify everything, and saying "MUST exit 0" is far easier than providing a complete accounting of when nonzero exits cause problems and when they don't.

Metadata Update from @tibbs:
- Issue close_status updated to: None
- Issue tagged with: needinfo

5 years ago

For more fun, I just realized that the main guidelines page also has its own copies of some of that information at https://fedoraproject.org/wiki/Packaging:Guidelines#Scriptlets. When I next get some time I'll move that all into the scriptlets guideline page and then deduplicate.

@tibbs, do we still need to do anything here?

Login to comment on this ticket.