freight-team / freight

A modern take on the Debian archive.
Other
107 stars 37 forks source link

Copy packages to pool if hardlinking is not supported #91

Open Burgos opened 6 years ago

Burgos commented 6 years ago

On filesystems where hardlinking is not supported, freight-cache will failback to copy to add packages into the pool, which will support serving repositories from these filesystems (such as cloud storage mounted with fuse).

Burgos commented 6 years ago

Turns out this doesn't work good with purging the cache's pool. I'll investigate if it can be improved.

minecraftchest1 commented 3 years ago

What about symlinks?

skybert commented 10 months ago

Turns out this doesn't work good with purging the cache's pool. I'll investigate if it can be improved.

Yes, I was bitten by this one yesterday. In my case, it was if the target file is read only, freight will fall back to cp (with this PR). This means the link count isn't increased, on which the logic in apt_clean() relies, causing it to remove the DEB in the cache pool. apt-cache would find the package since the Packages was correct, but apt-get would fail to install it. Because errors from ln were redirected to /dev/null, it was rather tricky to figure out.

What about symlinks?

That doesn't update the link count, which breaks apt_clean()