On Sat, Mar 19, 2022 at 07:43:26AM +0100, Anton Lindqvist wrote:
> On Thu, Mar 17, 2022 at 03:45:52PM -0600, Marc Espie wrote:
> > CVSROOT:    /cvs
> > Module name:        src
> > Changes by: es...@cvs.openbsd.org   2022/03/17 15:45:52
> > 
> > Modified files:
> >     usr.sbin/pkg_add/OpenBSD: Add.pm Delete.pm UpdateSet.pm Vstat.pm 
> > 
> > Log message:
> > add some extra logic to prevent moving files around when this is possible.
> > Specifically, we created pkg.XXXX temp files for updates to work.
> > 
> > When I added tied files, I generalized this to installs as well, because
> > it was becoming too complex.
> > 
> > Forward a few years:
> > - we have tags and define-tag, so we can deem a lot of UpdateSets "safe"
> > (because they don't run command during the deletion/installation, but at
> > the end, so they won't see unwanted files)
> > - the tied logic is well-proven
> > 
> > With this diff:
> > - installs will again extract files directly in-place, so that install
> > is (mostly) chown + utimes.
> > 
> > - updates will extract files with new names directly in-place
> > 
> > - tied files that didn't change names will have zero churn (instead
> > of link to pkg.XXXX, rm orig file, mv pkg.XXXX back to orig file)
> > 
> > After lots of tests involving somewhat broken things.
> > 
> > Okay sthen@
> > 
> > (if it breaks it's easy to revert, but the speed-up for stuff like
> > texlive minor updates is significant)
> 
> Something changed causing regress to fail.
> 
> > usr.sbin/pkg_add:
> Exit: 1
> Duration: 00:02:08
> Log: 244-usr.sbin-pkg_add.log
> 
> ==== temp-error3 ====
> --- temp3.out Sat Mar 19 06:05:51 2022
> +++ /home/src/regress/usr.sbin/pkg_add/temp3.ref      Tue Jul 16 11:34:29 2019
> @@ -0,0 +1,2 @@
> +User USER couldn't create temp file as /nonexistent/pkg.XXXXXXXXXX: No such 
> file or directory
> +1
> *** Error 1 in . (Makefile:705 'temp-error3': @diff -u temp3.out 
> /home/src/regress/usr.sbin/pkg_add/temp3.ref)
> FAILED
> 
Ah that's okay. It's actually fault injection that no longer triggers because
that case doesn't create a temp file

Reply via email to