Opened 6 years ago

Last modified 4 years ago

#56759 new defect

restore_ports.tcl should install ccache early if configureccache is yes

Reported by: gthb (Gunnlaugur Thor Briem) Owned by:
Priority: Normal Milestone:
Component: contrib Version:
Keywords: Cc: l-g
Port:

Description

If configureccache is enabled, then most of the packages will still be installed without making use of the existing content in ccache, and without updating it, because ccache will be installed late in the restore process (since it has no dependees, except for vcsn). Warnings like this are emitted:

Warning: ccache_dir /opt/local/var/macports/build/.ccache could not be initialized; disabling ccache: couldn't execute "ccache": no such file or directory

To fix this, ccache should be sorted first, or early (i.e. treated as a dependency of any package that might use it). At least that's the manual workaround I used for this.

(To be clear, I don't know the real benefit of fixing this, beyond getting rid of the warning; when migrating after an OS X upgrade, maybe almost all the cache entries are invalidated anyway...)

Change History (3)

comment:1 Changed 6 years ago by gthb (Gunnlaugur Thor Briem)

(But even then, at least .ccache will be updated by the restore process, so there's always that benefit even if there's no speedup of the restore process itself.)

comment:2 Changed 6 years ago by raimue (Rainer Müller)

ccache will only help when rebuilding the same port over and over. It will not accelerate a single build of a port, so it will not help with restoring ports after migration. However, it might be worth to store the build objects in the cache while restoring the original set of ports.

To avoid the warnings, just install ccache manually before restoring ports with the script.

comment:3 Changed 4 years ago by l-g

Cc: l-g added
Note: See TracTickets for help on using tickets.