ALT Linux Bugzilla
– Attachment 4934 Details for
Bug 25621
[PATCH] double-check link target before removing it
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
alternatives-0.4.3-symlink.patch
alternatives-0.4.3-symlink.patch (text/plain), 725 bytes, created by
Michael Shigorin
on 2011-05-17 15:38:43 MSK
(
hide
)
Description:
alternatives-0.4.3-symlink.patch
Filename:
MIME Type:
Creator:
Michael Shigorin
Created:
2011-05-17 15:38:43 MSK
Size:
725 bytes
patch
obsolete
>diff -urN alternatives-0.4.3.orig/alternatives-update alternatives-0.4.3/alternatives-update >--- alternatives-0.4.3.orig/alternatives-update 2011-04-12 00:04:53.000000000 +0300 >+++ alternatives-0.4.3/alternatives-update 2011-05-17 07:53:54.000000000 +0300 >@@ -72,7 +72,10 @@ > # echo "remove_alternative:$1" > from=$1 > int_link=$(echo $from|alternatives_encode) >- [ -h $fake_dir/$from ] && rm -f $fake_dir/$from #remove external only if it is symlink >+ if [ -h $fake_dir/$from ]; then >+ #remove external only if it is alternatives symlink >+ readlink "$fake_dir/$from" | grep -q '^/etc/alternatives/links/' && rm -f "$fake_dir/$from" >+ fi > rm -f "$links_dir/$int_link" #always remove internal links > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25621
: 4934