[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1061148: apt: option -a has several meanings and is unusable



On Fri, Jan 19, 2024 at 05:10:40PM +0100, Vincent Lefevre wrote:
> On 2024-01-19 16:43:24 +0100, Julian Andres Klode wrote:
> > On Fri, Jan 19, 2024 at 03:43:25PM +0100, Vincent Lefevre wrote:
> > > Package: apt
> > > Version: 2.7.9
> > > Severity: normal
> > > 
> > > In the apt-get(8) man page:
> > > 
> > >        apt-get [-asqdyfmubV] [-o=config_string] [-c=config_file]
> > >                [-t=target_release] [-a=architecture] {update | upgrade |
> > >                dselect-upgrade | dist-upgrade |
> > >                install pkg [{=pkg_version_number | /target_release}]...  |
> > >                remove pkg...  | purge pkg...  |
> > >                source pkg [{=pkg_version_number | /target_release}]...  |
> > >                build-dep pkg [{=pkg_version_number | /target_release}]...  |
> > >                download pkg [{=pkg_version_number | /target_release}]...  |
> > >                check | clean | autoclean | autoremove | {-v | --version} |
> > >                {-h | --help}}
> > > 
> > > So option -a appears both as a single option -a and as -a=architecture.
> > > 
> > > In the apt(8) man page, only the second form is listed, but for both
> > > commands, it is unusable:
> > > 
> > > # apt-get -a=i386 install libfontconfig-dev
> > > E: Command line option 'a' [from -a=i386] is not understood in combination with the other options.
> > > 
> > > # apt -a=i386 install libfontconfig-dev
> > > E: Command line option 'a' [from -a=i386] is not understood in combination with the other options.
> > 
> > -a in that sense is an argument to build-dep and family (source --build,
> > satisfy). It is short for host-architecture, and makes no sense in any
> > other command.
> 
> Perhaps this should be explicitly documented. And the error message
> should be clarified (note: "install" is a command, not an option).
> 
> > You seem to be trying to install libfontconfig-dev:i386
> 
> OK, but I was looking at an option to install several packages
> (package list to be copy-pasted) for a foreign architecture
> without much typing.
> 
> > We haven't explained that it works outside of source --compile and
> > build-dep (i.e. in satisfy) but I fail to see how you get to try
> > to pass this to install after reading the manual page.
> 
> The -a=... version is not documented in the manual, only -a alone,
> but even for that, I don't understand the manual; the grammar seems
> incorrect:
> 
>        -a, --host-architecture
>            This option controls the architecture packages are built for by
>            apt-get source --compile and how cross-builddependencies are
>            satisfied. By default is it not set which means that the host
>            architecture is the same as the build architecture (which is
>            defined by APT::Architecture). Configuration Item:
>            APT::Get::Host-Architecture.
> 
> There are 2 verbs "controls" and "are built". And I don't see how
> to parse "for by". In the next sentence: "is it". Should this be
> "it is"? The comma is missing before "which". Still, I don't see
> what this option does.

apt-get source --compile compiles packages. For cross-compilation,
you need to set the host architecture. This option controls that.

And yes this is just runaway without punctuation, but uh wording
is hard and we really just want to rewrite all manual pages from
scratch.

Then you'll see -a, --host-architecture in the apt-build-dep
and apt-source and apt-satisfy manual pages (maybe they are all
the same, who knows).


-- 
debian developer - deb.li/jak | jak-linux.org - free software dev
ubuntu core developer                              i speak de, en


Reply to: