<!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: ><i> 11.04.2012 03:13, Maarten Vanraes kirjoitti: </I>>><i> Hi, </I>>><i> </I>>><i> from a question someone asked, i was reminded why an alternative file ( </I>>><i> /var/lib/rpm/alternative/gl_conf ) was not owned. </I>>><i> </I>>><i> I found out that alternative files are usually %ghost 'ed, but it seems not in </I>>><i> this case. </I>>><i> </I>>><i> I looked at the alternatives policy, but it was empty as it needs yet to be </I>>><i> written. </I>>><i> </I>>><i> so, is it true that alternative files should be %ghost 'ed? or not? </I>><i> </I>><i> /var/lib/rpm/alternatives/foo is not an "alternative file" (at least not </I>><i> IMHO), but an internal update-alternaties db, so it is not ghosted. </I>><i> </I>><i> It is automatically removed by update-alternatives when it becomes empty </I>><i> (i.e. all packages providing the alternative have been removed). </I>><i> </I>><i> There is one problem regarding this, though. If the files becomes </I>><i> corrupted, the alternatives system becomes kind of stuck... IMO it </I>><i> should zero/drop the /var/lib/rpm/alternatives/foo on error (possibly </I>><i> with a backup). AFAICS this would mean changing the badfmt() error </I>><i> handler in /usr/sbin/update-alternatives to remove/move the file and </I>><i> changing the open(AF, "$admindir/$name") loop starting in line 135 to </I>><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>