You are not logged in.
Heya people,
i've ran into weird behavior with the pacman-mirrorlist package this evening. instead of providing any new mirrorlist.pacnew, upgrading said package removes mirrorlist.pacnew and empties mirrorlist.
No problem thanks to the mirrorlist generator, but just because I was curious i tried it again and the same thing happened. mirrorlist.pacnew removed and mirrorlist empty.
It happened once in the past and today again and i am wondering if someone else has the same weird problem as i haven't found another forum post yet that describes this exact problem?
PS.: i checked the pkg.tar.gz in /var/cache/pacman and it does indeed contain a valid mirrorlist. so it's not a faulty download or something
Last edited by madmaurice (2016-02-08 18:26:10)
Offline
Try installing the package again with --debug and post the output.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
I do not know how pacman would be emptying your mirrorlist, but removing the .pacnew file is a known bug: https://bugs.archlinux.org/task/47993
Offline
Output: http://sprunge.us/NfZi
Offline
I had the same problem, yesterday (no pacnew file after mirrorlist package update installation). Since my working mirrorlist file still exists, I ignored it, but if this continues, future updates will not be obtainable (if they are installed but immediately deleted by pacman).
Tim
Offline
Not creating a pacnew file is normal when the file doesn't change between packages.
Offline
when the file doesn't change between packages.
That would only be true if the extant mirrorlist had no un-commented lines (and would thus be non-functional), surely?
EDIT: FWIW I have updated two machines recently and the mirorlist.pacnew files were created as usual.
Last edited by Head_on_a_Stick (2016-02-09 14:14:26)
Offline
That's not what I mean. 20160208-1 and 20160208-2 contain exactly the same mirrorlist, so updating from the first to the second will not create a pacnew file.
Last edited by Scimmia (2016-02-09 14:15:16)
Offline
That's not what I mean. 20160208-1 and 20160208-2 contain exactly the same mirrorlist, so updating from the first to the second will not create a pacnew file.
That's desired if I don't change said file, but as we're talking about the mirrorlist in which We usually uncomment mirrors to use on every update, the file has indeed changed and it should create a pacnew file wether or not the original mirrorlist didn't change or not as my "configuration" differs from the new "configuration"
And it should certainly not delete any previous pacnew file or empty the mirrorlist.
Edit:
As far I as I learned it from using pacman until now. the idea of a pacnew file was to be created on an update if my configuration differs from the previous original. Not if the new original differs from the previous original.
P.S.: Why the hell was there a second mirrorlist update when the content of mirrorlist didn't change anyway?
Last edited by madmaurice (2016-02-10 12:05:08)
Offline
pacman has never created a pacnew file when the file did not change between package versions whether it was modified on the system or not.
Offline
pacman has never created a pacnew file when the file did not change between package versions whether it was modified on the system or not.
I guess I never stop learning. yet it still shouldn't delete any present pacnew file in that case and if it should i guess i have to maintain a second backup of the mirrorlist.
Offline
That's not what I mean. 20160208-1 and 20160208-2 contain exactly the same mirrorlist, so updating from the first to the second will not create a pacnew file.
Which makes me wonder why there are two versions if they are exactly the same?
But, ok then.
Tim
Offline
It had more to do with the method of building the package than the payload of the package itself. People are working towards reproducible builds on Arch, which requires all packages be built in a clean chroot. Occasionally, shortcuts were taken.
Offline
apg wrote:pacman has never created a pacnew file when the file did not change between package versions whether it was modified on the system or not.
I guess I never stop learning. yet it still shouldn't delete any present pacnew file in that case and if it should i guess i have to maintain a second backup of the mirrorlist.
This is a known bug and has a fix for the next release (coming soon TM)
Offline
madmaurice wrote:apg wrote:pacman has never created a pacnew file when the file did not change between package versions whether it was modified on the system or not.
I guess I never stop learning. yet it still shouldn't delete any present pacnew file in that case and if it should i guess i have to maintain a second backup of the mirrorlist.
This is a known bug and has a fix for the next release (coming soon TM)
Thanks Allan, I know, apg already referred me to the bug report earlier in the thread, and I'm eagerly awaiting a fix for that.
About the empty mirrorlist itself, that might have been my fault.
I've wrote a script which I run after a mirrorlist upgrade that collects mirrors of a desired country from the pacnew file and saves it into the mirrorlist.
I found out that said script doesn't check for the existance of the pacnew file. My bad.
If nobody wants to add more to the conversation/argument I'd close this thread as people are already taking care of the pacnew problem.
Edit: Apparently i can't close a thread on this board.
- mad.
Last edited by madmaurice (2016-02-13 05:06:14)
Offline
I also wrote a script for the mirror list. It does 3 things.
* Comment out all mirrors.
* Uncomment the mirror I want.
* Add my local nginx proxy in at the top.
I'm hoping the newfangled hooks will allow me to run this script automatically.
If I were the package maintainer it would be easy. But I'm not.
Last edited by severach (2016-02-13 09:03:24)
Offline
I'm not sure I follow. If you have your own mirrorlist, a mirrorlist.pacnew is going to be created. You can create an alias to remove mirrorlist.pacnew:
$ type rmir
rmir is aliased to `sudo rm -f /etc/pacman.d/mirrorlist.pacnew'
Offline
Or simply add the mirrorlist to NoExtract in pacman.conf
Offline
I forgot the step where I overwrite the old mirrorlist with the .pacnew. I got tired of hand editing the mirrorlist.pacnew each time so I wrote this.
#!/bin/sh
if [ -s 'mirrorlist.pacnew' ]; then
echo 'Server = http://192.168.50.10:8080/archlinux/$repo/os/$arch' > 'mirrorlist'
sed -e 's:^Server:#&:g' \
-e 's|^#\(Server = http://mirrors\.favorite1\.com/.*\)$|\1|g' \
-e '#s|^#\(Server = http://mirrors\.favorite2\.com/.*\)$|\1|g' \
'/etc/pacman.d/mirrorlist.pacnew' >> 'mirrorlist'
rm 'mirrorlist.pacnew'
fi
I tap this every time a mirrorlist.pacnew comes down and I get all the updates with my settings applied.
Offline
I'm not sure I follow. If you have your own mirrorlist, a mirrorlist.pacnew is going to be created. You can create an alias to remove mirrorlist.pacnew:
$ type rmir rmir is aliased to `sudo rm -f /etc/pacman.d/mirrorlist.pacnew'
No. My problem isn't that there is a pacnew file. my problem is that pacman deletes any pacnew file on update if the contents haven't changed from a previous version.
@severach
here is my script:
#!/bin/bash
if [ $# -ne 1 ]; then
echo "$0 <Country>"
exit 1
fi
country=$1
INPUT=/etc/pacman.d/mirrorlist.pacnew
OUTPUT=/etc/pacman.d/mirrorlist
if [ ! -f "$INPUT" ]; then
echo "$INPUT is missing."
exit 1
fi
cat $INPUT | awk -v "COUNTRY=$country" 'BEGIN { c="" } /^##/ { c=substr($0,4); } /^#Server/ { if(c==COUNTRY) { print substr($0,2); } }' | rankmirrors - | sudo tee $OUTPUT
it selects all mirrors in the pacnew from a country you gave as an argument, runs it through rankmirrors and then saves it as mirrorlist.
(Edit: I added the 2nd if clause the other day to prevent creating an empty mirrorlist if the pacnew file doesn't exist)
Last edited by madmaurice (2016-02-15 08:25:26)
Offline
Please edit the first post of this thread and add [SOLVED] to the subject/title.
It is solved, right? Even if the bug gets fixed the script is better with the check.
Edit: by "the bug" I mean pacman deleting the pacnew
Last edited by Ziusudra (2016-02-15 08:44:37)
Offline