Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 444740 - gnome2.eclass - x11-wm/metacity-2.34.13 - QA Notice: ^declare: command not found
Summary: gnome2.eclass - x11-wm/metacity-2.34.13 - QA Notice: ^declare: command not found
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal QA (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://sources.gentoo.org/cgi-bin/vie...
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks:
 
Reported: 2012-11-25 21:46 UTC by iGentoo
Modified: 2013-08-22 08:50 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
metacity-2.34.13-build.log (metacity-2.34.13-build.log,168.58 KB, text/plain)
2012-11-25 21:46 UTC, iGentoo
Details
/var/tmp/portage/x11-wm/metacity-2.34.13/temp/environment (environment,114.51 KB, text/plain)
2012-11-25 21:47 UTC, iGentoo
Details
gnome2.eclass.diff (gnome2.eclass.diff,430 bytes, patch)
2012-11-25 21:48 UTC, iGentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description iGentoo 2012-11-25 21:46:39 UTC
Created attachment 330576 [details]
metacity-2.34.13-build.log

build.log:
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/var/tmp/portage/x11-wm/metacity-2.34.13/work/metacity-2.34.13'
make[1]: Leaving directory `/var/tmp/portage/x11-wm/metacity-2.34.13/work/metacity-2.34.13'
/var/tmp/portage/x11-wm/metacity-2.34.13/temp/environment: line 2356: ^declare: command not found
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
 * Removing unnecessary /usr/lib64/libmetacity-private.la (no static archive)
>>> Completed installing metacity-2.34.13 into /var/tmp/portage/x11-wm/metacity-2.34.13/image/

 * QA Notice: command not found:
 * 
 * 	/var/tmp/portage/x11-wm/metacity-2.34.13/temp/environment: line 2356: ^declare: command not found


/var/tmp/portage/x11-wm/metacity-2.34.13/temp/environment:
...
2330 gnome2_src_install ()
2331 {
...
2349         if ! declare -p DOCS > /dev/null 2>&1; then
2350             local d;
2351             for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG;
2352             do
2353                 [[ -s "${d}" ]] && dodoc "${d}";
2354             done;
2355         else
2356             if declare -p DOCS | grep -q `^declare -a`; then
2357                 dodoc "${DOCS[@]}";
2358             else
2359                 dodoc ${DOCS};
2360             fi;
2361         fi;
...
2390 }
...


emerge --info metacity
Portage 2.2.0_alpha142 (hardened/linux/amd64/selinux, gcc-4.7.2, glibc-2.16.0, 3.6.7-pax-lto x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.6.7-pax-lto-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-gentoo-2.2
Timestamp of tree: Sun, 25 Nov 2012 20:15:01 +0000
ld GNU gold (GNU Binutils 2.23.1) 1.11
ccache version 3.1.8 [disabled]
app-shells/bash:          4.2_p39
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1, 3.3.0
dev-util/ccache:          3.1.8
dev-util/cmake:           2.8.10.1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.5
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo systemd hardened-dev gnome custom
Installed sets: @local-protected
ACCEPT_KEYWORDS="amd64 x86 ~amd64 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /var/bind"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
DISTDIR="/usr/local/portage/distfiles"
FCFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs buildpkg collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox selinux sesandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg xattr"
FFLAGS="-Wall -Wextra -march=native -pipe -O3 -fno-tree-vectorize -frecord-gcc-switches"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--icf=safe"
LINGUAS="en en_US zh zh_CN"
MAKEOPTS="V=1 -j10"
PKGDIR="/usr/local/portage/packages-amd64"
PORTAGE_BZIP2_COMMAND="lbzip2"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9ef"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--ipv4"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/systemd /var/lib/layman/hardened-development /var/lib/layman/gnome /usr/local/portage"
SYNC="rsync://mirrors.ustc.edu.cn/gentoo-portage"
USE="X acl alsa amd64 audit bash-completion berkdb bzip2 c++0x cairo caps cli cracklib crypt custom-cflags cxx dbus dri ffmpeg gdbm gmp gnome gpm gtk gtk3 hardened iconv icu ipv6 jit jpeg jpeg2k justify lzma mmx modules mudflap multilib ncurses nls nptl open_perms opengl openmp orc pam pax_kernel pcre png pppd pulseaudio qt4 readline selinux session sse sse2 ssl svg systemd tcpd threads tiff udev unicode urandom vim-syntax xattr xinetd zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="bootchart btrfs caps dmsquash-live gensplash livenet lvm nfs ssh-client syslog systemd" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US zh zh_CN" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

x11-wm/metacity-2.34.13 was built with the following:
USE="-test -xinerama"
Comment 1 iGentoo 2012-11-25 21:47:53 UTC
Created attachment 330578 [details]
/var/tmp/portage/x11-wm/metacity-2.34.13/temp/environment
Comment 2 iGentoo 2012-11-25 21:48:45 UTC
Created attachment 330580 [details, diff]
gnome2.eclass.diff
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-11-26 15:47:54 UTC
I suspect this typo was caused by the strange font in pms.pdf that made ' look like a bit like `. Fixed, thanks for reporting.

>  26 Nov 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gnome2.eclass:
>  Typo, probably caused by strange font in pms.pdf (bug #444740, thanks to
>  Alphat-PC).
Comment 4 Arfrever Frehtes Taifersar Arahesis 2012-11-27 00:00:22 UTC
(In reply to comment #3)

If DOCS is an exported array, then current code (revision 1.113 of gnome2.eclass) will not detect DOCS as an array:

$ unset DOCS
$ DOCS=(a b c)
$ declare -p DOCS
declare -a DOCS='([0]="a" [1]="b" [2]="c")'
$ declare -p DOCS | grep -q '^declare -a ' ; echo $?
0
$ unset DOCS
$ export DOCS=(a b c)
$ declare -p DOCS
declare -ax DOCS='([0]="a" [1]="b" [2]="c")'
$ declare -p DOCS | grep -q '^declare -a ' ; echo $?
1
$
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-11-27 00:48:10 UTC
(In reply to comment #4)

Good catch! Fixed now.

>  27 Nov 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gnome2.eclass:
>  Handle DOCS when it is an exported array, i.e. "declare -ax" (bug #444740,
>  thanks to Arfrever).
Comment 6 Ulrich Müller gentoo-dev 2012-11-28 08:51:44 UTC
(In reply to comment #5)
> >  27 Nov 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gnome2.eclass:
> >  Handle DOCS when it is an exported array, i.e. "declare -ax" (bug #444740,
> >  thanks to Arfrever).

This makes the behaviour different from the EAPI 4 default. Is this intentional?
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-11-28 14:21:39 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > >  27 Nov 2012; Alexandre Rostovtsev <tetromino@gentoo.org> gnome2.eclass:
> > >  Handle DOCS when it is an exported array, i.e. "declare -ax" (bug #444740,
> > >  thanks to Arfrever).
> 
> This makes the behaviour different from the EAPI 4 default. Is this
> intentional?

This behavior matches base.eclass (and everything that inherits from it). I believe that pms contains an unintentional mistake here: it makes absolutely no sense to allow DOCS as an exported scalar, but not as an exported array.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-08-22 08:50:18 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4)
> (In reply to comment #3)
> 
> If DOCS is an exported array, then current code (revision 1.113 of
> gnome2.eclass) will not detect DOCS as an array:

And why would array be *ever* exported? This isn't something that works at all.