No - they are not broken
I do think I am being misrepresented here - I donāt recall exemplifying anything like this.
Since I have been tagged - I have to say that I have had various observations over the years regarding pacman and how it handles sync.
Because I didnāt dive into the pacman code - I was heavily occupied in coding pacman-mirrors and at the same time learning the Python language - my understanding may have been flawed.
As you may recognise - this learning process may have led me to pass inaccurate understanding of the sync process onto my fellow community members - please accept my sincere apology for such inaccurate understanding.
With the HTTP protocol you can intercept the answer
- query the Last-Modified header
- compare the value to the value of an existing file
- if the comparison checks out you can abort the request
- or continue downloading
When you use a single -y
, pacman will compare the date of an existing metadata file and skip downloading if the dates are equal or newer.
How exactly the comparison is made will require a deep dive into the pacman and libalpm source code - I have not done so.
On the other hand, using a doubled -yy
will instruct pacman to ignore Last-Modified and download anyway.
I have gathered some experience running a mirror and I know that file systems may be corrupted especially on SSD so I know from experience - this is possible.
Because mirrors sync at different intervals and because those syncs are done using rsync - mirrors may or may not use the --delay-updates
option - there is a slight chance of short lived inconsistencies which may lead to 404 (Not Found) errors.
If a data corruption happens - the file may download but the content is garbage - thus the failure.
The only viable option for a member consuming that particular mirror will be to create a custom pool and exclude the mirror.
The short mirror story
I provided an official for some years 2017-2021 if memory serves and that ran without hick-ups on my Synology diskstation.
When I a new workstation I repurposed the previous to run the mirror i5 quad core with 32G ram on 500Mbit fibre. The device was equipped with a PCI card with room for 4 mSATA SSD disks.
This was setup using and md/raid10 spanning four disk using EXT4 - and just like before the mirror synced every 5m with the mother repo.
BUT within a few months the file system became corrupted with no warnings the raid went offline. This happened several times over the next year - I eventually took down the mirror - it had become a burden - not a pleasure.
I still mirror Manjaro unofficially - this time on a RPI4B 8GB and 500GB m2 SSD.
Index of /repo/
This nothing new - it has always been so - if you sync correct you will never end in a partial sync.
You cannot create a partial sync using either -Syu
or -Syyu
.
The double -yy only force a sync of the metadata - and this is recommended when you switch mirrors using pacman-mirrors as you cannot predict if new primary mirrors metadata is newer or older than the current.
It has been argued that pacman is capable of updating the metadata thus the -Syyu
has been changed to -Syu
on the wiki and that change will only create 404 (Not Found) errors - never partial sync.
But as most is using pamac and pamac has a history of metadata inconsistencies - the use of the doubled -yyu
has been necessary.
The only way you can create a partial upgrade is by using and up-to-date metadata to install one or more package(s).
Never do pacman -Sy <pkgname>
as this is the recipe to a partial sync state.