[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 18:38:06 +0100, David Kalnischkies wrote:
> On Fri, Jan 19, 2024 at 05:10:40PM +0100, Vincent Lefevre wrote:
> > The -a=... version is not documented in the manual, only -a alone,
> 
> Compare -t, which also doesn't say -t=foo. Probably mostly due to -t foo
> working as well or just because the manpages like their inconsistencies
> and would deserve some love, but who has the time to not just complain
> but also actually write all of it…

This is not the same thing. The -t option is listed only with an
argument, while there is a -a option *without* an argument:

  apt-get [-asqdyfmubV] ... [-a=architecture] ...
            ^ here

Perhaps this is a mistake...

> (reordered for posterity)
> 
> >        -a, --host-architecture
> >            This option controls the architecture packages are built for by
> >            apt-get source --compile and how cross-builddependencies are
> >            satisfied.
> > 
> > There are 2 verbs "controls" and "are built". And I don't see how
> > to parse "for by".
> 
> A package is "built for" the given (with -a) host architecture by
> "apt-get source --compile" – aka its instructed to cross-compile
> a package for the given host architecture instead of doing a "normal"
> compile where host and build architecture are the same.

OK, it took me some time to find how this sentence should be parsed.
In particular, I thought that this description was for the -a version
without an argument (see above), and the sentence couldn't have any
sense as a consequence.

BTW, in the option listing, whether an option takes an argument is
generally indicated. For instance, in the cp man page:

       -S, --suffix=SUFFIX
              override the usual backup suffix

And simpler sentences would be easier to understand, with the context
given first. For instance, something like

      With "apt-get source --compile", packages are built for the
      given architecture instead of [...]

Or more explicitly:

    -a, --host-architecture=ARCH
      With "apt-get source --compile", packages are built for
      architecture ARCH instead of [...]

> So, "apt-get source -b -a armhf foo" will (simplified) build a
> "foo_armhf.deb" on your (likely amd64) machine to be used on another
> (probably less powerful) armhf machine. Similar for build-dep, just
> that this won't build anything but interprets certain dependencies
> differently.

If build-dep is also concerned by this option, this should be said.

> >            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.
> 
> > In the next sentence: "is it". Should this be
> > "it is"? The comma is missing before "which".
> 
> Perhaps it should, "is it not" has the hint of a question. In German
> I would write such a sentence without a comma as the added phrase isn't
> [that] optional, but not sure if a German – or English – teacher would
> actually agree on me claiming "definition phrase", which are not
> separated by commas in both languages. Could easily be done without
> a which if we were really trying.

Here, "which means..." relates to an entire statement ("it is not set"),
so that a comma is needed. See

  https://guinlist.wordpress.com/tag/clause-referring-which/

"2. Relating to an Entire Statement
[...]
(c) Octavian defeated his enemies in battle, which enabled him to
become Roman Emperor.

/Which/ here refers to what /Octavian/ did, not the /battle/.

In this usage, /which/ is always needed instead of /who/ or /that/, it
always follows a comma, and it has a singular verb after it. [...]"
^^^^^^^^^^^^^^^^^^^^^^

Or this (in French):

  https://www.anglaisfacile.com/exercices/exercice-anglais-2/exercice-anglais-26463.php

(this is the case where "which" is translated in French by "ce que"
or "ce qui", instead of just "que" or "qui" when "which" relates to
a noun).

-- 
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: