"installed" discrepancy in aptitude output

Asked by Tobias

Hi. Can someone explain this strange output.
Notice, once the packages openjdk-6-jre-headless or openjdk-6-jre
 seem to be purged, once it seems to be installed.
According to "dpkg -s" or "aptitude show" they are installed.
sudoing brings the same.

Hope the output doesn't wrap too much:

tobias@einstein:~$ aptitude search openjdk-6-jre
i openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
i openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
i openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries)
v openjdk-6-jre-shark -
v openjdk-6-jre-shark -
p openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
tobias@einstein:~$ aptitude search openjdk
p openjdk-6-dbg - Java runtime based on OpenJDK (debugging symbols)
p openjdk-6-demo - Java runtime based on OpenJDK (demos and examples)
p openjdk-6-doc - OpenJDK Development Kit (JDK) documentation
i openjdk-6-jdk - OpenJDK Development Kit (JDK)
p openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
p openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
i openjdk-6-jre-lib - OpenJDK Java runtime (architecture independent libraries)
v openjdk-6-jre-shark -
v openjdk-6-jre-shark -
p openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
p openjdk-6-source - OpenJDK Development Kit (JDK) source files

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Tobias
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I'm not conversant with aptitude's output. Can you give the output of:

lsb_release -a; dpkg -l | grep openjdk

Thanks

Revision history for this message
Tobias (ulbricht-tobias) said :
#2

Am 24.01.2012 15:35, schrieb actionparsnip:
> lsb_release -a; dpkg -l | grep openjdk

sure. Thanks for the request.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric
ii openjdk-6-jdk 6b23~pre11-0ubuntu1.11.10
               OpenJDK Development Kit (JDK)
ii openjdk-6-jre 6b23~pre11-0ubuntu1.11.10
               OpenJDK Java runtime, using Hotspot JIT
ii openjdk-6-jre-headless 6b23~pre11-0ubuntu1.11.10
               OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-6-jre-lib 6b23~pre11-0ubuntu1.11.10
               OpenJDK Java runtime (architecture independent libraries)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Cool, openjdk is installed. What is the issue?

Revision history for this message
Tobias (ulbricht-tobias) said :
#4

Am 24.01.2012 16:50, schrieb actionparsnip:
> Your question #185675 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/185675
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Cool, openjdk is installed. What is the issue?
>

aptitude search openjdk

shows openjdk-6-jre to be purged!

The correct output of aptitude seems to depend on the search string !?!

The issue is, I thought so far I could rely on the
aptitude search command to see if a package is installed or whatever
status it has.

At least, the manual of aptitude states that

"The first character of each line indicates the current state of the
            package: the most common states are p, meaning that no trace
of the package exists on the system, c, meaning that the
            package was deleted but its configuration files remain on
the system, i, meaning that the package is installed, and v,
            meaning that the package is virtual.
"

etc.

So:
Is aptitude's behaviour broken,
is my aptitude database corrupt,
or is that a feature?

could you check if that is the same on your system(s)?

thanks

Revision history for this message
Chris (fabricator4) said :
#5

It's perfectly normal. You don't have source files or development kit installed (and others) because you don't need them. You have all the runtime code that you need to use it.

You're assuming that it has to be a black OR white situation: installed / not installed.
There's multiple modules, not all of which you need if you just want the runtime components.

Chris

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

I wouldn't sweat it, aptitude is weird in it's output. dpkg has a clearer system imho, millions would disagree.

Revision history for this message
Tobias (ulbricht-tobias) said :
#7

Sorry Chris,

but this I don't get. Maybe this is a new question now.

Yes, I assume that a package can be installed/not installed.
I know that there are virtual packages and there are packages which are
provided by other packages but that does not apply here, does it?

In my case:
openjdk-6-jre as well as openjdk-6-jre-headless are packages that can be
either installed or not installed.
In my case: they are installed.
BUT: aptitude search openjdk
shows them as being purged.

That's a bug if you don't correct me.

Thanks, Tobias

Am 24.01.2012 18:20, schrieb Chris:
> It's perfectly normal. You don't have source files or development kit
> installed (and others) because you don't need them. You have all the
> runtime code that you need to use it.
>
> You're assuming that it has to be a black OR white situation: installed / not installed.
> There's multiple modules, not all of which you need if you just want the runtime components.
>
> Chris
>

Revision history for this message
Tobias (ulbricht-tobias) said :
#8

I found that the bug exist in at least one bug report already.
Problem solved. Thanks.