dev-java/junit-4.12 fail during install phase due to missing jar file Reproducible: Always Steps to Reproduce: 1. FEATURES="-fail-clean" emerge -O1 -j1 junit 2. 3. Actual Results: BUILD SUCCESSFUL Total time: 3 seconds >>> Source compiled. >>> Test phase [not enabled]: dev-java/junit-4.12 >>> Install junit-4.12 into /var/tmp/portage/dev-java/junit-4.12/image/ category dev-java * ERROR: dev-java/junit-4.12::gentoo failed (install phase): * target/junit-4.12.jar does not exist or is not a file! Portage 2.2.20 (python 3.4.3-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-5.1.0, glibc-2.21, 4.1.2-gentoo-costel x86_64) ================================================================= System uname: Linux-4.1.2-gentoo-costel-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-2.2 KiB Mem: 8171324 total, 4053808 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Sun, 12 Jul 2015 03:45:01 +0000 sh bash 4.3_p39 ld GNU ld (Gentoo 2.25 p1.2) 2.25 app-shells/bash: 4.3_p39::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.22.0::gentoo dev-lang/python: 2.7.10::gentoo, 3.4.3::gentoo dev-util/cmake: 3.2.3::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/openrc: 0.17::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25-r1::gentoo sys-devel/gcc: 4.9.3::gentoo, 5.1.0::gentoo sys-devel/gcc-config: 1.8::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.21::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://ftp.romnet.org/gentoo-portage priority: -1000 added location: /usr/portage/local/added masters: gentoo newer location: /usr/portage/local/newer masters: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native -w -fuse-linker-plugin -flto=6 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=native -w -fuse-linker-plugin -flto=6 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block" DISTDIR="/mnt/linux/distfiles" EMERGE_DEFAULT_OPTS="--jobs=3 --load-average=15 --keep-going --with-bdeps=y --complete-graph --quiet-build=n --autounmask-write" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs candy cgroup collision-protect config-protect-if-modified distlocks fail-clean fixlafiles ipc-sandbox merge-sync news nodoc noinfo parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms strict unknown-features-filter unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://mirrors.xservers.ro/gentoo/ http://ftp.roedu.net/pub/mirrors/gentoo.org/ http://ftp.romnet.org/gentoo/ ftp://ftp.romnet.org/gentoo/ http://distfiles.gentoo.org/" LANG="ro_RO.UTF-8" LC_ALL="ro_RO.UTF-8" LDFLAGS="-Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now -O2 -pipe -march=native -w -fuse-linker-plugin -flto=6 -fipa-icf -fuse-ld=gold -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block" MAKEOPTS="-j8 --load-average=20" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="--human-readable --delete-before --progress" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac gdbm gif glamor gmp gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret logrotate lua mad mmx mmxext mng modules mp3 mp4 mpeg multilib mysql nautilus ncurses networkmanager nls nptl ogg opengl openmp pam pango pch pcre pdf png policykit popcnt ppds pulseaudio python qt3support readline sdl server session spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg systemd tcpd threads tiff tracker truetype udev udisks unicode upower usb vdpau vhosts vorbis wxwidgets x264 xcb xml xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" 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 ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ro en" NETBEANS_MODULES="apisupport extide php webcommon" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fancyindex fastcgi geo gzip headers index limit_conn limit_req log map memcached naxsi redis referer rewrite scgi spdy ssi upstream_ip_hash userid uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="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" USE_PYTHON="2.7 3.4" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS java-config -L The following VMs are available for generation-2: *) IcedTea JDK 7.2.5.5 [icedtea-bin-7]
The problem stems from this line: Index: files/junit-4.12-build.xml =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-java/junit/files/junit-4.12-build.xml,v retrieving revision 1.2 diff -u -B -r1.2 junit-4.12-build.xml --- files/junit-4.12-build.xml 11 Jul 2015 13:21:27 -0000 1.2 +++ files/junit-4.12-build.xml 12 Jul 2015 12:09:28 -0000 @@ -229,7 +229,7 @@ <!-- Package target --> <!-- ====================================================================== --> - <target name="package" depends="compile,test" description="Package the application"> + <target name="package" depends="compile" description="Package the application"> <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar" compress="true" index="false" I introduced this bug myself because I always compile packages with tests on. My bad. I've fixed the ebuild file too: Index: junit-4.12.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-java/junit/junit-4.12.ebuild,v retrieving revision 1.1 diff -u -B -r1.1 junit-4.12.ebuild --- junit-4.12.ebuild 10 Jul 2015 12:48:21 -0000 1.1 +++ junit-4.12.ebuild 12 Jul 2015 12:09:28 -0000 @@ -40,20 +40,20 @@ java-pkg_jar-from --into lib hamcrest-core-1.3 hamcrest-core.jar } -EANT_BUILD_TARGET="compile" +EANT_BUILD_TARGET="package" src_compile() { java-pkg-2_src_compile } -EANT_TEST_TARGET="package" +EANT_TEST_TARGET="test" src_test() { java-pkg-2_src_test } src_install() { - java-pkg_newjar target/${P}.jar + java-pkg_newjar target/${P}.jar junit.jar dodoc doc/ReleaseNotes${PV}.m Now, if we try again: $ ebuild junit-4.12.ebuild clean manifest configure install Appending /home/monsieurp/gentoo-x86 to PORTDIR_OVERLAY... >>> Creating Manifest for /home/monsieurp/gentoo-x86/dev-java/junit * r4.12.zip SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking auxfile checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] * Using: oracle-jdk-bin-1.8 [...] package: [jar] Building jar: /var/tmp/portage/dev-java/junit-4.12/work/junit-r4.12/target/junit-4.12.jar BUILD SUCCESSFUL Total time: 5 seconds >>> Source compiled. >>> Test phase [not enabled]: dev-java/junit-4.12 >>> Install junit-4.12 into /var/tmp/portage/dev-java/junit-4.12/image/ category dev-java >>> Completed installing junit-4.12 into /var/tmp/portage/dev-java/junit-4.12/image/ $ tree /var/tmp/portage/dev-java/junit-4.12/image/ /var/tmp/portage/dev-java/junit-4.12/image/ └── usr └── share ├── doc │ └── junit-4.12 │ └── ReleaseNotes4.12.md.bz2 └── junit-4 ├── lib │ └── junit.jar └── package.env 6 directories, 3 files + 12 Jul 2015; Patrice Clement <monsieurp@gentoo.org> + files/junit-4.12-build.xml, junit-4.12.ebuild: + Remove 'test' target dependency from 'package' target so that jar file gets + created even with tests off. Fix bug 554584. + It should work smoothly now. Thanks for the heads up.