Bug 7020 - alternatives-manual некорректно определяет текущий статус альтернативы
Summary: alternatives-manual некорректно определяет текущий статус альтернативы
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: alternatives (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 14:58 MSD by Sir Raorn
Modified: 2005-07-15 10:55 MSD (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sir Raorn 2005-06-07 14:58:14 MSD
Код:

grep -q "^$from" $manual_file
if [ $? -eq 0 ]; then
    [ -w $manual_file ] || print_fatal "$manual_file is not writable for me"
    ed -s $manual_file 2>/dev/null <<EOF
%s|^$from   .*|$from    $to manual|g
wq
EOF
else
    echo "$from $to manual">>$manual_file
fi

Если $from совпадает с началом одной из существующих альтернатив и эта
альтернатива находится в "ручном режиме" - $from не будет переведена в "ручной
режим".
Steps to Reproduce:
1. apt-get install vim-enhanced vim-X11 vim-X11-gtk
2. alternatives-manual /usr/bin/vim-X11 /usr/bin/vim-gtk && alternatives-update
3. alternatives-manual /usr/bin/vim /usr/bin/vim-enhanced
4. readlink /etc/alternatives/links/\|usr\|bin\|vim
Actual Results:  
/usr/bin/vim-X11

Expected Results:  
/usr/bin/vim-enhanced
Comment 1 Sir Raorn 2005-06-07 14:59:23 MSD
> 3. alternatives-manual /usr/bin/vim /usr/bin/vim-enhanced

alternatives-update естессно запускается.  Кстати, можно заглянуть и в
/etc/alternatives/manual
Comment 2 inger@altlinux.org 2005-06-10 12:36:01 MSD
в 0.2.0-alt1