From: UnixOS2 Archive To: "UnixOS2 Archive" Date: Thu, 7 Nov 2002 04:40:41 EST-10EDT,10,-1,0,7200,3,-1,0,7200,3600 Subject: [UnixOS2_Archive] No. 365 ************************************************** Wednesday 06 November 2002 Number 365 ************************************************** Subjects for today 1 Re: installpkg : Andreas Buening **= Email 1 ==========================** Date: Thu, 07 Nov 2002 00:26:30 +0100 From: Andreas Buening Subject: Re: installpkg Michael Zolk wrote: > > On Mon, Nov 04, 2002 at 11:24:37PM +0100, Andreas Buening wrote: > > Hello! > > > > Is installpkd.cmd still supposed to be our package installation > > program? If yes, is there a maintainer of it? I couldn't find > > any email address. > > I guess this would be me :) Have you seen the latest version I uploaded > recently? I tried to change the directory structure to comply with the FHS. Not yet. > I also added a manpage where I tried to describe the various keywords in > the PKGINFO files. Great. [snip] > > 2) An additional keyword SCRIPTFILE that indicates that this file > > is a shell script whose 1st line "#!/bin/foo" has to be changed > > by an absolute path name "#!x:/bin/foo" at installation time. > > > > 3) Yet another additional keyword SCRIPTFILE2 that indicates that > > this file contains a lot of path names like "/usr/somewhere" > > that have to be replaced by "x:/usr/somewhere" at installation > > time. > > I think these are tasks for some sort of post-install script, not for > installpkg. I agree. installpkg should only put the files onto the right place. > I'd like to keep installpkg relatively small. One idea would be > to include scripts or small exes in the ux2_base pkg that perform these > common tasks like replacing/adding drive letters, creating desktop objects, > modifying configuration files. No. Every maintainer should be able to add an installation script to "his" package without bothering the ux2_base maintainer. I think installpkd should also not execute scripts specified by the SCRIPT keyword due to the following reason: If a user installs e.g. a library as the first package then it's not possible to execute any sh script because there is no sh.exe or any other GNU tool. It might be a better idea to write all the info from the SCRIPT keyword and the proposed SCRIPTFILE1 and SCRIPTFILE2 into a file in the /var tree so that one tool "ux2-update" can run all necessary scripts and perform any necessary file modification after the last package has been installed. > They could then be called from the > post-install script without the package maintainers having to reinvent the > wheel every time. Yes. And if the post-install script saves all the necessary commands in another file then this procedure can be repeated every time. I.e. if the user decides to move his UNIXROOT from e: to d:, then he copies all files and runs "ux2-update --reconfig-everthing" and all the post-install stuff will be executed as if it were the first install. > > 4) Support for the installation of large archives (hundreds of files). > > The current keyword "FILE dir/file" runs "unzip ... dir/file" > > which is a) very slow for huge numbers of files, b) very hard > > to maintain because you need hundreds of those FILE entries in > > your PKGINFO file. Maybe something like > > "unzip ... * -x exclude_list" might be considerable. > > I did it this way because it should be easier to handle locked files or > other errors this way. That's true. However, it'll definitely too slow for a zip file of several hundred files. And if you have hundreds of them ... :-) I don't know an immediate solution. Maybe installpkg just unpacks the archive into a temporary directory (/var/tmp/install.tmp?). If that's successfull it _moves_ all files into their correct position. If there are really files that can't be unlocked then installpkd prints a warning/error that the system has to be rebooted first. Or maybe this would also be a job for the post-install tool. Bye, Andreas -- One OS to rule them all, One OS to find them, One OS to bring them all and in the darkness bind them In the Land of Mordor where the Shadows lie.