Bart Smaalders wrote:
Philip Brown wrote:
This is a real need. It's time to adjust the design, and drop the dogma.
The introduction of random, arbitrary scripting in packaging is a
complete failure to bound the scope of packaging operations, and
builds intimate knowledge of the current design of the system into
the packaging.
Here's how we handle driver installation in IPS for SUNW1394:
driver alias=pciclass,0c0010 name=hci1394 perms="* 0600 root sys"
driver installation, is a common action, that is basically the same, across
multiple packages. It makes sense to provide a common shared method of
installing a driver.
That's GREAT. That makes sense. That's basic "good programming 101":
if you have a common set of operations repeated in multiple places,
make a function/routine/class to handle it, so that you then have a single
clean place to update.
That logic does not apply in all situations, however.
There are some things that are purely one-shot operations unique to a
particular piece of software.
Not many. but they exist.
When a goal to be achieved is, "make the package install as fully and simply
as possible, without unneccessary user interaction", then you have two basic
choices:
A) build knowlege of the software, into the packaging system
B) build knowlege of "the system", into the package.
For the installation of drivers, you have gone with choice A. You have made
the packaging system "know about" the software in question: drivers.
Which is ok in this specific case, because most of the knowlege required is
actually about the OS, and in a way, the packaging system is part of the OS.
However, for more complex software, the knowlege required, is knowlege about
THE SOFTWARE in the package, more than the system the package is being
installed on.
Does that knowlege belong in the packaging system? Or in the package of the
software?
I thought you were the person most vehement against putting extraneous
knowlege in the packaging system.
If it doesnt belong in the packaging system, then it belongs in the package
itself. Which means, allowing full scripting to some degree. Otherwise, you
disallow elegant software installers from doing their job well.
As pointed out (a month ago?) by a sun employee on this list, there is a
straightforward way to encapsulate postinstall scripts in a way that would
make them run under IPS cleanly.
This method should be supported and documented, rather than hushed up.
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss