Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Software] When should [arch=...] be used in source list?

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
xuhdev
Posts: 18
Joined: 2014-10-07 19:59
Has thanked: 6 times
Been thanked: 2 times

[Software] When should [arch=...] be used in source list?

#1 Post by xuhdev »

Sometimes I saw this in source list

Code: Select all

deb [arch=amd64] ...
Is the "arch" property really necessary? If so, when should we explicitly specify it?
Debian Bookworm with GNOME, Ubuntu Jammy Jellyfish | 8 Hobbies Tech Blog | Hugo APT Repo

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5356
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 69 times

Re: [Software] When should [arch=...] be used in source list?

#2 Post by dilberts_left_nut »

When you want access to packages for an architecture that is not your default.
AdrianTM wrote:There's no hacker in my grandma...

User avatar
fabien
Forum Helper
Forum Helper
Posts: 755
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 68 times
Been thanked: 174 times

Re: [Software] When should [arch=...] be used in source list?

#3 Post by fabien »

To add to what @dilberts_left_nut said,

By default, APT updates /var/lib/apt/lists/ based on the system's configured architectures which are the combined output of dpkg --print-architecture and dpkg --print-foreign-architectures.

If you don't have a foreign architecture on your system, you can still force APT to download files for other architectures. If you have foreign architectures, you can limit the update to the chosen architecture(s).

e.g: [ arch=amd64,i386,armhf ]

If your architecture is amd64, [ arch=i386,armhf ] will force i386 and armhf but amd64 will not be downloaded.
[ arch=amd64 ] is useless if your architecture is amd64 and you don't have foreign architectures (unless specific APT configuration, not the general case).
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

Post Reply