You are not logged in.

#1 2010-08-15 03:15:04

poopship21
Member
Registered: 2009-05-13
Posts: 177

all of a sudden pacman requires $arch to be defined [solved]

after a recent upgrade, pacman seems to expect the $arch variable to be set:

[au@arroyo1 ~]$ pacman -V

 .--.                  Pacman v3.4.0 - libalpm v5.0.0
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2010 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

[au@arroyo1 ~]$ echo $arch

[au@arroyo1 ~]$ sudo pacman -Ss openoffice-base-devel
error: The mirror 'ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
error: The mirror 'ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
error: The mirror 'ftp://ftp.gtlib.gatech.edu/pub/linux/distributions/archlinux/$repo/os/$arch' contains the $arch variable, but no Architecture is defined.
extra/openoffice-base-devel 3.4_dev300_m86-1
    OpenOffice.org - a free multiplatform and multilingual office suite - developement branch
[au@arroyo1 ~]$ uname -a
Linux arroyo1 2.6.34-ARCH #1 SMP PREEMPT Wed Aug 11 00:23:15 CEST 2010 x86_64 Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz GenuineIntel GNU/Linux

pacman has never given this error before.  i have only one 64-bit box but it seems to happen only happen with the x86_64 build.  here is the output from an i686 installation, notice the version number:

[au@arroyo6 ~]$ echo $arch

[au@arroyo6 ~]$ pacman -V

 .--.                  Pacman v3.4.0 - libalpm v5.0.0
/ _.-' .-.  .-.  .-.   Copyright (C) 2006-2010 Pacman Development Team
\  '-. '-'  '-'  '-'   Copyright (C) 2002-2006 Judd Vinet
 '--'
                       This program may be freely redistributed under
                       the terms of the GNU General Public License.

[au@arroyo6 ~]$ sudo pacman -Ss openoffice-base-devel
extra/openoffice-base-devel 3.4_dev300_m85-1
    OpenOffice.org - a free multiplatform and multilingual office suite - developement branch
[au@arroyo6 ~]$ uname -a
Linux arroyo6 2.6.33-ARCH #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux
 

i checked "/var/log/pacman.log" but it does not record anything for the command above, the most recent log event being an "-Syu" earlier today.

searching the arch forum for "pacman $arch" returned nothing useful in the first 29 posts.

is there a different place i should be checking to track this problem down?

/edit: pacman is working now but only for mirrors where i replace "$arch" with "x86_64" in /etc/pacman.d/mirrorlist.
/edit: supposing that pacman would need "$arch" from "/etc/bash.bashrc" when it is run as root i checked "#echo $arch" and it is blank for both of these systems listed above.

TIA

Last edited by poopship21 (2010-08-15 04:09:17)

Offline

#2 2010-08-15 03:21:46

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: all of a sudden pacman requires $arch to be defined [solved]

Try checking the /etc/pacman.conf file for $arch?

Offline

#3 2010-08-15 03:28:18

nixpunk
Member
Registered: 2009-11-23
Posts: 271

Re: all of a sudden pacman requires $arch to be defined [solved]

Have you set a specific "Architecture" in /etc/pacman.conf ?  Is it set to auto, or not set at all?  Is there an  /etc/pacman.conf.pacnew that you disregarded?

See 'man pacman.conf' for details.

Last edited by nixpunk (2010-08-15 03:30:48)

Offline

#4 2010-08-15 03:30:41

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

Acecero wrote:

Try checking the /etc/pacman.conf file for $arch?

thanks, Acecero.  man pacman lists "Architecture = auto | i686 | x86_64" as an option.  this was not set in either of the machines whose output was listed above even though it seems to work regardless in "arroyo6".  however i added a line "Architecture = x86_64" to the /etc/pacman.conf" file of "arroyo1" and i recieved no further errors.  still its interesting that no call to "uname" is necessary on some i686 boxes even though the documentation implies that pacman has no other recourse to this information.

Offline

#5 2010-08-15 03:35:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: all of a sudden pacman requires $arch to be defined [solved]

I think this change was introduced in pacman 3.4 - almost 3 months ago
http://projects.archlinux.org/pacman.gi … ?id=v3.4.0

Offline

#6 2010-08-15 03:37:02

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: all of a sudden pacman requires $arch to be defined [solved]

Are both arroyo1 and arroyo6 x86_64 setups?

Offline

#7 2010-08-15 03:49:43

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

Acecero wrote:

Are both arroyo1 and arroyo6 x86_64 setups?

"arroyo6" is i686.  "arroyo1" is x86_64.  sorry, that was buried in the code blocks above.

Offline

#8 2010-08-15 03:52:47

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

karol wrote:

I think this change was introduced in pacman 3.4 - almost 3 months ago
http://projects.archlinux.org/pacman.gi … ?id=v3.4.0

which is why i cant understand why i get no error with the i686 box whose output is listed above.  here is the "/etc/pacman.conf" for that machine just for clarification:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
HoldPkg     = pacman glibc
# If upgrades are available for these packages they will be asked for first
SyncFirst   = pacman
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#XferCommand = /usr/bin/curl %u > %o
#CleanMethod = KeepInstalled

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options (all disabled by default)
#UseSyslog
#ShowSize
#UseDelta
#TotalDownload

#Architecture = auto

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
## Add your preferred servers here, they will be used first
#Include = /etc/pacman.d/mirrorlist

[core]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

[extra]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

#[community-testing]
## Add your preferred servers here, they will be used first
#Include = /etc/pacman.d/mirrorlist

[community]
# Add your preferred servers here, they will be used first
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#Server = file:///home/custompkgs
[archlinuxfr]
Server = http://repo.archlinux.fr/i686

Offline

#9 2010-08-15 03:54:43

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

poopship21 wrote:
karol wrote:

I think this change was introduced in pacman 3.4 - almost 3 months ago
http://projects.archlinux.org/pacman.gi … ?id=v3.4.0

which is why i cant understand why i get no error with the i686 box whose output is listed above.  here is the "/etc/pacman.conf" for that machine just for clarification:

also these boxes have been updated more or less bi-weekly since before that change was made and i have never seen this issue before

Offline

#10 2010-08-15 03:56:18

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: all of a sudden pacman requires $arch to be defined [solved]

poopship21 wrote:
Acecero wrote:

Are both arroyo1 and arroyo6 x86_64 setups?

"arroyo6" is i686.  "arroyo1" is x86_64.  sorry, that was buried in the code blocks above.

Sorry about that, I skimmed the first post.

I'm starting to think now that the "no error" on i686 pacman might be a bug, because according to "Architecture" in man pacman.conf, "If unset, no architecture checks are made."  I am wondering if that should be reported.

Last edited by Acecero (2010-08-15 03:56:44)

Offline

#11 2010-08-15 03:59:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: all of a sudden pacman requires $arch to be defined [solved]

Acecero wrote:
poopship21 wrote:
Acecero wrote:

Are both arroyo1 and arroyo6 x86_64 setups?

"arroyo6" is i686.  "arroyo1" is x86_64.  sorry, that was buried in the code blocks above.

Sorry about that, I skimmed the first post.

I'm starting to think now that the "no error" on i686 pacman might be a bug, because according to "Architecture" in man pacman.conf, "If unset, no architecture checks are made."  I am wondering if that should be reported.

If I comment out the architecture part in my 32-bit I get an error, just like you do w/ th 64-bit. What magic do you have in your mirrorlist?

Offline

#12 2010-08-15 04:02:52

nixpunk
Member
Registered: 2009-11-23
Posts: 271

Re: all of a sudden pacman requires $arch to be defined [solved]

karol wrote:
Acecero wrote:
poopship21 wrote:

"arroyo6" is i686.  "arroyo1" is x86_64.  sorry, that was buried in the code blocks above.

Sorry about that, I skimmed the first post.

I'm starting to think now that the "no error" on i686 pacman might be a bug, because according to "Architecture" in man pacman.conf, "If unset, no architecture checks are made."  I am wondering if that should be reported.

If I comment out the architecture part in my 32-bit I get an error, just like you do w/ th 64-bit. What magic do you have in your mirrorlist?

poopship21 wrote:

/edit: pacman is working now but only for mirrors where i replace "$arch" with "x86_64" in /etc/pacman.d/mirrorlist.

^ I think that's the problem.

I just think that an /etc/pacman.conf.pacnew wasn't merged with the existing one when pacman  was updated to 3.4.

Last edited by nixpunk (2010-08-15 04:05:37)

Offline

#13 2010-08-15 04:07:54

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: all of a sudden pacman requires $arch to be defined [solved]

nixpunk wrote:
karol wrote:
Acecero wrote:

Sorry about that, I skimmed the first post.

I'm starting to think now that the "no error" on i686 pacman might be a bug, because according to "Architecture" in man pacman.conf, "If unset, no architecture checks are made."  I am wondering if that should be reported.

If I comment out the architecture part in my 32-bit I get an error, just like you do w/ th 64-bit. What magic do you have in your mirrorlist?

poopship21 wrote:

/edit: pacman is working now but only for mirrors where i replace "$arch" with "x86_64" in /etc/pacman.d/mirrorlist.

^ I think that's the problem.

I just think that an /etc/pacman.conf.pacnew wasn't merged with the existing one when pacman  was updated to 3.4.

poopship21, can we see what output you have with "ls /etc/pacman.conf*"?

Offline

#14 2010-08-15 04:08:00

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

karol wrote:
Acecero wrote:
poopship21 wrote:

"arroyo6" is i686.  "arroyo1" is x86_64.  sorry, that was buried in the code blocks above.

Sorry about that, I skimmed the first post.

I'm starting to think now that the "no error" on i686 pacman might be a bug, because according to "Architecture" in man pacman.conf, "If unset, no architecture checks are made."  I am wondering if that should be reported.

If I comment out the architecture part in my 32-bit I get an error, just like you do w/ th 64-bit. What magic do you have in your mirrorlist?

hmm, seems i must have tried the same fix at some point (completely forgot about that i guess) because low and behold its there explicitly:

# Mirror used during installation
Server = http://www.gtlib.gatech.edu/pub/linux/distributions/archlinux/$repo/os/i686

#
# Arch Linux repository mirrorlist
# Generated on 2010-01-31
#

# Any
#Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686
#Server = http://mirrors.kernel.org/archlinux/$repo/os/i686

marking this thread solved.  thanks all and sorry for not covering all the bases before hand.

Offline

#15 2010-08-15 04:11:45

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

Acecero wrote:
nixpunk wrote:
karol wrote:

If I comment out the architecture part in my 32-bit I get an error, just like you do w/ th 64-bit. What magic do you have in your mirrorlist?

poopship21 wrote:

/edit: pacman is working now but only for mirrors where i replace "$arch" with "x86_64" in /etc/pacman.d/mirrorlist.

^ I think that's the problem.

I just think that an /etc/pacman.conf.pacnew wasn't merged with the existing one when pacman  was updated to 3.4.

poopship21, can we see what output you have with "ls /etc/pacman.conf*"?

thanks, Acecero.  that was in fact the case.  "$ls /etc/pacman.*" showed /etc/pacman.conf.pacnew" and "Architecture = auto" is set on line 22!

Offline

#16 2010-08-15 04:13:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: all of a sudden pacman requires $arch to be defined [solved]

You have to specify the architecture one way or another, with the preferred way being 'Architecture = auto' in pacman.conf.
No magic here after all :-)

Offline

#17 2010-08-15 04:17:51

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

karol wrote:

You have to specify the architecture one way or another, with the preferred way being 'Architecture = auto' in pacman.conf.
No magic here after all :-)

yeah i was pretty sure that some user error was at fault here given the fact that such an important package was involved.  i guess thats why i decided to post in "Newbie Corner" instead of "Workstation User".  sane people visit the Newbie Corner too, thankfully smile

Last edited by poopship21 (2010-08-15 04:18:24)

Offline

#18 2010-08-15 04:23:45

Acecero
Member
Registered: 2008-06-21
Posts: 1,373

Re: all of a sudden pacman requires $arch to be defined [solved]

poopship21 wrote:
Acecero wrote:
nixpunk wrote:

^ I think that's the problem.

I just think that an /etc/pacman.conf.pacnew wasn't merged with the existing one when pacman  was updated to 3.4.

poopship21, can we see what output you have with "ls /etc/pacman.conf*"?

thanks, Acecero.  that was in fact the case.  "$ls /etc/pacman.*" showed /etc/pacman.conf.pacnew" and "Architecture = auto" is set on line 22!

I suggest thanking nixpunk too.  He was the one that nailed it.

Offline

#19 2010-08-15 04:29:10

nixpunk
Member
Registered: 2009-11-23
Posts: 271

Re: all of a sudden pacman requires $arch to be defined [solved]

Thanks for the acknowledgment, Acecero.  It was a collaborative effort, IMHO.

Offline

#20 2010-08-15 14:13:38

poopship21
Member
Registered: 2009-05-13
Posts: 177

Re: all of a sudden pacman requires $arch to be defined [solved]

nixpunk wrote:

Thanks for the acknowledgment, Acecero.  It was a collaborative effort, IMHO.

indeed, thanks all smile

Offline

Board footer

Powered by FluxBB