You are not logged in.

#1 2010-03-27 10:47:14

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

powerpill -Sy fails but pacman -Sy works

Hi, guys,

I recently got in trouble with pacman and powerpill after we are forced behind a proxy by the uni. I have exported the several proxy env vars, then a strange problem comes out, I could use

pacman -Sy

to sync my pkg db, but I could not with

powerpill -Sy

, it always fails with the error msgs

error: failed retrieving file 'core.db.tar.gz' from ftp.archlinux.org : Transient resolver failure

, so on through every mirror. Anyone could help me with the prob? Thanks.


Arch, the Portal of Linux

Offline

#2 2010-03-27 11:27:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: powerpill -Sy fails but pacman -Sy works

From memory, powerpill uses aria2 to do the downloading.  Look up what that needs to work behind a proxy.

Offline

#3 2010-03-27 12:27:22

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: powerpill -Sy fails but pacman -Sy works

Allan wrote:

From memory, powerpill uses aria2 to do the downloading.  Look up what that needs to work behind a proxy.

Hi, Allan, thanks for the reply. I know powerpill uses aria2 for downloading. But according to the man page of aria2, it should recognize the several proxy env vars I set. And I can do regular downloads with aria2 without any prob. Why powerpill failed?

Last edited by plmday (2010-03-27 12:28:02)


Arch, the Portal of Linux

Offline

#4 2010-03-27 12:45:52

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: powerpill -Sy fails but pacman -Sy works

Powerpill doesn't use aria2c for downloading the database, only the packages. If you're only have problems with database files, then unset the "Rebase" option and let pacman handle them via the proxy. If you're having problems with packages, then set the proxy options for aria2c using the Aria2Args option.


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

Offline

#5 2010-03-28 06:48:42

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: powerpill -Sy fails but pacman -Sy works

Xyne wrote:

Powerpill doesn't use aria2c for downloading the database, only the packages. If you're only have problems with database files, then unset the "Rebase" option and let pacman handle them via the proxy. If you're having problems with packages, then set the proxy options for aria2c using the Aria2Args option.

Thanks for the clarification, Xyne. I found the "Rebase" option in the config file for powerpill. It is commented out by default, isn't it unset? But when I remove the '#' before it and do `powerpill -Sy`, it works with rebasing, even strange.

In addition, I find the comments say

Use the Rebase module to update the sync database. See the Rebase documentation for more information.

Sorry, I have no idea what the rebase module is, and where to find its documentation. Could you please give some hint?


Arch, the Portal of Linux

Offline

#6 2010-03-28 15:37:18

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: powerpill -Sy fails but pacman -Sy works

plmday wrote:

Could you please give some hint?

http://xyne.archlinux.ca/info/rebase


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

Offline

#7 2010-03-29 01:36:23

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: powerpill -Sy fails but pacman -Sy works

Thanks for the link, Xyne, good job, big_smile. Though rebase is preferable, I still wonder why powerpill did not pass the sync job to pacman as you said when rebase is unset (commented out).

Last edited by plmday (2010-03-29 01:42:11)


Arch, the Portal of Linux

Offline

#8 2010-03-29 02:16:37

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: powerpill -Sy fails but pacman -Sy works

If the option is commented in the config and not passed on the command line, it always invokes pacman to update the database (when "-y"|"--refresh" are passed).

    if ($self->get_value('Rebase'))
    {
      $self->maybe_lock_and_rebase(($ys>1));
    }
    else
    {
      my $cmd = $self->get_value('PacmanBin') . ' -S' . ('y' x $ys);
      $cmd = '/usr/bin/sudo '.$cmd if $ENV{'USER'} ne 'root' and -x '/usr/bin/sudo';
      system $cmd;
    }

Maybe it seemed like nothing happened because the database was already in sync. Regardless of how it updates the database, powerpill continues with the download before passing control to pacman to complete the operation, if there's anything left to do.


I'm not sure why it worked as expected with the Rebase option but not without. Powerpill uses the Perl's LWP::Simple module to check and retrieve the databases. The module probably detects the proxy settings on its own. I don't know why it wouldn't work when using pacman if you're able to sync the databases directly with pacman. It might be due to missing variables in the environment of the system call to pacman. *shrugs*


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

Offline

#9 2010-03-29 02:58:22

plmday
Member
From: Germany
Registered: 2009-02-19
Posts: 66

Re: powerpill -Sy fails but pacman -Sy works

Ok, Xyne, I'll stay with rebase.


Arch, the Portal of Linux

Offline

Board footer

Powered by FluxBB