[opensuse-gnome] tiny patch for spec-cleaner
Vincent, First of all my apologies for hijacking this list for this subject. In the hope that it might be useful to you, I've made a small patch for spec cleaner that adds %{?no_lang_C} to the %find_lang macro when it exists. My Python skills are not that great and my git skills are even worst (big fail on pushing things, blame the auth). Hope it's useful; It's been for me after Dominique's indications to start using it... NM Melhores cumprimentos, Nelson M. Marques
Actually I've managed to do it (hopefully) properly :) https://gitorious.org/opensuse/spec-cleaner/merge_requests/3 Melhores cumprimentos, Nelson M. Marques ________________________________________ De: Nelson Manuel Marques Enviado: terça-feira, 25 de Setembro de 2012 0:45 Para: opensuse-gnome@opensuse.org Cc: vuntz@opensuse.org Assunto: tiny patch for spec-cleaner Vincent, First of all my apologies for hijacking this list for this subject. In the hope that it might be useful to you, I've made a small patch for spec cleaner that adds %{?no_lang_C} to the %find_lang macro when it exists. My Python skills are not that great and my git skills are even worst (big fail on pushing things, blame the auth). Hope it's useful; It's been for me after Dominique's indications to start using it... NM Melhores cumprimentos, Nelson M. Marques-- To unsubscribe, e-mail: opensuse-gnome+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-gnome+owner@opensuse.org
Hi, Le mardi 25 septembre 2012, à 00:45 +0100, Nelson Manuel Marques a écrit :
+def replace_lang_macros(s): + return re.sub(r'%find_lang(.*)', r'%find_lang\1 %{?no_lang_C}', s)
Wouldn't this replace "%find_lang %{?no_lang_C} foo" with "%find_lang %{?no_lang_C} foo %{?no_lang_C}"? You probably need to check if %{?no_lang_C} is there before doing the substitution. Cheers, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-gnome+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-gnome+owner@opensuse.org
Ok, thanks for the pointer and help. I'll push it later on this evening, right now I don't have my ssh keys on this machine :) NM Melhores cumprimentos, Nelson M. Marques ________________________________________ De: Vincent Untz [vuntz@opensuse.org] Enviado: terça-feira, 25 de Setembro de 2012 12:52 Para: opensuse-gnome@opensuse.org Assunto: Re: [opensuse-gnome] tiny patch for spec-cleaner Hi, Le mardi 25 septembre 2012, à 00:45 +0100, Nelson Manuel Marques a écrit :
+def replace_lang_macros(s): + return re.sub(r'%find_lang(.*)', r'%find_lang\1 %{?no_lang_C}', s)
Wouldn't this replace "%find_lang %{?no_lang_C} foo" with "%find_lang %{?no_lang_C} foo %{?no_lang_C}"? You probably need to check if %{?no_lang_C} is there before doing the substitution. Cheers, Vincent -- Les gens heureux ne sont pas pressés. -- To unsubscribe, e-mail: opensuse-gnome+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-gnome+owner@opensuse.org
participants (2)
-
Nelson Manuel Marques
-
Vincent Untz