|
From: Ali A. <ALI...@au...> - 2000-10-18 10:35:02
|
On Wed, 18 Oct 2000, Eric Bischoff wrote: > laszlo kovacs wrote: > > > > Hi Eric, > > > > Thanks for this, but I don't know much about packaging in general so I > > don't have much clue about what you are suggesting. > > Let me explain you. > > In Linux world, it's not the same person that programs the software and > that packages the software, unlike in Windows world. > > The software programmer produces a Makefile. This makefile has an > "install" section that is enough to install the software locally. > > The packager takes this makefile, runs it on his own computer, and sees > what comes of it. He usually gets a set of files that will go into some > list and be distributed. > > The problem appears when the makefile does not simply create a > standalone file, but *modifies* a centralized database. That's exactly > what will happen with scrollkeeper-install. There's no resulting file > that can simply be thrown into the distribution: the result is a > *portion* of a file. So the packager puts the corresponding instructions > in what is called a "post-installation" script. The packager builds the > package on his own computer, but he knows the post-installation script > will be run on the end-user's computer. > > This is why Dan's setup would simply not have worked. > > The most efficient solution and that will not require too much changes > in existing makefiles and specfiles is to split the script in two: > - one part, called in "install" section of the makefile, gathers all the > OMF info into a "metainformation snippet" > - another part, called in the post-installation script of the specfile > (or whatever equivalent), merges this snippet with the existing > database, which holds both the contents list and the OMF information. > > > Anyway the install > > and uninstall scripts are very easy to change as they are small so any > > change can be done quickly. > > Better so. Here is in short what I propose. > > Before: > > -------------------------------- > > In the Makefile: > > > install: > > > cp foo.sgml $(DOCDIR) > > > cp foo-omf $(DOCDIR) > > > scrollkeeper-install $(DOCDIR)/foo.sgml $(DOCDIR)/foo-omf > > -------------------------------- > 3 lines *per document* in the Makefile > > After: > > -------------------------------- > > In the Makefile: > > > install: > > > cp foo.sgml $(DOCDIR) > > > scrollkeeper-preinstall $(DOCDIR)/foo.sgml foo.omf > $(DOCDIR)/doc-contents.omf > > > > In the SPEC file: > > > %Post > > > scrollkeeper-install $DOCDIR/doc-contents.omf > > > > > > %Postun > > > scrollkeeper-uninstall $DOCDIR/doc-contents.omf > > > > > > %Files > > > $DOCDIR/doc-contents.omf > > -------------------------------- > 2 lines *per document* in the makefile > 3 lines *for all documents* in the specfile Unfortunately - when people './configure;make;make install' they will miss out on this aspect. What you might need to do is to create some sort of system/cron-job/daemon in which scrollkeeper checks the local files installed - if it is missing it will remove them from its internal database. Otherwise you will need a big huge README in each project saying "please run scrollkeeper-install after 'make install' is done" |