• Bug#1087993: apt: Unexpected symbol "|" appeared in upgrade confirmatio

    From Kamil Ignacak@21:1/5 to All on Sun May 4 12:40:02 2025
    Hi!

    When apt is printing Suggested Packages section, some entries include an unexpected "|" symbol. This could be due to some mishandling of the
    Suggests: field contents.
    [...]
    Unfortunately reproducing the bug is not that easy as it may require a certain package upgrade combination.

    Reproduction may require certain package upgrade combination, and
    specific terminal sizes. I managed to reproduce a similar behaviour
    in my X terminal emulator. I hope that text in this mail won't be
    wrapped...



    A. Info about apt/OS

    acerion@debian:~$ apt --version
    apt 3.0.1 (amd64)
    acerion@debian:~$ grep CODENAME /etc/os-release
    VERSION_CODENAME=trixie



    B. scenario with terminal size #1, where '|' characters are showing "alternatives" in suggested packages' list in unambiguous way.

    acerion@debian:~$ stty size
    32 146
    acerion@debian:~$ sudo apt install ant
    Installing:
    ant

    Installing dependencies:
    ant-optional default-jre-headless libavahi-client3 libavahi-common3 libnspr4 libpcsclite1
    ca-certificates-java java-common libavahi-common-data libcups2t64 libnss3 openjdk-21-jre-headless

    Suggested packages:
    ant-doc junit libcommons-logging-java liblog4j1.2-java default-jre fonts-ipafont-mincho
    default-jdk junit4 libcommons-net-java liboro-java cups-common fonts-wqy-microhei
    | java-compiler jython libmail-java libregexp-java pcscd | fonts-wqy-zenhei
    | java-sdk libactivation-java libjaxp1.3-java libxalan2-java libnss-mdns fonts-indic
    antlr libbcel-java libjdepend-java libxml-commons-resolver1.1-java fonts-dejavu-extra
    javacc libbsf-java libjsch-java libxz-java fonts-ipafont-gothic

    Summary:
    Upgrading: 0, Installing: 13, Removing: 0, Not Upgrading: 15
    Download size: 44.9 MB / 46.4 MB
    Space needed: 213 MB / 2,152 MB available

    Continue? [Y/n]

    In this case it's easy to recognize that fonts-wqy-zenhei is an
    alternative to fonts-wqy-microhei because both packages are in a single
    column. Alternative of package X is shown directly under X.




    C. scenario with terminal size #2, where usage of '|' character may
    lead to confusion.

    acerion@debian:~$ stty size
    40 190
    acerion@debian:~$ sudo apt install ant
    Installing:
    ant

    Installing dependencies:
    ant-optional default-jre-headless libavahi-client3 libavahi-common3 libnspr4 libpcsclite1
    ca-certificates-java java-common libavahi-common-data libcups2t64 libnss3 openjdk-21-jre-headless

    Suggested packages:
    ant-doc antlr jython libcommons-logging-java libjdepend-java libregexp-java default-jre fonts-dejavu-extra | fonts-wqy-zenhei
    default-jdk javacc libactivation-java libcommons-net-java libjsch-java libxalan2-java cups-common fonts-ipafont-gothic fonts-indic
    | java-compiler junit libbcel-java libmail-java liblog4j1.2-java libxml-commons-resolver1.1-java pcscd fonts-ipafont-mincho
    | java-sdk junit4 libbsf-java libjaxp1.3-java liboro-java libxz-java libnss-mdns fonts-wqy-microhei

    Summary:
    Upgrading: 0, Installing: 13, Removing: 0, Not Upgrading: 15
    Download size: 44.9 MB / 46.4 MB
    Space needed: 213 MB / 2,152 MB available

    Continue? [Y/n]

    Here package fonts-wqy-microhei and its alternative fonts-wqy-zenhei are
    shown in two different columns. The '|' character doesn't directly
    point to another package *above*, because there is no "above" to speak of.




    I can't tell if this behaviour is an error, or just my mis-understanding
    of meaning of '|' character.

    Kamil

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)