Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

bug in

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

bug in

#1 Post by rayandrews »

Code: Select all

$ aptitude why "libreoffice" && echo "\n\n installed"
i   libenchant1c2a Depends  aspell-en | myspell-dictionary | aspell-dictionary |
                             ispell-dictionary | hunspell-dictionary            
p   myspell-hu     Provides myspell-dictionary                                  
p   myspell-hu     Suggests libreoffice                                         


installed

$ dpkg -V libreoffice
dpkg: package 'libreoffice' is not installed

$ aptitude why "librecad" && echo installed
Not currently installed
The candidate version 2.1.2-1+b1 has priority optional
No dependencies require to install librecad
I've only seen this with the one package: libreoffice, but 'aptitude' is getting it wrong.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: bug in

#2 Post by Head_on_a_Stick »

deadbang

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#3 Post by rayandrews »

I've done that a few times with not even a trace of reply that the thing was even read. I'm a bit discouraged, I though I'd just report it here and if anyone in the loop is interested they can follow up on it.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: bug in

#4 Post by bw123 »

I don't get it, but I got it too, what's the bug?

Code: Select all

$ aptitude why "gnome-core" && echo "\n\n installed"
i   task-desktop       Recommends task-gnome-desktop | task-xfce-desktop | task-kde-d
                                  esktop | task-lxde-desktop | task-cinnamon-desktop 
                                  | task-mate-desktop | task-lxqt-desktop            
p   task-gnome-desktop Depends    gnome-core                                         
\n\n installed
$ dpkg -V gnome-core
dpkg: package 'gnome-core' is not installed
$ aptitude why "gnome-disk-utility" && echo installed
i   task-desktop       Recommends task-gnome-desktop | task-xfce-desktop | task-kde-d
                                  esktop | task-lxde-desktop | task-cinnamon-desktop 
                                  | task-mate-desktop | task-lxqt-desktop            
p   task-gnome-desktop Depends    gnome-core                                         
p   gnome-core         Depends    gnome-disk-utility (>= 3.22)                       
installed
$ dpkg -V gnome-disk-utility
dpkg: package 'gnome-disk-utility' is not installed
$ echo $SHELL
/bin/bash

resigned by AI ChatGPT

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: bug in

#5 Post by dilberts_left_nut »

The "bug" is in your expectations of the output from your command.

From 'man aptitude' (why, why-not)
This command returns 0 if successful, 1 if no explanation could be constructed, and -1 if an error occurred.
AdrianTM wrote:There's no hacker in my grandma...

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#6 Post by rayandrews »

Code: Select all

$ aptitude why libreoffice; echo $?
i   libenchant1c2a Depends  aspell-en | myspell-dictionary | aspell-dictionary |
...
0

$ aptitude why librecad; echo $?
Not currently installed
...
1

$ aptitude why grep; echo $?
i   hibernate    Suggests   xscreensaver | kscreensaver | gnome-screensaver | xl
...
0
Neither librecad nor libreoffice are installed on my system, and 'dpkg -V' correctly reports that fact, but 'aptitude' returns '1' for 'librecad', which is not installed and '0' for both 'grep', which is installed, and 'libreoffice' which is not installed. Surely that is not helpful?

BTW how would we say that 'no explanation can be constructed' when aptitude correctly reports that librecad is "Not currently installed"?? It sounds like an explanation to me: librecad isn't installed, no?

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: bug in

#7 Post by bw123 »

These kinds of threads pop up now and then on the forum, and on debian-user list. Sometimes they go on and on, and I find them kind of interesting, especially if they explain the documentation better. They sometimes end up in a long drawn out argument though, and that's no fun.

If there's a bug in an app, or in the documentation it should be reported and corrected. So what's the bug?
resigned by AI ChatGPT

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#8 Post by rayandrews »

The bug IMHO is that aptitude should report libreoffice as uninstalled just as dpkg -V does and which is in fact the truth. So far every other uninstalled package I've tried is reported as uninstalled by aptitude, with this one exception. This could be a bug in aptitude but since this only happens on this one occasion (so far) I'm inclined to think there's some issue with the libreoffice package such that whatever aptitude does to determine install status does not work on this one occasion. dpkg must use some other test, cuz dpkg gets it right. Again, I suspect some glitch in the libreoffice package, tho again since dpkg gets it right, it could be a problem within aptitude itself (heck, maybe dpkg would get it wrong on some other package that aptitude reports correctly.)

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: bug in

#9 Post by dilberts_left_nut »

But you're not asking aptitude whether a package is installed or not, your asking if it can find a reason to install it, and it's return code for this function is as per the man page - YOU are basing your 'echo installed' output on an incorrect assumption.
AdrianTM wrote:There's no hacker in my grandma...

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#10 Post by rayandrews »

Yet it does report that librecad is not installed, why should it be different for libreoffice? Nevermind, if no one is interested in this, or if you want to not see the problem then you will not see it. I did my duty reporting it. I have a script that needs to check on install status of packages, I'll just use 'dpkg -V' that seems to work every time.

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: bug in

#11 Post by dilberts_left_nut »

What?
If you're just checking installed status, why are you using 'aptitude why'?
AdrianTM wrote:There's no hacker in my grandma...

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: bug in

#12 Post by ticojohn »

rayandrews wrote:Yet it does report that librecad is not installed, why should it be different for libreoffice? Nevermind, if no one is interested in this, or if you want to not see the problem then you will not see it. I did my duty reporting it. I have a script that needs to check on install status of packages, I'll just use 'dpkg -V' that seems to work every time.
Excuse me Ray, but this is a help forum. If you feel there is a bug then report it to the developers, that would be your duty. Don't rave at people that answer your question but you don't seem to want to listen to their response.
I am not irrational, I'm just quantum probabilistic.

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#13 Post by rayandrews »

Sometimes a bug is not really a bug, so the first step is just to ask if it IS a bug. Since no one here agrees that it is a bug I figger I'll just drop it. BTW how you you check install status? There's several methods of course, which is best? I like 'aptitude why' because it gives three statuses: installed, uninstalled, or no such package.

Oh, and I don't mean to rant. I just find it puzzling that this ONE exception to otherwise predictable behavior would not be seen as a bug.

User avatar
sunrat
Administrator
Administrator
Posts: 6382
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 115 times
Been thanked: 456 times

Re: bug in

#14 Post by sunrat »

rayandrews wrote:BTW how you you check install status? There's several methods of course, which is best? I like 'aptitude why' because it gives three statuses: installed, uninstalled, or no such package.

Code: Select all

apt policy <packagename>
will give you that info.

Code: Select all

dpkg -l |grep <packagename>
is good for searching installed packages

Code: Select all

apt search <something>
will take a fuzzy description or packagename and show what is available.

*note I used Sid to check these commands. Stretch may still use apt-cache for search and policy* Not checking that right now. ;)

Indeed there are several methods, depending on what result you want.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5343
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 12 times
Been thanked: 66 times

Re: bug in

#15 Post by dilberts_left_nut »

Or 'aptitude show <package>' and grepping for the status field.

The problem with your original approach is that 'aptitude why' isn't really interested if it's installed or not, only in analyzing current state of the dependency chains related to it.
AdrianTM wrote:There's no hacker in my grandma...

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#16 Post by rayandrews »

Code: Select all

apt policy libreoffice                                   
libreoffice:
  Installed: (none)
  Candidate: 1:5.2.7-1+deb9u2
  Version table:
     1:5.2.7-1+deb9u2 500
        500 http://security.debian.org stretch/updates/main amd64 Packages
     1:5.2.7-1 500
        500 http://ftp.ca.debian.org/debian stretch/main amd64 Packages

$ dpkg -V libreoffice                                       
dpkg: package 'libreoffice' is not installed

So 'apt policy' gets it right. Anyway thanks for the list of possibilities for examining package states above.

rayandrews
Posts: 107
Joined: 2014-01-31 21:32
Has thanked: 2 times
Been thanked: 1 time

Re: bug in

#17 Post by rayandrews »

If you look at it that way. It seems uncharitable tho, since every other uninstalled package is reported as uninstalled, and in this one case it is not. It is the *exception* that bothers me even if you could say that aptitude why isn't really interested. Perhaps it gets off on the technicality tho.

Post Reply