summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/2012-April/014131.html
blob: 5e3d72158302f958510c774f0d0b254e8eac0ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-dev] alternatives policy
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20alternatives%20policy&In-Reply-To=%3C4F84DBF2.8040304%40mageia.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="014130.html">
   <LINK REL="Next"  HREF="014129.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-dev] alternatives policy</H1>
    <B>Anssi Hannula</B> 
    <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20alternatives%20policy&In-Reply-To=%3C4F84DBF2.8040304%40mageia.org%3E"
       TITLE="[Mageia-dev] alternatives policy">anssi at mageia.org
       </A><BR>
    <I>Wed Apr 11 03:18:42 CEST 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="014130.html">[Mageia-dev] alternatives policy
</A></li>
        <LI>Next message: <A HREF="014129.html">[Mageia-dev] Problems with flash 11.2
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#14131">[ date ]</a>
              <a href="thread.html#14131">[ thread ]</a>
              <a href="subject.html#14131">[ subject ]</a>
              <a href="author.html#14131">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>11.04.2012 04:15, Anssi Hannula kirjoitti:
&gt;<i> 11.04.2012 03:13, Maarten Vanraes kirjoitti:
</I>&gt;&gt;<i> Hi,
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> from a question someone asked, i was reminded why an alternative file ( 
</I>&gt;&gt;<i> /var/lib/rpm/alternative/gl_conf ) was not owned.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I found out that alternative files are usually %ghost 'ed, but it seems not in 
</I>&gt;&gt;<i> this case.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> I looked at the alternatives policy, but it was empty as it needs yet to be 
</I>&gt;&gt;<i> written.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> so, is it true that alternative files should be %ghost 'ed? or not?
</I>&gt;<i> 
</I>&gt;<i> /var/lib/rpm/alternatives/foo is not an &quot;alternative file&quot; (at least not
</I>&gt;<i> IMHO), but an internal update-alternaties db, so it is not ghosted.
</I>&gt;<i> 
</I>&gt;<i> It is automatically removed by update-alternatives when it becomes empty
</I>&gt;<i> (i.e. all packages providing the alternative have been removed).
</I>&gt;<i> 
</I>&gt;<i> There is one problem regarding this, though. If the files becomes
</I>&gt;<i> corrupted, the alternatives system becomes kind of stuck... IMO it
</I>&gt;<i> should zero/drop the /var/lib/rpm/alternatives/foo on error (possibly
</I>&gt;<i> with a backup). AFAICS this would mean changing the badfmt() error
</I>&gt;<i> handler in /usr/sbin/update-alternatives to remove/move the file and
</I>&gt;<i> changing the open(AF, &quot;$admindir/$name&quot;) loop starting in line 135 to
</I>&gt;<i> handle errors gracefully...
</I>
Sorry, I changed my mind while writing the above paragraph so it got a
bit confused. I meant that in case of syntax error, a warning is printed
out (and possibly a backup of the file made) instead of aborting like
the script currently does (no zeroing/dropping the file necessary). The
old file will be overwritten later in the script when the configuration
is written back.

-- 
Anssi Hannula
</PRE>



















<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="014130.html">[Mageia-dev] alternatives policy
</A></li>
	<LI>Next message: <A HREF="014129.html">[Mageia-dev] Problems with flash 11.2
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#14131">[ date ]</a>
              <a href="thread.html#14131">[ thread ]</a>
              <a href="subject.html#14131">[ subject ]</a>
              <a href="author.html#14131">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev
mailing list</a><br>
</body></html>