|
Bugzilla – Full Text Bug Listing |
| Summary: | zypper handles transaction incorrectly and executes scripts in wrong order (%pretrans, %posttrans ) | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Forgotten User GoRuE32ebs <forgotten_GoRuE32ebs> |
| Component: | libzypp | Assignee: | E-mail List <zypp-maintainers> |
| Status: | RESOLVED DUPLICATE | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P2 - High | CC: | sbahling |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Tarball containg RPMs used in described example. Including source RPMs. | ||
|
Description
Forgotten User GoRuE32ebs
2012-08-03 10:55:32 UTC
Actually all scripts are executed by rpm, but we invoke rpm to install single packages. Using larger transactions has some cons, OTOH we currently can't tell rpm not to execute any %trans, so zypp itself can't collect and execute them. So we have to see how to solve this best. Are there examples of packages that actually depend on this interleaved scriptlet ordering? Is it good practice to require two packages to be installed in the same transaction? I understand it being possible, but I do not understand it being required. My expectation is that installing dep before test using two rpm transactions will successfully install the packages in the same way as installing them using one transaction. Or am I missing something? The result should not be different, but the amount of pre/posttrans calls is. If you e.g. have 3000 TeX related packages, all of them calling texconfig/update in their posttrans, you feel the difference. *** This bug has been marked as a duplicate of bug 773575 *** Well not exactly. I agree that in most cases the result should be the same, but could also be different, depends on what is in the test pretrans script. E.g. Nagios and Ganglia add user accounts in the pre script if they are not already present. The ID is not specified and chosen by useradd. Sometimes it is desirable to have the ID fix, e.g. in a failover scenario that involves more than one host. If the Nagios or Ganglia RPM is installed as a dependency of another RPM it would be possible to create that user account with a fix ID in the pretrans script. This is currently not possible with zypper because it runs the pretrans script after all the scripts in the depending RPM. Yum handles these scenario correctly. Uh, you can't do such things in the pretrans script, as "useradd" is not available in an empty system. Basically all pretrans scripts must be written in lua. The packages I spoke about are typically added to a fully installed host not an empty system. And I guess are also not part of a "from scratch" installation transaction. The useradd thing should only serve as an example and has nothing to do with the basic problem. |