From: Klemens Nanni Subject: Re: fix "PLIST.orig already exists" To: Peter Hessler Cc: ports@openbsd.org Date: Sun, 24 Mar 2024 08:34:42 +0000 On Sat, Mar 23, 2024 at 04:11:04PM +0100, Peter Hessler wrote: > this error is worthless and a waste of time, stop generating it: > /usr/ports/www/yt-dlp/pkg/PLIST changed but /usr/ports/www/yt-dlp/pkg/PLIST.orig exists It says PLIST changed, but only internal plist info changed and not the actual file, so this is in fact an indicator to 'mv PLIST.new PLIST'. Quick test in sysutils/portroach-cli: Index: Makefile =================================================================== RCS file: /cvs/ports/sysutils/portroach-cli/Makefile,v diff -u -p -U0 -r1.15 Makefile --- Makefile 9 Mar 2023 13:03:33 -0000 1.15 +++ Makefile 24 Mar 2024 08:30:27 -0000 @@ -6,0 +7 @@ MAINTAINER = Klemens Nanni Updating plist for portroach-cli-1.9 Reading existing plist for portroach-cli-1.9 Scanning /usr/ports/pobj/portroach-cli-1.9/fake-amd64 Removing .debug artefacts Figuring out tie points Tieing loose objects Copying objects Looking for unregistered conflicts /p/sysutils/portroach-cli/pkg/PLIST changed but /p/sysutils/portroach-cli/pkg/PLIST.orig exists $ cvs diff pkg/PLIST $ ls pkg/ CVS/ DESCR PLIST PLIST.new PLIST.orig Just dropping this means, in addition to PLIST.new semantics, you then have to find out about all of this yourself, which is not an improvement, imho. Instead, it could either ensure PLIST is updated and silently do whatever with PLIST.orig, or it could instruct what to do: plist changed, can't move PLIST because PLIST.orig exists, use PLIST.new > > OK? > > Index: infrastructure/bin/update-plist > =================================================================== > RCS file: /cvs/openbsd/ports/infrastructure/bin/update-plist,v > diff -u -p -u -p -r1.214 update-plist > --- infrastructure/bin/update-plist 14 May 2023 09:18:05 -0000 1.214 > +++ infrastructure/bin/update-plist 23 Mar 2024 15:07:59 -0000 > @@ -1392,7 +1392,6 @@ $self->write_new_files; > > # and now, we figure out where to move the new files > my @towrite = (); > -my $cantmove = 0; > > my $exitcode = 0; > > @@ -1412,22 +1411,13 @@ for my $p (@{$self->{lists}}) { > } else { > print "$k changed"; > push(@towrite, $k); > - if (-f "$k$orig") { > - print " but $k$orig exists\n"; > - $cantmove = 1; > - } else { > - print "\n"; > - } > + print "\n"; > } > } else { > print "$k is new\n"; > push(@towrite, $k); > } > } > -} > - > -if ($cantmove) { > - exit(2); > } > > if ($self->{state}->not) { > > > -- > Facts are stubborn, but statistics are more pliable. >