Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#44108 - [pacman-mirrorlist] Doesn't install full list on a new installation
Attached to Project:
Arch Linux
Opened by James (thx1138) - Monday, 09 March 2015, 09:52 GMT
Last edited by Allan McRae (Allan) - Tuesday, 17 March 2015, 00:44 GMT
Opened by James (thx1138) - Monday, 09 March 2015, 09:52 GMT
Last edited by Allan McRae (Allan) - Tuesday, 17 March 2015, 00:44 GMT
|
DetailsI just did an Arch install from scratch, with archlinux-2015.03.01-dual.iso, and the mirrorlist file, generated with rankmirrors from the iso, is not like the usual version installed on other Arch machines. That seems odd, after running "pacstrap". So, after rebooting, running native, I try re-installing pacman-mirrorlist. That package is about as simple as it can get. But the file, /etc/pacman.d/mirrorlist does not change, does not get over-written. "pacman -S pacman-mirrorlist", "pacman --force -S pacman-mirrorlist", "pacman -U <cache-file>", "pacman -U --force <cache-file>" - the install looks normal, but the mirrorlist file is never written. I unpacked the pacman-mirrorlist package from the cache file, and there is a normal mirrorlist file there. I can copy this manually to /etc/pacman.d/, but nothing I do with "pacman" will write that mirrorlist file to "/etc/pacman.d/".
Very odd? pacman 4.2.1-1 pacman-mirrorlist-20150228-1 |
This task depends upon
"I just did an Arch install from scratch, with archlinux-2015.03.01-dual.iso, and the mirrorlist file, generated with rankmirrors from the iso, is not like the usual version installed on other Arch machines. That seems odd, after running "pacstrap"."
If you used rankmirrors to create the mirror list, the mirror list will be different. Isn't this the point of using rankmirrors for this?
"So, after rebooting, running native, I try re-installing pacman-mirrorlist. That package is about as simple as it can get. But the file, /etc/pacman.d/mirrorlist does not change, does not get over-written. "pacman -S pacman-mirrorlist", "pacman --force -S pacman-mirrorlist", "pacman -U <cache-file>", "pacman -U --force <cache-file>" - the install looks normal, but the mirrorlist file is never written. I unpacked the pacman-mirrorlist package from the cache file, and there is a normal mirrorlist file there. I can copy this manually to /etc/pacman.d/, but nothing I do with "pacman" will write that mirrorlist file to "/etc/pacman.d/"."
etc/pacman.d/mirrorlist is in the backup array. Pacman will not overwrite it if you have changed it at all.
"Oh - and pacman should be writing a mirrorlist.pacnew file, and it does not."
Pacman will not create pacnew files on a reinstall, it only happens when the version in the package has changed.
The mirrorlist file installed by archlinux-2015.03.01-dual.iso is _not_ the same as the mirrorlist file supplied by pacman-mirrorlist-20150228-1. By default, apparently, pacstrap will install the mirrorlist file from archlinux-2015.03.01-dual.iso to the target file system.
Running pacstrap installs the "base" group, which includes "pacman", which depends upon "pacman-mirrorlist", which is then installed. But the new mirrorlist file from the pacman-mirrorlist package does _not_ replace the existing mirrorlist file, installed by pacstrap from the archlinux-2015.03.01-dual.iso.
Even a from-scratch Arch install does not quite provide a canonical result, with respect to the mirrorlist file.
> If you used rankmirrors to create the mirror list, the mirror list will be different. Isn't this the point of using rankmirrors for this?
"Different from what" is the issue here. What I want is a mirrorlist file "different from" the mirrorlist file in the pacman-mirrorlist package. What I have is a mirrorlist file "different from" the mirrorlist file in the archlinux-2015.03.01-dual.iso.
> etc/pacman.d/mirrorlist is in the backup array. Pacman will not overwrite it if you have changed it at all.
Of course the mirrorlist file coming from the archlinux-2015.03.01-dual.iso will appear "changed" relative to the mirrorlist file provided by the pacman-mirrorlist package. As you say, pacman will not overwrite the existing mirrorlist file.
> Pacman will not create pacnew files on a reinstall, it only happens when the version in the package has changed.
Since there has not been any package "version change", then there is no new ".pacnew" file created. The result is that a "re-install" does _not_ produce a "re-install"! This is counter-intuitive! This is "broken" behavior!
And finally, it appears that there is _no_way_ to write the _actual_ _current_ mirrorlist file to /etc/pacman.d/ using the automated tool, "pacman"! In fact, it is not even possible to replace the file by deleting it, since it is an essential file!
$ sudo pacman -S pacman-mirrorlist
error: config file /etc/pacman.d/mirrorlist could not be read: No such file or directory
It seems almost comical! Of course, the current mirrorlist file can be extracted manually from the pacman-mirrorlist package - but why should that be necessary?
What is wrong here, I ask rhetorically.
First, I notice now that pacstrap has an option:
-M Avoid copying the host's mirrorlist to the target
Perhaps that should be the default, rather than an option. But then, this supposes that pacstrap will run chroot and also read the mirrorlist file from the non-chroot file system. And there is a better alternative.
Second, it seems that something like "pacman --force" should consent to creating a ".pacnew" file in the /etc/ directory. That might be helpful.
Third, since the pacman-mirrorlist package mirrorlist file consists, by default, of only "commented-out" lines, then, as installed and unmodified, it is useless for downloading any package, including the pacman-mirrorlist package. And since it is necessary to create a modified version of the provided mirrorlist file, a more reasonable protocol would be to distinguish a "reference" mirrorlist file and a "working" mirrorlist file. This is effectively what happens when a mirrorlist.pacnew file is installed. So then, it would make more sense for the pacman-mirrorlist package to provide a "reference" mirrorlist file with a name _different_ from "mirrorlist", where this "reference" mirrorlist file is _always_ installed when pacman installs the pacman-mirrorlist package. In this case, for instance, the mirrorlist file from archlinux-2015.03.01-dual.iso would be the default "working" mirrorlist file, and the "reference" mirrorlist file would be installed by the pacman-mirrorlist package, * under a different name *. There are then no name space collisions. The attentive administrator would then create the "working" file from the "reference" file. I think this is the best approach.
Fourth, it would make sense to have a default "working" mirrorlist file in the pacman-mirrorlist package, which is _never_ installed over an existing "working" mirrorlist file, so that an otherwise "broken" system, with a missing mirrorlist file, would instead "just work", at least enough to "bootstrap" an installation. But that would be a nicety since this should never be necessary, assuming that a pacstrap installation had created some default "working" mirrorlist file already. This again assumes that there are different "working" and "reference" mirrorlist files.
1) pacman installs the pacman-mirrorlist package - it records the md5sum of the /etc/pacman.d/mirrorlist file
2) you "edit" the mirrorlist file with rankmirror
3) you reinstall/upgrade pacman-mirrorlist - pacman sees you have made changes to the mirrorlist file so it does not change it. It also see the mirrorlist file has not changed in the package file so there is no need to extract it.
This is pacman working as intended.
Yes, I see. Not good. Instead, always install a "reference" list. Call it "mirrorreference", for instance. Let "mirrorlist" be the "working" list. Do not confuse the two lists, since they have different purposes.
It is important to realize that, after a from-scratch install, THERE IS NO REFERENCE from which to make a backup! And also, THERE IS NO WAY to _generate_ or _install_ a reference, using the automated tools.
[1] https://www.archlinux.org/mirrorlist/
So far I don't feel like changing the package to ship a reference list rather than the mirror list is worth all the trouble it's probably going to create especially since the gain seems rather small.
Also if your issues is with the list shipped on the iso this bug should be assigned to someone else. I haven't booted an iso in a long time and I don't know what mirrorlist ships on that.