[pacman-dev] Bad error message on invalid pacman -S operation

Dan McGee dpmcgee at gmail.com
Fri May 1 22:22:22 EDT 2009


On Fri, May 1, 2009 at 9:07 PM, Allan McRae <allan at archlinux.org> wrote:
> Dan McGee wrote:
>>
>> I did "pacman -S" today instead of "pacman -U", and I noticed the
>> error message is not all that great, and I think this is a regression:
>>
>> dmcgee at galway ~/projects/arch-repos/valgrind/trunk
>> $ pacS /home/makepkg/packages/valgrind-3.4.1-1-x86_64.pkg.tar.gz
>> Password:
>> error: repository '' not found
>> error: '/home/makepkg/packages/valgrind-3.4.1-1-x86_64.pkg.tar.gz': no
>> such repository
>>
>
> Definitely a regression:
>> pacman -S sed-4.2-1-i686.pkg.tar.gz
> sed-4.2-1-i686.pkg.tar.gz package not found, searching for group...
> error: 'sed-4.2-1-i686.pkg.tar.gz': not found in sync db
>
> But... why is it thinking the file name is a repository?  And what about the
> '' repoisitory not found.  That is really weird.

It is our parsing code. Note the three cases- direct file, relative
path, and absolute path:

dmcgee at galway /home/makepkg/packages
$ pacS valgrind-3.4.1-1-x86_64.pkg.tar.gz
valgrind-3.4.1-1-x86_64.pkg.tar.gz package not found, searching for group...
error: 'valgrind-3.4.1-1-x86_64.pkg.tar.gz': not found in sync db

dmcgee at galway /home/makepkg/packages
$ pacS ../valgrind-3.4.1-1-x86_64.pkg.tar.gz
error: repository '..' not found
error: '../valgrind-3.4.1-1-x86_64.pkg.tar.gz': no such repository

dmcgee at galway /home/makepkg/packages
$ pacS /home/makepkg/packages/valgrind-3.4.1-1-x86_64.pkg.tar.gz
error: repository '' not found
error: '/home/makepkg/packages/valgrind-3.4.1-1-x86_64.pkg.tar.gz': no
such repository

I'm not sure what the "fix" is, but it definitely is odd behavior.

-Dan


More information about the pacman-dev mailing list