On Thu, Sep 08, 2011 at 10:27:14AM +0100, Stuart Henderson wrote: > > However, the two @unexec lines in the old pkg/PLIST-main don't get > > fired during update (because they come too early). Trying to update > > to the new package fails: > > > > Collision in lout-3.39p0->lout-3.39p1: the following files already exist > > /usr/local/lib/lout/data/fontdefs.li (same checksum) > <snip> > > > > I guess this will need a special quirk to remove those files before > > the actual update happens. We've something like this for texlive, > > but my perl-foo is low, so I need some help. > > untested diff below, can you give this a go? filename is generic > (missingreg.pm) as I need something similar for smokeping (in that > case, @sample'd files in /var/www need moving to real files in a > subpackage).
[...] > diff -u -p -r1.60 Quirks.pm > --- Quirks.pm 20 Jul 2011 07:59:28 -0000 1.60 > +++ Quirks.pm 8 Sep 2011 09:23:44 -0000 > @@ -261,6 +261,10 @@ sub is_base_system > my ($self, $handle, $state) = @_; > > my $stem = OpenBSD::PackageName::splitstem($handle->pkgname); > + if ($stem =~ m/^lout/) { > + require OpenBSD::Quirks::missingreg; > + OpenBSD::Quirks::missingreg::addreg($handle, $state); Thanks. With the last line above changed to OpenBSD::Quirks::lout::addreg($handle, $state); it works (of course after adding missingreg.pm to do-install and updating the plist). The only ugliness (in the case of lout) is that i now get a couple of messages like File /usr/local/lib/lout/data/standard.li does not exist because those files are removed by the @unexec lines in the (old) plist but now added to the internal plist by the quirk. I don't know wether it's worth "fixing" this. Ciao, Kili