ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] menu DURING_INSTALL
@ 2008-09-22  7:19 Alexey Tourbin
  2008-09-22  8:21 ` Anton Farygin
                   ` (2 more replies)
  0 siblings, 3 replies; 36+ messages in thread
From: Alexey Tourbin @ 2008-09-22  7:19 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2408 bytes --]

В каких случаях при установке пакетов выставляется DURING_INSTALL?

Также прошу прокомментировать последнее изменение в пакете menu.
Почему инициализировать меню надо не в %post-скрипте, а при первой
загрузке?

commit e5c0c5f30d097ef18c3c619a51c3cc962742a58c
Author: Anton Farygin <rider@altlinux>
Date:   Wed Jun 25 13:07:15 2008 +0400

    2.1.35-alt5.1
    
    - create /etc/menu-methods/lang.h in firsttime script, also don't run post
      script on system preparing stage (check DURING_INSTALL)

diff --git a/menu-firsttime b/menu-firsttime
index 1e8dac3..a677d90 100755
--- a/menu-firsttime
+++ b/menu-firsttime
@@ -5,4 +5,23 @@ WITHOUT_RC_COMPAT=1
 # Source function library.
 . /etc/init.d/functions
 
+# create languages list
+if [ -r /etc/sysconfig/i18n ]; then
+    . /etc/sysconfig/i18n
+fi
+PREFERRED_LOCALE=$LANG
+[ -n "$PREFERRED_LOCALE" ] || PREFERRED_LOCALE=C
+
+LANGUAGES_LIST=$SUPPORTED
+[ -n "$LANGUAGES_LIST" ] || LANGUAGES_LIST=$PREFERRED_LOCALE
+[ -n "$LANGUAGES_LIST" ] || LANGUAGES_LIST=C
+
+if [ "$LANGUAGE" == "all" ]
+then
+    LANGUAGES_LIST=`echo /usr/share/locale/*/LC_MESSAGES/menu-messages.mo | sed -e 's@/usr/share/locale/@@g' -e 's@/LC_MESSAGES/menu-messages.mo@@g' -e 's@ @:@g'`
+fi
+echo "function lang()=\"$PREFERRED_LOCALE\"" > /etc//menu-methods/lang.h
+echo "function languages()=\"$LANGUAGES_LIST\"" >> /etc/menu-methods/lang.h
+
+
 action "Updating application menus:" /usr/bin/update-menus
diff --git a/menu.spec b/menu.spec
index c74e1c4..fc4c777 100644
--- a/menu.spec
+++ b/menu.spec
@@ -3,7 +3,7 @@
 
 Name: menu
 Version: 2.1.35
-Release: alt5
+Release: alt5.1
 
 Group: System/Base
 Summary: Menu system
@@ -153,6 +153,8 @@ mkdir -p %buildroot/%_sysconfdir/xdg/menus/
 
 %post
 # create languages list
+[ -z "$DURING_INSTALL" ] || exit 0
+
 if [ -r %_sysconfdir/sysconfig/i18n ]; then
     . %_sysconfdir/sysconfig/i18n
 fi
@@ -204,6 +206,10 @@ fi
 %doc doc/{*html,README*,BUGS,menu.txt*} AUTHORS debian/changelog debian/copyright examples
 
 %changelog
+* Wed Jun 25 2008 Anton Farygin <rider@altlinux> 2.1.35-alt5.1
+- create /etc/menu-methods/lang.h in firsttime script, also don't run post 
+  script on system preparing stage (check DURING_INSTALL)
+
 * Tue Oct 23 2007 Sergey V Turchin <zerg at altlinux dot org> 2.1.35-alt5
 - improve desktop categories translation file
 

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2008-11-25 11:32 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-22  7:19 [devel] menu DURING_INSTALL Alexey Tourbin
2008-09-22  8:21 ` Anton Farygin
2008-09-22  8:25 ` Stanislav Ievlev
2008-09-22  8:37   ` Anton Farygin
2008-09-22 11:22     ` Sergey V Turchin
2008-11-11 12:04 ` Alexey Tourbin
2008-11-11 12:35   ` Sergey V Turchin
2008-11-11 12:39   ` Alexey I. Froloff
2008-11-11 12:56     ` Alexey Tourbin
2008-11-11 13:00       ` Sergey V Turchin
2008-11-11 13:03         ` Alexey Tourbin
2008-11-11 13:14           ` Sergey V Turchin
2008-11-11 13:28             ` Alexey Tourbin
2008-11-11 13:54               ` Sergey V Turchin
2008-11-11 14:07                 ` Alexey Tourbin
2008-11-11 14:35                   ` Sergey V Turchin
2008-11-11 14:57                   ` Alexey Tourbin
2008-11-11 15:05                     ` Sergey V Turchin
2008-11-11 14:34                 ` Alexey Tourbin
2008-11-11 14:59                   ` Sergey V Turchin
2008-11-12 12:51           ` Stanislav Ievlev
2008-11-11 13:25       ` Alexey I. Froloff
2008-11-11 14:01         ` Led
2008-11-11 14:11           ` Alexey Gladkov
2008-11-11 14:17             ` Led
2008-11-11 14:18               ` Mikhail Gusarov
2008-11-11 14:23               ` Alexey Gladkov
2008-11-11 14:35                 ` Led
2008-11-11 14:48                   ` Alexey Gladkov
2008-11-12 12:51   ` Stanislav Ievlev
2008-11-12 13:00     ` Alexey Tourbin
2008-11-12 13:02       ` Stanislav Ievlev
2008-11-25 10:37     ` Alexey Tourbin
2008-11-25 11:05       ` Igor Vlasenko
2008-11-25 11:32         ` Alexey Tourbin
2008-11-25 11:32       ` Sergey V Turchin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git