Open yurivict opened 5 years ago
Actually, I don't understand why any locking is needed during the fetch phase. With my typical download speeds (~20-100kB/s) it's really a PITA to do any other work on ports (e.g. running portupgrade
) while fetching packages because of this.
Feel free to briefly obtain the lock and verify that nothing bad had happened after the download, but please do not hold the lock while download is in progress. It's generally considered bad practice to hold locks for arbitrarily long periods of time.
Actually, I don't understand why any locking is needed during the fetch phase.
Because 2 or more different processes would be fetching the same file at the same time and conflict with each other. Currently it's only pkg
and it locks the other directory, but pkg
can be run from jail that shares /var/cache/pkg
with the host system.
Currently locking is done based on
/var/db/pkg
. However,/var/db/pkg
and/var/cache/pkg
contain different types of information. Package databases may be separate (for example, in different jails), but cache may be shared between them to reduce network downloads.In such case the errors like this occur: