On 2020/11/08 12:10, Marc Espie wrote:
> Here's a major tweak to both update-plist and corresponding documentation.
> I'm afraid that a lot of people are not running pkglocate at all, because
> it takes a lot of time when a lot of files are involved, so I propose a
> "middle ground" as default, which should be acceptable to everyone.
>
> - by default update-plist will only run pkglocate on "new files", stuff
> that was not already in the existing plists.
> - there's still the existing optimization of having a PKGLOCATE_COOKIE,
> which means that pkglocate won't run again while adjusting some details of
> the plist if it's run again.
>
> and so, we end up with two options: -F which still prevents pkglocate from
> running at all (probably unnecessary and dangerous in most cases now, even
> though finding conflicts in the dependency tree takes a bit of time, I don't
> think it's a lot) and -f, which should be used from time to time, in case
> you want to run "full" conflict checks.
>
> [Note that in case of version changes, assuming there are proper variables
> in place in the plists, there will be no "new files", as we substitute
> variables on the existing plist, so files will gracefully move over to the
> new version without any human intervention]
>
> Assuming everyone "plays ball" and dutifully checks for conflicts at least
> once for a new port, -f should not even be needed.
>
> Okays ?
This works as advertised and certainly helps with many ports, checks
for updates of things like ansible, solr, librenms are greatly improved
with this.
OK with me.
net/unifi is still a problem though, taking 4-5 minutes running all cores
at 100% cpu. Unfortunately most of the filenames in the PLIST for this
change each time, a typical PLIST diff is something like 3849 - 4018 +
so this optimisation doesn't help there. There are probably not too many
ports like this (especially that are updated as often)
Do you think it would be hard to add smarts to optimise for directories?
Taking my pathological example, there are 3500+ files in
/usr/local/share/unifi/webapps/ROOT/app-unifi/angular/g20ab6be/.
If that dir itself does not show up in pkglocatedb from another port
then there's no need to match the files inside it one by one.
This would help for full conflict checks for a lot of more normal ports
too - picking a few from my local plist_db there are things like go,
mariadb-tests, calibre, ansible - all have lots of files in dirs unique
to the port (I think this would be the case for many p5/py/ruby/PHP ports).
No comments:
Post a Comment