On Sun, Feb 25, 2001 at 09:34:19AM +0000, Julian Gilbey wrote: > On Sun, Feb 25, 2001 at 05:15:37AM +0100, Eric Van Buggenhaut wrote: > > > Remember to correctly unwind, moving the conffile back to its original > > > place > > > (as long as the original file does not exist) in the abort-install and > > > abort-upgrade targets of preinst, postrm and postinst. [never tried this, > > > but that seems to be what's needed from the not-so-clear policy chapter 6] > > > > In the package I maintain, called crafty, I moved /etc/craftyrc to > > /etc/crafty.rc and /var/cache/crafty to /var/lib/crafty in the previous > > version (17.9). Version now is 17.13. The 'move' routine is still in preinst > > of the latest version because we don't know what version people are > > upgrading > > from. > > > > Now that's my problem : if upgrade fails or is aborted, I should move the > > files > > back to their original location. But if people are upgrading from a > > 'post-move' > > version, the original location is different than if they were upgrading > > from a > > 'pre-move' location. > > > > So, where do I move the files back ??? > > Copy in the preinst, remove the old one in the postinst (with > "configure" argument). That'll do the job.
That's what I read in one of your previous message and it made sense to me. Then Henrique argued that it was a bad idea. On Sat, Feb 24, 2001 at 10:42:38PM -0300, Henrique M Holschuh wrote: > On Sun, 25 Feb 2001, Julian Gilbey wrote: > > On Fri, Feb 23, 2001 at 03:57:33PM -0800, Sean 'Shaleh' Perry wrote: > > > in your preinst, check for /etc/foo and if it exists, mkdir /etc/package > > > and > > > > Perhaps better: copy it in the postinst, remove the old version in the > > postinst. Then if any problems arise, the original version will still > > be present. > > BAD idea. This will defeat the conffile change detection engine in dpkg, and > will cause problems in some cases. Don't do that. > Did he just say that because of the typo ? s/postinst/preinst ? Henrique ? > > Julian > > -- > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- > > Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London > Debian GNU/Linux Developer, see http://people.debian.org/~jdg > Donate free food to the world's hungry: see http://www.thehungersite.com/ -- Eric VAN BUGGENHAUT [EMAIL PROTECTED]