1

I'm trying to list all packages (and their respective repositories) from other sources than the main/restricted/universe/multiverse.

First I've typed that command to list those packages :

$ aptitude search -F '%p' '!?origin(Ubuntu) ( ?architecture(amd64) | ?architecture(all) ) ?installed' | head
albert                                                                          
brave-browser                                                                   
brave-keyring                                                                   
browsh                                                                          
cdda2wav                                                                        
cdrecord                                                                        
dockmanager                                                                     
e2fsprogs-l10n                                                                  
ffmbc                                                                           
firefox-esr                                                                     

But if I add '%e' or '%E' or '%O' to the -F argument, the aptitude immediately returns ... nothing :

$ aptitude search -F '%p %O' '!?origin(Ubuntu) ( ?architecture(amd64) | ?architecture(all) ) ?installed' | head
$

Is this an aptitude bug ?

6
  • Don't you want !( ?origin(ubuntu) | ?origin(debian) ) or ( !?origin(ubuntu) !?origin(debian) ) (de Morgan's rule - NOT (a OR b) == (NOT a AND NOT b)? Sep 3, 2020 at 15:03
  • @steeldriver You're absolutely right :) Fixed.
    – SebMa
    Sep 3, 2020 at 17:22
  • Hmm... confirmed the behavior in a 16.04 WSL system (aptitude 0.7.4) whereas my regular 18.04 box (aptitude 0.8.10) appears to handle %e / %E fine Sep 3, 2020 at 17:53
  • 2
    So according to the changelog (apt-get changelog aptitude on the 18.04 box), "Add format strings for Source (%E), Architecture (%e) and Origin (%O)" happened in 0.7.5-1 - so my guess is the version on your system is earlier and simply bails when passed a format specifier that it doesn't understand Sep 3, 2020 at 18:07
  • @steeldriver Thanks. Can you convert your comment to an answer ?
    – SebMa
    Sep 3, 2020 at 19:08

1 Answer 1

1

Looking at the changelog from my 18.04 box, I can see:

aptitude (0.7.5-1) unstable; urgency=low

  * New upstream release. Please see /usr/share/aptitude/NEWS for a change
    log with more details.

    - New features:
<snip>
      * Add format strings for Source (%E), Architecture (%e) and
        Origin (%O) (Closes: #248561, #604982, #760608)
<snip>

The version of aptitude in 16.04 appears to be 0.7.4, predating these additions.

So it looks like your aptitude search -F '%p %e' ... command is (rather unsportingly) simply bailing when it gets a format specifier that it doesn't understand.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .