From d9521574a561b4356c7bccc47cd5e4a044a9c40b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Thu, 24 Feb 2011 19:24:01 +0000 Subject: [PATCH] - rel 2; export var in zsh only if var is set Changed files: setup-zsh.patch -> 1.1 setup.spec -> 1.160 --- setup-zsh.patch | 28 ++++++++++++++++++++++++++++ setup.spec | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 setup-zsh.patch diff --git a/setup-zsh.patch b/setup-zsh.patch new file mode 100644 index 0000000..c36b910 --- /dev/null +++ b/setup-zsh.patch @@ -0,0 +1,28 @@ +Index: profile +=================================================================== +RCS file: /cvsroot/setup/etc/profile,v +retrieving revision 1.55 +retrieving revision 1.56 +diff -u -u -r1.55 -r1.56 +--- setup/etc/profile 22 Jan 2011 20:08:54 -0000 1.55 ++++ setup/etc/profile 24 Feb 2011 19:17:44 -0000 1.56 +@@ -128,7 +128,18 @@ + ;; + * ) + if [ -r "$i" ]; then +- . "$i"; export "$NAME" ++ . "$i" ++ # export VAR will set and export VAR ++ # if it didn't exist before. Other shells ++ # (ksh, bash) behave differently. ++ if [ -n "$ZSH_VERSION" ]; then ++ # zsh specific ++ if [ "${(P)+NAME}" = "1" ]; then ++ export "$NAME" ++ fi ++ else ++ export "$NAME" ++ fi + fi + ;; + esac diff --git a/setup.spec b/setup.spec index 6351782..334f60b 100644 --- a/setup.spec +++ b/setup.spec @@ -14,7 +14,7 @@ Summary(pt_BR.UTF-8): Vários arquivos básicos de configuração Summary(tr.UTF-8): Basit kurulum dosyaları Name: setup Version: 2.7.3 -Release: 1 +Release: 2 License: Public Domain, partially BSD-like Group: Base Source0: %{name}-%{version}.tar.bz2 @@ -30,6 +30,7 @@ Patch0: %{name}-iana-etc.patch # This is source of non-iana changes in services file Patch1: %{name}-services.patch Patch2: protocols-fmt.patch +Patch3: %{name}-zsh.patch BuildRequires: dietlibc-static BuildRequires: gawk Requires: FHS >= 2.3-24.1 @@ -83,6 +84,7 @@ dosyalarını içerir. %patch0 -p1 mv iana-etc{-%{iana_etc_ver},} %patch2 -p1 +%patch3 -p1 cp -a %{SOURCE2} iana-etc/protocol-numbers.iana cp -a %{SOURCE3} iana-etc/port-numbers.iana -- 2.44.0