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

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



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.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: