Ticket #762 (closed defect: fixed)
Two Solaris SYSV.py patches - package version parsing, admin file flush
Reported by: | ITS Systems Bcfg2 Team <[email protected]…> | Owned by: | desai |
---|---|---|---|
Priority: | minor | Milestone: | Bcfg2 1.0.0 Release |
Component: | bcfg2-client | Version: | 1.0 |
Keywords: | SYSV | Cc: |
Description
This patch addresses two different problems we have encountered with the 1.0pre5 client under Solaris 10 update 6. FWIW we are using the stock Sun Python 2.4 with selected Python extensions built locally so the client can run.
1) The "admin" file for running pkgadd would be created but would be zero length when pkgadd would run. The effect was to disable the settings that allowed for setuid packages to be allowed noninteractively.
The reason appears to be because the temporary file contents are not flushed to disk until it is closed. Yet the file needs to remain open, because otherwise it would be removed entirely.
Flushing the file explicitly appears to have esolved the problem and made noninteractive package installations work.
2) We encountered a Solaris package that has spaces in the package name. The Solaris package utilities handle this fine, but the spaces broke SYSV.py's package name parsing. This in turn kept package verification from working.
In the name of brevity we changed the split criteria to the string ") ", representing the separator between the package architecture (e.g "(sparc)") and the package version. That has been working well for the past few weeks.
The attached patch is against revision 5413 of SYSV.py.
Attachments
Change History
Changed 14 years ago by ITS Systems Bcfg2 Team <[email protected]…>
- Attachment SYSV.py.patch added
Patch for SYSV.py