Страница 1 из 1

command-not-found isn't working on Desktop.fresh

Добавлено: 04 мар 2013, 21:22
sylvainsjc
Hi all,

I tested without any problems the package "command-not-found" on ROSA Marathon and it works very well.

I also wanted to install it on Desktop Fresh and since I have no more back with all commands.

Type an unknown or an error command : prompt return without explanatory text

Код: Выделить всё

[sylvain@Rosa2012Fresh ~]$ toto
[sylvain@Rosa2012Fresh ~]$ tata
[sylvain@Rosa2012Fresh ~]$ wtf 
Restarted the session, reboot the computer : same behavior...

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 05 мар 2013, 11:32
sylvainsjc
Same behavior with another Desktop Fresh under VirtualBox

cnf is well installed under /usr/bin but cnf command doesn't give any results

Код: Выделить всё

[sylvain@Rosa2012Fresh ~]$ set | grep cnf
    if [ -x /usr/bin/cnf ]; then
        /usr/bin/cnf -- "$1";
[sylvain@Rosa2012Fresh ~]$ ls -al /usr/bin/cn*
-rwxr-xr-x 1 root root 5469 févr. 21 15:57 /usr/bin/cnf*
[sylvain@Rosa2012Fresh ~]$ cnf kdenlive
[sylvain@Rosa2012Fresh ~]$ cnf kate
[sylvain@Rosa2012Fresh ~]$ cnf -help
usage: cnf [-h] [command]

Rechercher des commandes dans le dépôt. Pour rappel : 127 est un code de
sortie de programme normal !

positional arguments:
  command     Commande à rechercher.

optional arguments:
  -h, --help  show this help message and exit

Dans le cas d'une proposition unique de paquet contenant la commande donnée,
cnf vous affichera une proposition de commande pour l'installer et vous
demandera si vous souhaitez le faire immédiatement (la question est suivie des
options et o/N). Si vous ne voulez pas que cnf propose quoi que ce soit à
l'utilisateur - mettez la variable d'environnement
COMMAND_NOT_FOUND_TURN_OFF_INSTALL_PROMPT à 1.
[sylvain@Rosa2012Fresh ~]$
[root@Rosa2012Fresh ~]# rpm -qa | egrep 'command-not|python-json'
command-not-found-data-2013.02.21-2-rosa2012.1.noarch
python-json-3.4-3-rosa2012.1.noarch
command-not-found-1.2-3-rosa2012.1.noarch
[root@Rosa2012Fresh ~]# 

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 05 мар 2013, 13:36
Flid
Hi!
cnf prints nothing in case of internal exception. I now, it can be done better. But now let's find out what exception happend.

Please, open /usr/bin/cnf (for example, using sudo vim) end change a line "safemode = True" to "safemode = False". It will throw all the exceptions to console.
Please, do it, run any unknown command and post here a traceback. I'll fix it ASAP.
Thank You.

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 05 мар 2013, 14:29
sylvainsjc
Here's the requested results :

Код: Выделить всё

[root@Rosa2012Fresh ~]# kate
Traceback (most recent call last):
  File "/usr/bin/cnf", line 152, in <module>
    main()
  File "/usr/bin/cnf", line 92, in main
    inst_pkgs = get_installed_pkgs()
  File "/usr/bin/cnf", line 41, in get_installed_pkgs
    rpm = __import__('rpm')
ImportError: No module named rpm
[root@Rosa2012Fresh ~]# toto
Traceback (most recent call last):
  File "/usr/bin/cnf", line 152, in <module>
    main()
  File "/usr/bin/cnf", line 92, in main
    inst_pkgs = get_installed_pkgs()
  File "/usr/bin/cnf", line 41, in get_installed_pkgs
    rpm = __import__('rpm')
ImportError: No module named rpm
[root@Rosa2012Fresh ~]# 

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 05 мар 2013, 15:39
Flid
Yes, I forgot to add requirement for python-rpm package. Please, install it manually and make sure the problem disappeared.

But it definetly is a bug, thank you! I'll rebuild package in about half an hour.

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 05 мар 2013, 21:27
sylvainsjc
Yes after adding python-rpm package, all works fine now ;)

Re: command-not-found isn't working on Desktop.fresh

Добавлено: 06 мар 2013, 12:22
Flid
Package with correct dependencies has been rebuilt and published yesterday.
Thank you for your help!