diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-04-05 21:17:31 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-04-05 21:17:31 +0100 |
commit | dc7cbdfa65fd814b3b9aa3c56257da201109e807 (patch) | |
tree | c85d72f6f31f21f178069c9d41d41a7c1ff4b362 /app-shells/bash | |
parent | 0706fc6986773f4e4d391deff4ad5143c464ea4e (diff) |
gentoo resync : 05.04.2019
Diffstat (limited to 'app-shells/bash')
-rw-r--r-- | app-shells/bash/Manifest | 5 | ||||
-rw-r--r-- | app-shells/bash/bash-5.0_p3-r1.ebuild | 267 | ||||
-rw-r--r-- | app-shells/bash/bash-5.0_p3.ebuild (renamed from app-shells/bash/bash-5.0_p2.ebuild) | 9 | ||||
-rw-r--r-- | app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch | 83 |
4 files changed, 363 insertions, 1 deletions
diff --git a/app-shells/bash/Manifest b/app-shells/bash/Manifest index 2573c7d0e587..83df53a89156 100644 --- a/app-shells/bash/Manifest +++ b/app-shells/bash/Manifest @@ -46,6 +46,7 @@ AUX bash-4.4-jobs_overflow.patch 331 BLAKE2B 6897770ef49b5f3def669abaec3d18fd8c7 AUX bash-4.4-popd-offset-overflow.patch 1069 BLAKE2B b23ce9f427cdf252aebdf7330828074230f9b22b5bb59b712d1b148ecbf73aea78ce4e29d353198235b25fa19c4046405c8ae6eeb7fd1cf299d05b732f7cc37b SHA512 535f61b2e0c6423031520700be423750e9177ec96055be781aee5dbdd01c720c1dbc30fffa73b88464527981193c1c6a74ec4139753ef4f40a5bb0f55c4de61c AUX bash-4.4-set-SHOBJ_STATUS.patch 410 BLAKE2B beddcd4ea00cf6814615896e9842a607280d56086165c38338bfdc8e92922f92219f30419f47dd1bd65939f2a3e48fced612db1332a9ee357465816b4939c678 SHA512 9a723b712279e640396bdaa18f4b5ec48fcbbf253573b0aa1e2e6e2cd9200d8d8a082fb3816154aaff0dd81de2e7a66babbdd682e50e4fc2e93dfaa1af17f04d AUX bash-4.x-deferred-heredocs.patch 1255 BLAKE2B 944c8d5feaba6a6818fe7e20300fdd44d1e162511c1aaf272bdb4d4c382e100908c16a17e4bef622134116e153f96f61fae4d7985e58cb881012058250a2e7f5 SHA512 9016203189d0b601f0441daec19f902de7387b599a2196c475d76c596dcf9a9c22765a58e7fc5a3117522ec2722475bd166bea271ff3048f31674e8bed2901a0 +AUX bash-5.0-assignment-preceding-builtin.patch 2790 BLAKE2B fbafa51f96f1fef538e56e55ab3b7067ac4532ab8c0f93d151eeaf6b3a521bc15d7d4ae580489352cc6d9ecc5b43b96494c8b661cf2db3b97265bd1dffad5390 SHA512 9a4ec56b341ed90f348c3ca5ec5c98790eb98a7d78d436131a56bcdde49f09f618398e87c81da7c1dde645690d9c779578f5a2b37dadda75c587332715ab1732 AUX bash-5.0-globpat-backslashes.patch 5503 BLAKE2B 1072064fa970b5b212ff2fe7fb6dc90aa49833367176bd7305ca3aa657aca39156437fdc5892deec6a19c880e3abc683475c7a99a8c96ac95fe698a67a9aabb9 SHA512 9263ed70bf93881f925b64cad80c946e0598ad8fe28ac83fb2b6bce83259f9104d04d698bdf7f0adc72abbb8d0760691f7dea63143f768f3501eb927f6a050ae AUX bash-5.0-history-append.patch 1150 BLAKE2B cc3d4c2303b37b14da2cbb3130db0c2fa65cdc7f7f8d0a4413042a898c4c48afbedcca03c9dbfc525ab191ddc2b4258fb976a28830e03490011f89a1361974b4 SHA512 9c2fb93c67a5da1e97b293db4b26469fd6813e2cfc8ffd776042529878b96312644d8dc247887d6171c89c0853d552e9f7d5d2c0b2f3d05c25c15e17e6706999 AUX bash-5.0-history-zero-length.patch 1704 BLAKE2B e94683d245b233b95db8e67a2e536081816ce7d095080b17ee3a9ecef1d3a9094e09e8929eeed5aeff89cd268b49a9ca0cf5cba8aab0695914e88be1b724056c SHA512 2f21c7938c585d0126456b1d878e60d7ddef6a6188f49325cf1f15ab2f7f490ce8458504da8a08cf4b00c84a48f9f43079ff6ee334120d29c1529219d9e9074d @@ -368,6 +369,7 @@ DIST bash44-022 1818 BLAKE2B 66c6e5fd33f0649ff886d1fd944cb10a06de06f0724c0cb7343 DIST bash44-023 1557 BLAKE2B 95a21ade7e4be68d66f3862f26b574c5897055822471c8d2801b8e1f866d1d11ddd4000e967b567c3ef7949af8a88ca918ea066d52a67fc5fd4b266135f0dbbb SHA512 442efa78d365a728555ade77cc2f8501aed09f37ae10e1ac647d35299829b63caefbc5c30436d622bfef9300e9d929d7f4fafe85a59df15089881bc987fa12fd DIST bash50-001 4133 BLAKE2B 3eedb63f943ba89f1147c907fcacb5e5af891a6728edb4ced972e19d586573db6fface4947490ffb9f42a2ed87c745a352e102fb727637eec8422d7323da9470 SHA512 e3bf036287d3be1f3e91755678c04c9a8e1b4a98e34e181871dfaeb13987dda18c31a44db3f3829d91a185ba4414b9c0229f2a15f6e8a951cbc6c1054252bfdd DIST bash50-002 4380 BLAKE2B 022340f0da0d5b7c571c2015beb87268452faf1484bedb75e2868b16904eed93749d5c0ed62b9da43badb3ee2efe3bdb4f55e212a40c3cfdc073d44623475b85 SHA512 59b1cfa1be1029ada53c63fe651d51451ead5523c50c115e0eada07e34e641c693ed728366986acb431f96fdc61818efd3f8cd168ce416001edc62602e5f28dd +DIST bash50-003 6434 BLAKE2B ccf05f2f0da6dd0a1d25d22200326d405019acbce27a7fbcb3f16ff09027d5dec5cb9d5dc557638f72089a3444b25d5106abdb0916cac0797562b4d8b68a0ab2 SHA512 520b5cc0b7aeea6cd8b7471b553d8979996f3627a3e5c8889023562dadc82475be243aca2ec608217b78400a1dceb134b877d3ded926e581445234f1b69409e6 EBUILD bash-2.05b_p13.ebuild 4613 BLAKE2B c9eae8a532057dab41ca20640f7b85e9f0d8b11eacd84c91b0dc478dcc906cd14976e02b086e2fbc1786661f27ddfce0b8631211461ed77cced2037058e99338 SHA512 f933883acba8f96a5f0390b11650981291c8048211e832a6d3bcc6f41cafe9372380051f804e22958934803c4d8cac83d1bdb604689c313bddeb67446106bff8 EBUILD bash-3.0_p22.ebuild 4746 BLAKE2B f8840c82f5cfbcf224d1504d3cbadc3eabe015d991a8c41de978562cc0c806b6baed999d085774594deb620dd714fb8d020ccc89d65c3e622745875528b61b57 SHA512 c39a3f5b22a8b462e6b2abf63a13454559b358002e0efb16640fb9caa04cbd9b416640cf25df98b9fdcaaca465bbf083c0687dc08e122c8b965e2761b01b37f6 EBUILD bash-3.1_p23.ebuild 4427 BLAKE2B baf534ac2cf5a872673b355532b0b9ea8d4836df331f7e50425733815862435ffa44eb9cd95b1dbdd53a29010638b516deb16c8e72a44d5fa135eaea23c34bf5 SHA512 40e91cad8af0682565d4eed7ad2f6184e1624746a8f6ea1ce21bed459e45bcdc8157aa45cc7f89d1ce5c7f1f827707a839bc89a513956b827a50a5e3bc877959 @@ -378,5 +380,6 @@ EBUILD bash-4.2_p53.ebuild 4344 BLAKE2B 5565a97a0aa9465fd8eef2de0b78434c04096d84 EBUILD bash-4.3_p48-r2.ebuild 5642 BLAKE2B f5d114b98272cf7e6a900707e0abc4798cc1b85bf509f3260487959dad69a35a0badae19e1522e4746bb74c06f00a767a50c6a3199339c42036f3d92924722af SHA512 e83786756c9e65c08e78137396b393e04a7950d9393c6206491d7d7b13eb46fb4504fe34335706aa0835b6abc651e9578bf6157d6248de8e7fc2dc1a90cba927 EBUILD bash-4.4_p23-r1.ebuild 7382 BLAKE2B 1199ddb85f5ae9b85244e7e7be775b831a7ceacd839891b767c5e4b4d66af09d9a80d60440de6850d6d9354713eb214a14678e30e2e4a4b4f85cda3b5a2ec4f3 SHA512 49acd473c8280ea9830bf42ee80b4df859a2996f46cafb4fe7d8eb1c3e01f49b3aee75b76dc3b70b91deb3b3541be10f2a0972355397db4eecc1a2f43b6d51de EBUILD bash-5.0_p2-r2.ebuild 7609 BLAKE2B 1860df6991961e81665888a45b7d588d9b50af0322f32c15df3ce8b1ddbc0a1a85dc989f1cf7d542062b828a02b4eefa261467729dfb43b16aa48a581783f967 SHA512 cba96f1480e35e9cb769f325102fd5c14ddf4f17d0213c9b2ab7a0b61d01289a3afd556aa0aa49935d0242e355100a91f3a1833dee2106f4b5e4569f7b1449ad -EBUILD bash-5.0_p2.ebuild 7271 BLAKE2B f92a52f76241ab4f8828bdefd3e22ca082a7b9349deb885f9cb95eab5b460f5951490214498bdb29988fa8f8d559a366b5b3c6a231981b8b169daefa39250624 SHA512 3707f5d36ea640ce250f265ee0b232c049325cf1e8736aa709761610be776283c57f82f8dadf54ab44282594e17fae606c78541f8861f615f2802f44718f078a +EBUILD bash-5.0_p3-r1.ebuild 7618 BLAKE2B 7d20409cbeef90d517023d58900ed8e3ac044ad519757caf44f8d2c7ec07d20775527efd42b56dda664f88321c2f42dbbe11b4cb84997b8ce80bced56a2a12ab SHA512 52914b61a7f3aae2a6e84fa9b1a3b18927b221b1f3c5d378cde8b2ab14e6a4c78bdb7cd15204cb91adeaac687cdaed23b8deab1f2d88aa96d3254bba0842d4e9 +EBUILD bash-5.0_p3.ebuild 7558 BLAKE2B 0e446a2474a17d7c72636f86c5b4f2887f908d8d90d2a59bfb13f8ccb40d8bf4dae986cb81e8460fee3660da2a3f675241c945b8b1b057906eaebe784899c324 SHA512 9fa937f830c1c310232afaebaf9856247e18d9803e8ccea69ef6d1e001e72f2338596d02479f4cbf97157e5689de99fa9cd87dfdeab2efaf6630df86db603636 MISC metadata.xml 734 BLAKE2B 242fda202379209b74e12c1726c4f4aa487eb09423d2249d13cae38cb9b077a285beff221a824647c826c39f7400178cd04d6082915ad9c23287ea70da9ef961 SHA512 a9301e8d2347e0cf90a97325d9a705076150c00609d28338e5d7d72c135468e4f0531b2a4077b69679ae6ccf89eee691e0e5f0748caab60689f5f017afb544f1 diff --git a/app-shells/bash/bash-5.0_p3-r1.ebuild b/app-shells/bash/bash-5.0_p3-r1.ebuild new file mode 100644 index 000000000000..d13f22168a61 --- /dev/null +++ b/app-shells/bash/bash-5.0_p3-r1.ebuild @@ -0,0 +1,267 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic toolchain-funcs multilib prefix + +# Official patchlevel +# See ftp://ftp.cwru.edu/pub/bash/bash-5.0-patches/ +PLEVEL=${PV##*_p} +MY_PV=${PV/_p*} +MY_PV=${MY_PV/_/-} +MY_P=${PN}-${MY_PV} +is_release() { + case ${PV} in + *_alpha*|*_beta*|*_rc*) return 1 ;; + *) return 0 ;; + esac +} +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + local opt=$1 plevel=${2:-${PLEVEL}} pn=${3:-${PN}} pv=${4:-${MY_PV}} + [[ ${plevel} -eq 0 ]] && return 1 + eval set -- {1..${plevel}} + set -- $(printf "${pn}${pv/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${pn} ; do + printf "${u}/${pn}-${pv}-patches/%s " "$@" + done + fi +} + +# The version of readline this bash normally ships with. +READLINE_VER="8.0" + +DESCRIPTION="The standard GNU Bourne again shell" +HOMEPAGE="http://tiswww.case.edu/php/chet/bash/bashtop.html" +if is_release ; then + SRC_URI="mirror://gnu/bash/${MY_P}.tar.gz $(patches)" +else + SRC_URI="ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" +fi + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="afs bashlogger examples mem-scramble +net nls plugins +readline" + +DEPEND=" + >=sys-libs/ncurses-5.2-r2:0= + readline? ( >=sys-libs/readline-${READLINE_VER}:0= ) + nls? ( virtual/libintl ) +" +RDEPEND=" + ${DEPEND} + !<sys-apps/portage-2.1.6.7_p1 +" +# we only need yacc when the .y files get patched (bash42-005) +#DEPEND+=" virtual/yacc" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + # Patches from Chet sent to bashbug ml + "${FILESDIR}"/${PN}-5.0-history-zero-length.patch + "${FILESDIR}"/${PN}-5.0-history-append.patch + "${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch + "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch + "${FILESDIR}"/${PN}-5.0-assignment-preceding-builtin.patch +) + +pkg_setup() { + if is-flag -malign-double ; then #7332 + eerror "Detected bad CFLAGS '-malign-double'. Do not use this" + eerror "as it breaks LFS (struct stat64) on x86." + die "remove -malign-double from your CFLAGS mr ricer" + fi + if use bashlogger ; then + ewarn "The logging patch should ONLY be used in restricted (i.e. honeypot) envs." + ewarn "This will log ALL output you enter into the shell, you have been warned." + fi +} + +src_unpack() { + unpack ${MY_P}.tar.gz +} + +src_prepare() { + # Include official patches + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + + # Clean out local libs so we know we use system ones w/releases. + if is_release ; then + rm -rf lib/{readline,termcap}/* + touch lib/{readline,termcap}/Makefile.in # for config.status + sed -ri -e 's:\$[(](RL|HIST)_LIBSRC[)]/[[:alpha:]]*.h::g' Makefile.in || die + fi + + # Prefixify hardcoded path names. No-op for non-prefix. + hprefixify pathnames.h.in + + # Avoid regenerating docs after patches #407985 + sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die + touch -r . doc/* + + eapply -p0 "${PATCHES[@]}" + eapply_user +} + +src_configure() { + local myconf=( + --disable-profiling + --docdir='$(datarootdir)'/doc/${PF} + --htmldir='$(docdir)/html' + --with-curses + $(use_enable mem-scramble) + $(use_enable net net-redirections) + $(use_enable readline) + $(use_enable readline bang-history) + $(use_enable readline history) + $(use_with afs) + $(use_with mem-scramble bash-malloc) + ) + + # For descriptions of these, see config-top.h + # bashrc/#26952 bash_logout/#90488 ssh/#24762 mktemp/#574426 + append-cppflags \ + -DDEFAULT_PATH_VALUE=\'\"${EPREFIX}/usr/local/sbin:${EPREFIX}/usr/local/bin:${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin\"\' \ + -DSTANDARD_UTILS_PATH=\'\"${EPREFIX}/bin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/usr/sbin\"\' \ + -DSYS_BASHRC=\'\"${EPREFIX}/etc/bash/bashrc\"\' \ + -DSYS_BASH_LOGOUT=\'\"${EPREFIX}/etc/bash/bash_logout\"\' \ + -DNON_INTERACTIVE_LOGIN_SHELLS \ + -DSSH_SOURCE_BASHRC \ + $(use bashlogger && echo -DSYSLOG_HISTORY) + + # Don't even think about building this statically without + # reading Bug 7714 first. If you still build it statically, + # don't come crying to us with bugs ;). + #use static && export LDFLAGS="${LDFLAGS} -static" + use nls || myconf+=( --disable-nls ) + + # Historically, we always used the builtin readline, but since + # our handling of SONAME upgrades has gotten much more stable + # in the PM (and the readline ebuild itself preserves the old + # libs during upgrades), linking against the system copy should + # be safe. + # Exact cached version here doesn't really matter as long as it + # is at least what's in the DEPEND up above. + export ac_cv_rl_version=${READLINE_VER%%_*} + + # Force linking with system curses ... the bundled termcap lib + # sucks bad compared to ncurses. For the most part, ncurses + # is here because readline needs it. But bash itself calls + # ncurses in one or two small places :(. + + if is_release ; then + # Use system readline only with released versions. + myconf+=( --with-installed-readline=. ) + fi + + if use plugins; then + append-ldflags -Wl,-rpath,/usr/$(get_libdir)/bash + else + # Disable the plugins logic by hand since bash doesn't + # provide a way of doing it. + export ac_cv_func_dl{close,open,sym}=no \ + ac_cv_lib_dl_dlopen=no ac_cv_header_dlfcn_h=no + sed -i \ + -e '/LOCAL_LDFLAGS=/s:-rdynamic::' \ + configure || die + fi + tc-export AR #444070 + econf "${myconf[@]}" +} + +src_compile() { + emake + + if use plugins ; then + emake -C examples/loadables all others + fi +} + +src_install() { + local d f + + default + + dodir /bin + mv "${ED%/}"/usr/bin/bash "${ED%/}"/bin/ || die + dosym bash /bin/rbash + + insinto /etc/bash + doins "${FILESDIR}"/bash_logout + doins "$(prefixify_ro "${FILESDIR}"/bashrc)" + keepdir /etc/bash/bashrc.d + insinto /etc/skel + for f in bash{_logout,_profile,rc} ; do + newins "${FILESDIR}"/dot-${f} .${f} + done + + local sed_args=( + -e "s:#${USERLAND}#@::" + -e '/#@/d' + ) + if ! use readline ; then + sed_args+=( #432338 + -e '/^shopt -s histappend/s:^:#:' + -e 's:use_color=true:use_color=false:' + ) + fi + sed -i \ + "${sed_args[@]}" \ + "${ED%/}"/etc/skel/.bashrc \ + "${ED%/}"/etc/bash/bashrc || die + + if use plugins ; then + exeinto /usr/$(get_libdir)/bash + doexe $(echo examples/loadables/*.o | sed 's:\.o::g') + insinto /usr/include/bash-plugins + doins *.h builtins/*.h include/*.h lib/{glob/glob.h,tilde/tilde.h} + fi + + if use examples ; then + for d in examples/{functions,misc,scripts,startup-files} ; do + exeinto /usr/share/doc/${PF}/${d} + insinto /usr/share/doc/${PF}/${d} + for f in ${d}/* ; do + if [[ ${f##*/} != PERMISSION ]] && [[ ${f##*/} != *README ]] ; then + doexe ${f} + else + doins ${f} + fi + done + done + fi + + doman doc/*.1 + newdoc CWRU/changelog ChangeLog + dosym bash.info /usr/share/info/bashref.info +} + +pkg_preinst() { + if [[ -e ${EROOT}/etc/bashrc ]] && [[ ! -d ${EROOT}/etc/bash ]] ; then + mkdir -p "${EROOT}"/etc/bash + mv -f "${EROOT}"/etc/bashrc "${EROOT}"/etc/bash/ + fi + + if [[ -L ${EROOT}/bin/sh ]] ; then + # rewrite the symlink to ensure that its mtime changes. having /bin/sh + # missing even temporarily causes a fatal error with paludis. + local target=$(readlink "${EROOT}"/bin/sh) + local tmp=$(emktemp "${EROOT}"/bin) + ln -sf "${target}" "${tmp}" + mv -f "${tmp}" "${EROOT}"/bin/sh + fi +} + +pkg_postinst() { + # If /bin/sh does not exist, provide it + if [[ ! -e ${EROOT}/bin/sh ]] ; then + ln -sf bash "${EROOT}"/bin/sh + fi +} diff --git a/app-shells/bash/bash-5.0_p2.ebuild b/app-shells/bash/bash-5.0_p3.ebuild index 7572f931eab2..0e14a04dc16d 100644 --- a/app-shells/bash/bash-5.0_p2.ebuild +++ b/app-shells/bash/bash-5.0_p3.ebuild @@ -63,6 +63,14 @@ RDEPEND=" S="${WORKDIR}/${MY_P}" +PATCHES=( + # Patches from Chet sent to bashbug ml + "${FILESDIR}"/${PN}-5.0-history-zero-length.patch + "${FILESDIR}"/${PN}-5.0-history-append.patch + "${FILESDIR}"/${PN}-5.0-optimize-connection-fork.patch + "${FILESDIR}"/${PN}-5.0-syslog-history-extern.patch +) + pkg_setup() { if is-flag -malign-double ; then #7332 eerror "Detected bad CFLAGS '-malign-double'. Do not use this" @@ -97,6 +105,7 @@ src_prepare() { sed -i -r '/^(HS|RL)USER/s:=.*:=:' doc/Makefile.in || die touch -r . doc/* + eapply -p0 "${PATCHES[@]}" eapply_user } diff --git a/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch b/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch new file mode 100644 index 000000000000..84b7fbc8b2a7 --- /dev/null +++ b/app-shells/bash/files/bash-5.0-assignment-preceding-builtin.patch @@ -0,0 +1,83 @@ +*** ../bash-5.0-patched/variables.c 2018-12-18 11:07:21.000000000 -0500 +--- variables.c 2019-03-20 10:30:56.000000000 -0400 +*************** +*** 4473,4476 **** +--- 4473,4489 ---- + var = (SHELL_VAR *)data; + ++ #if 1 /* TAG:bash-5.1 */ ++ /* Just like do_assignment_internal(). This makes assignments preceding ++ special builtins act like standalone assignment statements when in ++ posix mode, satisfying the posix requirement that this affect the ++ "current execution environment." */ ++ v = bind_variable (var->name, value_cell (var), ASS_FORCE|ASS_NOLONGJMP); ++ ++ /* If this modifies an existing local variable, v->context will be non-zero. ++ If it comes back with v->context == 0, we bound at the global context. ++ Set binding_table appropriately. It doesn't matter whether it's correct ++ if the variable is local, only that it's not global_variables->table */ ++ binding_table = v->context ? shell_variables->table : global_variables->table; ++ #else + binding_table = global_variables->table; + if (binding_table == 0) +*************** +*** 4478,4486 **** + + v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, ASS_FORCE|ASS_NOLONGJMP); + + /* global variables are no longer temporary and don't need propagating. */ +! var->attributes &= ~(att_tempvar|att_propagate); + if (v) +! v->attributes |= var->attributes; + + if (find_special_var (var->name) >= 0) +--- 4491,4508 ---- + + v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, ASS_FORCE|ASS_NOLONGJMP); ++ #endif + + /* global variables are no longer temporary and don't need propagating. */ +! if (binding_table == global_variables->table) +! var->attributes &= ~(att_tempvar|att_propagate); +! + if (v) +! { +! v->attributes |= var->attributes; +! v->attributes &= ~att_tempvar; /* not a temp var now */ +! #if 0 /* TAG:bash-5.1 code doesn't need this, disable for bash-5.1 */ +! v->context = (binding_table == global_variables->table) ? 0 : shell_variables->scope; +! #endif +! } + + if (find_special_var (var->name) >= 0) +*************** +*** 4576,4587 **** + { + int i; + + tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1); + tempvar_list[tvlist_ind = 0] = 0; +! +! hash_flush (temporary_env, pushf); +! hash_dispose (temporary_env); + temporary_env = (HASH_TABLE *)NULL; + + tempvar_list[tvlist_ind] = 0; + +--- 4598,4612 ---- + { + int i; ++ HASH_TABLE *disposer; + + tempvar_list = strvec_create (HASH_ENTRIES (temporary_env) + 1); + tempvar_list[tvlist_ind = 0] = 0; +! +! disposer = temporary_env; + temporary_env = (HASH_TABLE *)NULL; + ++ hash_flush (disposer, pushf); ++ hash_dispose (disposer); ++ + tempvar_list[tvlist_ind] = 0; + + |