ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: ALT Devel discussion list <devel@lists.altlinux.org>
Subject: Re: [devel] menu DURING_INSTALL
Date: Tue, 11 Nov 2008 17:57:47 +0300
Message-ID: <20081111145747.GV20369@altlinux.org> (raw)
In-Reply-To: <20081111140742.GT20369@altlinux.org>

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

On Tue, Nov 11, 2008 at 05:07:43PM +0300, Alexey Tourbin wrote:
> On Tue, Nov 11, 2008 at 04:54:18PM +0300, Sergey V Turchin wrote:
> > > Тогда я предлагаю сделать скрипт /usr/sbin/update-menus,
> > Зачем его так называть?
> 
> Как его лучше назвать?
> 
> У нашего меню есть специфика: нужно создавать файл lang.h,
> а фунция "lang()" используется в других пакетах.  То есть его нужно
> обязательно создавать.  Обновление системного меню должно эту специфику
> учитывать.

Я проверил: lang.h обязательно должен быть создан, иначе update-menus
отваливает.  Поэтому нужен какой-то промежуточный скрипт, который перед
вызовом update-menus обязательно проверяет/обновляет lang.h.

$ sudo mv /etc/menu-methods/lang.h /etc/menu-methods/lang.h-
$ sudo update-menus
$ sudo update-menus -N
Unable to open file "/lang.h".
install-menu: /etc/menu-methods/gnome-mime-data-applications: aborting
update-menus[10941]: Script /etc/menu-methods/gnome-mime-data-applications returned error status 1.
Unable to open file "/lang.h".
install-menu: /etc/menu-methods/gnome-mime-data-keys: aborting
update-menus[10941]: Script /etc/menu-methods/gnome-mime-data-keys returned error status 1.
Unable to open file "/lang.h".
install-menu: /etc/menu-methods/xdg-desktop-entry-spec-apps: aborting
update-menus[10941]: Script /etc/menu-methods/xdg-desktop-entry-spec-apps returned error status 1.
Unable to open file "/lang.h".
install-menu: /etc/menu-methods/fluxbox: aborting
update-menus[10941]: Script /etc/menu-methods/fluxbox returned error status 1.
$ 

С пустым lang.h тоже отваливает.

$ sudo touch /etc/menu-methods/lang.h                
$ sudo update-menus -N               
In file "/etc/menu-methods/gnome-mime-data-applications", at (or in the definition that ends at) line 14:
[...]t mime_types=" $mimetypes "\n")    forall(languages(), "lang", "\t Name[" substr($lang, "0", "2") "]=" encode_translate($lang,title(),"utf-8") "\n")
[...]                                                 ^
Unknown function: "languages"
install-menu: /etc/menu-methods/gnome-mime-data-applications: aborting
update-menus[11980]: Script /etc/menu-methods/gnome-mime-data-applications returned error status 1.
In file "/etc/menu-methods/xdg-desktop-entry-spec-apps", at (or in the definition that ends at) line 48:
[...]pty($extra_opt, $extra_opt "\n")   forall(languages(), "lang",         "Name[" substr($lang, "0", "2") "]=" encode_translate($lang,title(), "utf8") "\n")       ifnempty($longtitle,        forall(languages(), "lang",                 "Comment[" substr($lang, "0", "2") "]=" encode_translate($lang,$longtitle, "utf8") "\n"))    ifnempty($genericname,forall(languages(), "lang", "GenericName[" substr($lang, "0", "2") "]=" encode_translate($lang,$genericname,"utf8") "\n"))     ifnempty($window_manager_,          "OnlyShowIn=" $window_manager_ ";\n")
[...]                                                 ^
Unknown function: "languages"
install-menu: /etc/menu-methods/xdg-desktop-entry-spec-apps: aborting
update-menus[11980]: Script /etc/menu-methods/xdg-desktop-entry-spec-apps returned error status 1.
In file "/etc/menu-methods/fluxbox", at (or in the definition that ends at) line 22:
[...](level(), "   ") "[" $command "] (" translate(lang(), title()) ")\n"
[...]                                                 ^
Unknown function: "lang"
install-menu: /etc/menu-methods/fluxbox: aborting
update-menus[11980]: Script /etc/menu-methods/fluxbox returned error status 1.
$ 

Ага, функция "languages()" всё-таки используется.

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

  parent reply	other threads:[~2008-11-11 14:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-22  7:19 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081111145747.GV20369@altlinux.org \
    --to=at@altlinux.ru \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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