You are not logged in.

#26 2009-04-24 11:38:09

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

Yeah, the "-t" option changed (there was a post-install message about this). Still, using that exact command doesn't generate any errors here so I'm not sure what happened. Maybe it failed to retrieve the mirrorlist for some reason.

Do you get the same error every time you run that command?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#27 2009-04-24 17:06:16

Shunpike
Member
From: France
Registered: 2009-01-28
Posts: 47

Re: *****

I had that error once too, but now it's gone, maybe the update you made about the --fastest stuff made that disappear ?
MindTooth, do you have any clue of which perl-xyne-arch lib version you had at the time?

Last edited by Shunpike (2009-04-24 17:07:05)

Offline

#28 2009-04-24 17:41:32

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

I don't think that update would have affected it. From the code it seems like it would be due to the mirrorlist being empty. Maybe it occurs when the page is updating (I think the GerBra's script runs hourly).

If it happens again, I'll add some checks to make sure that the page was download before proceeding.

*edit*
A related problem was reported in the powerpill thread. I've updated perl-xyne-arch with what I hope is a fix.

Last edited by Xyne (2009-04-24 22:20:12)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#29 2009-10-29 16:27:40

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: *****

Would be nice to see that reflector pulled the Python dependencies. So you are sure it works when you try to install just reflector.

Birger smile

Offline

#30 2009-10-29 21:35:51

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

MindTooth wrote:

Would be nice to see that reflector pulled the Python dependencies. So you are sure it works when you try to install just reflector.

Birger smile

Huh?

What Python dependencies? Do you mean Perl? If so, that's a dependency of perl-xyne-arch so there's no reason to include it in the reflector package.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#31 2009-10-30 09:43:21

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: *****

Xyne, the python master :-D

Offline

#32 2009-10-30 12:22:57

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: *****

When I tried to run reflector without python installed, I only received an error. Stating it couldn't parse some python stuff.

Birger smile

Offline

#33 2009-10-30 16:59:06

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

I just tried running reflector after "pacman -Rd python" and had no problems. Can you please post the exact error message?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#34 2009-10-30 18:24:46

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: *****

rankmirrors needs python:

[root@mt-arch-01 ~]# reflector -l 20 -f 5 -o /etc/pacman.d/mirrorlist
sh: /usr/bin/rankmirrors: /usr/bin/python: bad interpreter: No such file or directory

So, my bad then wink Though that the rankmirror is just as needed as the basic feature of reflector. Maybe add a message to the install where python would be listed as an option for rankmirrors.

Birger smile

Offline

#35 2009-10-30 18:55:42

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

added python as an optdep


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#36 2009-10-30 19:32:33

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: *****

The response is much appreciated.

Birger smile

Offline

#37 2010-01-21 02:10:09

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: *****

I installed reflector 5.0 from your repo and got the following message when I run "reflector --help": Can't locate object method "main" via package "Xyne::Arch::Reflector" at /usr/bin/reflector line 27.  Am I missing some dependencies?

Last edited by tri1976 (2010-01-21 02:10:36)

Offline

#38 2010-01-21 02:17:16

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

Upgrade perl-xyne-arch. It seems that you still have a pre 1.0 version installed. My repo and [community] are currently in sync so you can install the latest version of perl-xyne-arch from either.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#39 2010-01-21 02:30:14

tri1976
Member
Registered: 2009-09-07
Posts: 152

Re: *****

Thank you...problem solved :-)

Offline

#40 2010-02-04 20:35:25

melik
Member
Registered: 2009-10-11
Posts: 108

Re: *****

Hey Xyne, thanks for the awesome script.

I have a question though, for the --fastest option, it requires a number.. what would  I put there?

Is '1' the fastest or '10'? Also if you would include that in the man page, it would be great.

Offline

#41 2010-02-04 20:44:09

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

The number is the number of servers that it should retrieve (the man page says "retrieve the n fastest servers").

E.g.
If you want the fastest server, use 1.
If you want the ten fastest, use 10.

I recommend using it with another option though, such as "-l 20" to get the 20 most up-to-date servers first. If you only use the "-f" option, it will pass all of the mirrors to rankmirrors, which will take ages to rank, plus you might find that the fastest mirror is out of sync.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#42 2010-02-09 18:31:19

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: *****

I'm having a bit of trouble with reflector if I use short options. You know how you can in eg. Pacman use many of it's options together like:

sudo pacman -Syuf

To force upgrade while syncing with mirrors.
Anyway trying the same with reflector it doesn't work.
I want to rank five latest mirrors and then save them to my mirrorlist.
But using any variation of this:

sudo reflector -orl 5 /etc/pacman.d/mirrorlist

doesn't work.
But if I do it "verbose" it works:

sudo reflector --rank --latest 5 --output /etc/pacman.d/mirrorlist

Any Idea why it doesn't work?


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#43 2010-02-09 19:02:01

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

"-orl" expands to "-o -r -l", which means you're passing "-r" as an argument to "-o".

You could do "-rl 5 -o /etc/pacman.d/mirrorlist" but you can't group short options which take arguments in front of other options.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#44 2010-02-09 19:24:39

Cyrusm
Member
From: Bozeman, MT
Registered: 2007-11-15
Posts: 1,053

Re: *****

handy script, thanks xyne!  works well with cron.


Hofstadter's Law:
           It always takes longer than you expect, even when you take into account Hofstadter's Law.

Offline

#45 2010-02-09 21:14:35

Primoz
Member
From: Ljubljana-Slovena-EU
Registered: 2009-03-04
Posts: 688

Re: *****

Xyne wrote:

"-orl" expands to "-o -r -l", which means you're passing "-r" as an argument to "-o".

You could do "-rl 5 -o /etc/pacman.d/mirrorlist" but you can't group short options which take arguments in front of other options.

Thanks! I thought it was something like that...


Arch x86_64 ATI AMD APU KDE frameworks 5
---------------------------------
Whatever I do, I always end up with something horribly mis-configured.

Offline

#46 2010-03-02 20:21:00

ostroffjh
Member
From: Southeast Connecticut, USA
Registered: 2009-11-13
Posts: 25

Re: *****

Would there be any point in adding a way to limit the retrieval to servers in a specified geographic area?  I'm in the US, but 3 of the 5 retrieved by "reflector -l 10 -f 5" are in europe, and I assume I really don't want to put them in my mirrorlist.

Offline

#47 2010-03-02 22:19:56

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: *****

I would just use -r switch instead of "-f 5". This way reflector gets the 10 latest mirrors and ranks them. Even if they're in a different country, they should be fast.

Offline

#48 2010-03-02 23:14:55

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

Filtering by region might make sense in some cases but generally I don't think it would make much difference. It's possible to get good speeds from geographically distant servers and I would expect the latency to be negligible for most operations.

If there really is a demand for this I can ask Pierre to include country codes in Reflector's custom status page and add a filter. I might even try writing some code to ping servers to estimate network distance, just to see if I can.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#49 2010-06-29 00:39:14

ssri
Member
Registered: 2010-02-16
Posts: 216

Re: *****

So far, it has been working fine for several weeks until I just tried to refresh my mirrors a few moments ago just for the hell of it.  A few minutes earlier, I ran 'pacman -Syu' just fine.  Now, on a fully updated arch install, after running my reflector command, it does not recognize or entered my cpu's $arch correctly into mirrorlist.

Using either of the following two commands:

1) ~# reflector -l 8 -r -o /etc/pacman.d/mirrorlist
2) ~# reflector --arch x86_64 -l 8 -r -o /etc/pacman.d/mirrorlist

yields this:

~$ more /etc/pacman.d/mirrorlist
# 2010-06-28 17:31 
# generated by reflector
# ranked by rankmirrors
Server = ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch
Server = ftp://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/$arch
Server = ftp://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch
Server = ftp://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = http://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch
Server = http://ftp.hosteurope.de/mirror/ftp.archlinux.org/$repo/os/$arch
Server = http://ftp.tku.edu.tw/Linux/ArchLinux/$repo/os/$arch
Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch

that leads to this:

~# pacman -Syu
error: The mirror 'ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
error: The mirror 'ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
error: The mirror 'ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
error: The mirror 'ftp://cesium.di.uminho.pt/pub/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
:: Synchronizing package databases...
error: failed to update core (no servers configured for repository)
error: failed to update extra (no servers configured for repository)
error: failed to update community (no servers configured for repository)
error: failed to update testing (no servers configured for repository)
error: failed to synchronize any databases

Last edited by ssri (2010-06-29 00:39:38)

Offline

#50 2010-06-29 06:57:32

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: *****

@ssri
This isn't a reflector issue. Pacman 3.4.0 introduced the $arch variable and it is now used in the official mirrorlist.
It seems that you haven't merged /etc/pacman.conf.pacnew into /etc/pacman.conf.

You should always pay attention to the output of an upgrade operation as it issues warnings about configuration file changes that require manual intervention. You may want to run the following commands to locate all *.pacnew and *.pacsave files on your system.

updatedb
locate "*.pac*"

Last edited by Xyne (2010-06-29 06:58:44)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB