Re: how to know the architecture ?
On Sat, Apr 09, 2005 at 12:09:53AM +0200, Rakotomandimby (R12y) Mihamina wrote:
> When I build a debian package, and I fill the dsc file:
The .dsc file should be created automatically by dpkg-buildpackage,
> How would I know the binary will run on all architectures or will only
> run on some?
Its specified in the filename, which is how you can know by looking at
> Because, for example, I have some x86 and sparc64 home, and there is an
> XFCE package both for x86 and for sparc. If I take a look at the
> source.list file, there is no mention of the arch.
/etc/apt/sources.list determines the location for Packages.gz, which
is a list of binary packages (which are created from source packages
as given in a Sources file of similar format to Packages.gz).
> - Where does apt look for the architecture to download for?
dpkg (and apt, I guess) look at the Packages.gz file, which is for
binary packages, not sources. A given binary package (aka a .deb
file) is either for a specific architecture, or for every architecture
(arch all). If you try to install on a wrong architecture, dpkg will
barf (unless you --force-architecture).
> - How will I know, when I build a package, that the binary will be arch
> specific? (Because I need to correctly fill the "Architecture:" field in
> the dsc file!)
As above, you probably don't need to fill in that file. But
./debian/control specifies a single "Sources:" line and following
information about the source, and one or more "Package:" lines, which
determine information about the binary package. "Architecture:" is a
necessary field for each Package: line. The architecture on which a
package is built is written into a binary-package control file
(slightly different from the source control file ./debian/control).
Neither dpkg nor apt will look at the filename: dpkg -i foo_i386.deb
will work just fine on an alpha, except that the .deb internally will
say "Architecture: i386" which is what dpkg cares about.
> If I build it on a x86, and if I dont know, have I to suppose it's x86
> specific and wait for some others to compile it on some other arches to
> declare it "all arches" ?
"Arch: all" means "this binary package may be build on any architecture,
and the resulting .deb file will be valid for every architecture".
"Arch: any" means "this binary package may be built on any
architecture, and the resulting .deb will be valid only on that arch".