ALT Linux Bugzilla
– Attachment 1109 Details for
Bug 7943
Ошибки в работе скрипта freedesktop2menu.pl
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Патч для скрипта freedesktop2menu.pl
freedesktop2menu.pl.patch (text/plain), 3.97 KB, created by
Slava Semushin
on 2005-09-13 09:41:57 MSD
(
hide
)
Description:
Патч для скрипта freedesktop2menu.pl
Filename:
MIME Type:
Creator:
Slava Semushin
Created:
2005-09-13 09:41:57 MSD
Size:
3.97 KB
patch
obsolete
>--- /usr/bin/freedesktop2menu.pl 2004-05-14 14:24:18 +0700 >+++ ./freedesktop2menu.pl 2005-09-13 16:34:40 +0700 >@@ -13,8 +13,10 @@ > # and to support .directory files > # modified by Frederic Crozat <fcrozat@mandrakesoft.com> Aug 07 2001 use new mimetype keyword for Mdk 8.1 > # modified by Laurent Montel <lmontel@mandrakesoft.com> Fri Aug 10 2001 init icon variable some desktop >-# modified by Sergey V Turchin <lzerg@altlinux.org> Tue Mar 9 2004 to adopt for freedesktop >-# file doesn't have icon >+# modified by Sergey V Turchin <zerg@altlinux.org> Tue Mar 9 2004 to >+# adopt for freedesktop file doesn't have icon >+# modified by php-coder <php-coder@altlinux.org> Tue Sep 13 2005 to >+# small fixes and changed output format > > (($#ARGV == 3) or ($#ARGV == 4) or ($#ARGV == 5)) or die "E: You gave me $#ARGV parameters. This script must be invoked with parameters: <package> <section> <file_in> <file_out> [requires] [title]\n"; > >@@ -32,15 +34,15 @@ > ($requires eq "text") or ($requires eq "x11") or ($requires eq "kde") or ($requires eq "gnome") or print "W: requires is $requires (e.g. not text nor x11 nor kde nor gnome)\n"; > > my $debug = 1; >-open (MDKVERSION,"/etc/altlinux-release") or die "Can't open /etc/altlinux-release"; >-while (<MDKVERSION>) >+open (ALTVERSION,"/etc/altlinux-release") or die "Can't open /etc/altlinux-release"; >+while (<ALTVERSION>) > { > chomp; > if (/\S+\s+\S+\s+\S+\s+(\S+)/) { > $mdk_version = $1; > } > } >-close (MDKVERSION); >+close (ALTVERSION); > open (INPUT, $ARGV[2]) or die "Can't open $ARGV[2]!\n"; > open (OUTPUT, ">$ARGV[3]") or die "Can't open $ARGV[3]!\n"; > >@@ -49,7 +51,7 @@ > next if (/^\s*#/); # Ignore comments > next if (/^\s*$/); # Ignore void lines > chomp; # Remove trailing slash >- if (m/^([^=]+)\s*=(.*)/) # Line of the form Key = Value ? >+ if (m/^([^=]+)\s*=(.+)/) # Line of the form Key = Value ? > { > $key = $1; > $value = $2; >@@ -125,7 +127,7 @@ > # if ($mdk_version >= 8.1) { > if (1) { > $_ = $command; >- if ( $requires == "text" or $requires == "x11" ) { >+ if ( $requires eq "text" or $requires eq "x11" ) { > if (/.*%u.*/) { > $accept_url = "true"; > $multiple_files = "false"; >@@ -167,20 +169,16 @@ > } > > # Ok, we've got all the info, write the menu file. >-print OUTPUT "?package($package_name): needs=\"$requires\" extra_filename=\"$extra_filename\" section=\"$section\"". >- " title=\"$name\" icon=\"$icon.png\""; >-defined $command and print OUTPUT " command=\"$command\""; >-defined $command and print OUTPUT " genericname=\"$genericname\""; >-defined $comment and print OUTPUT " longtitle=\"$comment\""; >-#if ($mdk_version >= 8.1) { >-if (1) { >- defined $mimetype and print OUTPUT " mimetypes=\"$mimetype\""; >- defined $command and print OUTPUT " hints=\"$hint\""; >- defined $multiple_files and print OUTPUT " multiple_files=\"$multiple_files\""; >- defined $accept_url and print OUTPUT " accept_url=\"$accept_url\""; >-} >-else { >- defined $mimetype and print OUTPUT " extra_mimetype=\"$mimetype\""; >-} >-print OUTPUT " extra_opt=\"$extra_opt\""; >+print OUTPUT "?package($package_name):\\\n\tneeds=\"$requires\" \\\n\textra_filename=\"$extra_filename\" \\\n\tsection=\"$section\" \\\n\ttitle=\"$name\" \\\n"; >+defined $icon and print OUTPUT "\ticon=\"$icon.png\" \\\n"; >+defined $command and print OUTPUT "\tcommand=\"$command\" \\\n"; >+defined $genericname print OUTPUT "\tgenericname=\"$genericname\" \\\n"; >+defined $comment and print OUTPUT "\tlongtitle=\"$comment\" \\\n"; >+defined $mimetype and print OUTPUT "\tmimetypes=\"$mimetype\" \\\n"; >+defined $command and print OUTPUT "\thints=\"$hint\" \\\n"; >+defined $multiple_files and print OUTPUT "\tmultiple_files=\"$multiple_files\" \\\n"; >+defined $accept_url and print OUTPUT "\taccept_url=\"$accept_url\" \\\n"; >+defined $mimetype and print OUTPUT "\textra_mimetype=\"$mimetype\" \\\n"; >+ >+print OUTPUT "\textra_opt=\"$extra_opt\""; > close(OUTPUT);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 7943
: 1109