Created attachment 398592 [details] 5010_enable-additional-cpu-optimizations-for-gcc-4.9.err ebuild /gentoo/portage/sys-kernel/gentoo-sources/gentoo-sources-3.19.1.ebuild unpack >>> Existing ${T}/environment for 'gentoo-sources-3.19.1' will be sourced. >>> Run 'clean' to start with a fresh environment. >>> Not marked as unpacked; recreating WORKDIR... * linux-3.19.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.experimental.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Preparing to unpack ... >>> Unpacking source... >>> Unpacking linux-3.19.tar.xz to /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work >>> Unpacking genpatches-3.19-2.base.tar.xz to /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches >>> Unpacking genpatches-3.19-2.extras.tar.xz to /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches >>> Unpacking genpatches-3.19-2.experimental.tar.xz to /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches * Excluding Patch #BFQ ... [ ok ] * Applying 1000_linux-3.19.1.patch (-p1) ... [ ok ] * Applying 1500_XATTR_USER_PREFIX.patch (-p1) ... [ ok ] * Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ... [ ok ] * Applying 2700_ThinkPad-30-brightness-control-fix.patch (-p1) ... [ ok ] * Applying 2900_dev-root-proc-mount-fix.patch (-p1) ... [ ok ] * Applying 2905_2disk-resume-image-fix.patch (-p1) ... [ ok ] * Applying 4200_fbcondecor-3.19.patch (-p1) ... [ ok ] * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ... [ ok ] * Applying 5000_enable-additional-cpu-optimizations-for-gcc.patch (-p1) ... [ ok ] * Applying 5001_block-cgroups-kconfig-build-bits-for-BFQ-v7r7-3.19.patch (-p1) ... [ ok ] * Applying 5002_block-introduce-the-BFQ-v7r7-I-O-sched-for-3.19.patch1 (-p1) ... [ ok ] * Applying 5003_block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r7-for-3.19.0.patch (-p1) ... [ ok ] * Failed to dry-run patch 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch * Please attach /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/temp/5010_enable-additional-cpu-optimizations-for-gcc-4.9.err to any bug you may post. * ERROR: sys-kernel/gentoo-sources-3.19.1::gentoo failed (unpack phase): * Unable to dry-run patch on any patch depth lower than 5. * * Call stack: * ebuild.sh, line 93: Called src_unpack * environment, line 3598: Called kernel-2_src_unpack * environment, line 1983: Called unipatch ' /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/distdir/genpatches-3.19-2.base.tar.xz /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/distdir/genpatches-3.19-2.extras.tar.xz /gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/distdir/genpatches-3.19-2.experimental.tar.xz ' * environment, line 4271: Called die * The specific snippet of code: * die "Unable to dry-run patch on any patch depth lower than 5."; * * If you need support, post the output of `emerge --info '=sys-kernel/gentoo-sources-3.19.1::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-sources-3.19.1::gentoo'`. * The complete build log is located at '/var/log/portage/sys-kernel:gentoo-sources-3.19.1:20150310-115358.log.gz'. * For convenience, a symlink to the build log is located at '/gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/temp/build.log.gz'. * The ebuild environment file is located at '/gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/temp/environment'. * Working directory: '/gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/linux-3.19.1-gentoo' * S: '/gentoo/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/linux-3.19.1-gentoo'
Created attachment 398594 [details] emerge --info
I can't reproduce this. Can you tell me your 'patch' version?
(In reply to Mike Pagano from comment #2) > I can't reproduce this. Can you tell me your 'patch' version? patch --version GNU patch 2.7.5 Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. Copyright (C) 1988 Larry Wall License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Larry Wall and Paul Eggert
I'm getting two similar patches applied: 5000_enable-additional-cpu-optimizations-for-gcc.patch 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch Is that correct?
Ab(In reply to Erik Zeek from comment #4) > I'm getting two similar patches applied: > 5000_enable-additional-cpu-optimizations-for-gcc.patch > 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch > > Is that correct? Absolutely not. But this points me at the eclass code and that helps. Thanks, I may have further questions this weekend when I address this.
I found the problem! I was setting UNIPATCH_EXCLUDE="BFQ" in /etc/portage/env/sys-kernel/gentoo-sources. The documentation in the eclass states that UNIPATCH_EXCLUDE is for end users, so shouldn't I be able to set that in an env file?
(In reply to Erik Zeek from comment #6) > I found the problem! I was setting UNIPATCH_EXCLUDE="BFQ" in > /etc/portage/env/sys-kernel/gentoo-sources. > > The documentation in the eclass states that UNIPATCH_EXCLUDE is for end > users, so shouldn't I be able to set that in an env file? Well done. That's a bug, I'll check it out.
For some reason, the check of your gcc in the eclass is not working. It should notice that you have gcc 4.9.2 installed and not apply adds an option to the Gentoo menu that enables CGROUPS for cgroup, IPC_NS for ipc-sandbox, and NET_NS for network-sandbox. And since the code has if (exclude one patch) else (exclude another), I'm not sure how this can fail. Do you have the latest eclass? Are you using an old eclass that hasn't been updated. Can you check your eclass for these lines at line: 157 if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z ${K_EXP_GENPATCHES_NOUSE} ]] ; then use_cond_start="experimental? ( " use_cond_end=" )" if use experimental ; then UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}" debug-print "genpatches tarball: $tarball" # check gcc version < 4.9.X uses patch 5000 and = 4.9.X uses patch 5010 if [[ $(gcc-major-version) -eq 4 ]] && [[ $(gcc-minor-version) -ne 9 ]]; then # drop 5000_enable-additional-cpu-optimizations-for-gcc-4.9.patch UNIPATCH_EXCLUDE+=" 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch" else #drop 5000_enable-additional-cpu-optimizations-for-gcc.patch UNIPATCH_EXCLUDE+=" 5000_enable-additional-cpu-optimizations-for-gcc.patch" fi fi else UNIPATCH_LIST_GENPATCHES+=" ${DISTDIR}/${tarball}" debug-print "genpatches tarball: $tarball" fi
(In reply to Mike Pagano from comment #8) > For some reason, the check of your gcc in the eclass is not working. > It should notice that you have gcc 4.9.2 installed and not apply adds an > option to the Gentoo menu that enables CGROUPS for cgroup, IPC_NS for > ipc-sandbox, and NET_NS for network-sandbox. > > And since the code has if (exclude one patch) else (exclude another), I'm > not sure how this can fail. > > Do you have the latest eclass? Are you using an old eclass that hasn't been > updated. > > Can you check your eclass for these lines at line: 157 > > if [[ "${i}" == "experimental" && -z ${K_EXP_GENPATCHES_PULL} && -z I've got those lines starting at line 153 and they work correctly. I've put debug statements in there and the correct values get added to UNIPATCH_EXCLUDE. The problem I'm seeing is that if I set UNIPATCH_EXCLUDE in /etc/portage/env/sys-kernel/gentoo-sources, it gets sourced *between* calling handle_genpatches and src_unpack. (Note: it also get sourced before calling handle_genpatches) This wipes out the work handle_genpatches did adding to UNIPATCH_EXCLUDE.
Can you help me reproduce? gcc version 4.9.2 (Gentoo 4.9.2 p1.1, pie-0.6.2) #cat /etc/portage/package.env sys-kernel/gentoo-sources gentoo-sources cat /etc/portage/env/gentoo-sources UNIPATCH_EXCLUDE="1500_XATTR_USER_PREFIX.patch" #USE=experimental ebuild gentoo-sources-3.19.1.ebuild manifest clean unpack install >>> Creating Manifest for /usr/portage/sys-kernel/gentoo-sources openpty failed: 'out of pty devices' * linux-3.19.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.base.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.extras.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * genpatches-3.19-2.experimental.tar.xz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> Preparing to unpack ... >>> Unpacking source... >>> Unpacking linux-3.19.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work >>> Unpacking genpatches-3.19-2.base.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches >>> Unpacking genpatches-3.19-2.extras.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches >>> Unpacking genpatches-3.19-2.experimental.tar.xz to /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/patches * Excluding Patch #1500_XATTR_USER_PREFIX.patch ... [ ok ] * Excluding Patch #5000_enable-additional-cpu-optimizations-for-gcc.patch ... [ ok ] * Applying 1000_linux-3.19.1.patch (-p1) ... [ ok ] * Applying 1510_fs-enable-link-security-restrictions-by-default.patch (-p1) ... [ ok ] * Applying 2700_ThinkPad-30-brightness-control-fix.patch (-p1) ... [ ok ] * Applying 2900_dev-root-proc-mount-fix.patch (-p1) ... [ ok ] * Applying 2905_2disk-resume-image-fix.patch (-p1) ... [ ok ] * Applying 4200_fbcondecor-3.19.patch (-p1) ... [ ok ] * Applying 4567_distro-Gentoo-Kconfig.patch (-p1) ... [ ok ] * Applying 5001_block-cgroups-kconfig-build-bits-for-BFQ-v7r7-3.19.patch (-p1) ... [ ok ] * Applying 5002_block-introduce-the-BFQ-v7r7-I-O-sched-for-3.19.patch1 (-p1) ... [ ok ] * Applying 5003_block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r7-for-3.19.0.patch (-p1) ... [ ok ] * Applying 5010_enable-additional-cpu-optimizations-for-gcc-4.9.patch (-p1) ... [ ok ] >>> Source unpacked in /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work >>> Checking genpatches-3.19-2.experimental.tar.xz's mtime... >>> Checking linux-3.19.tar.xz's mtime... >>> Checking genpatches-3.19-2.extras.tar.xz's mtime... >>> Checking genpatches-3.19-2.base.tar.xz's mtime... >>> WORKDIR is up-to-date, keeping... * checking ebuild checksums ;-) ... [ ok ] * checking miscfile checksums ;-) ... [ ok ] >>> It appears that 'pretend' has already executed for 'gentoo-sources-3.19.1'; skipping. >>> Remove '/var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/.pretended' to force pretend. >>> It appears that 'setup' has already executed for 'gentoo-sources-3.19.1'; skipping. >>> Remove '/var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/.setuped' to force setup. >>> It appears that 'unpack' has already executed for 'gentoo-sources-3.19.1'; skipping. >>> Remove '/var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/.unpacked' to force unpack. >>> Preparing source in /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/linux-3.19.1-gentoo ... >>> Source prepared. >>> Configuring source in /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/linux-3.19.1-gentoo ... >>> Source configured. >>> Compiling source in /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/work/linux-3.19.1-gentoo ... >>> Source compiled. >>> Test phase [not enabled]: sys-kernel/gentoo-sources-3.19.1 >>> Install gentoo-sources-3.19.1 into /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/image/ category sys-kernel >>> Copying sources ... >>> Completed installing gentoo-sources-3.19.1 into /var/tmp/portage/sys-kernel/gentoo-sources-3.19.1/image/ ecompressdir: bzip2 -9 /usr/share/doc
(In reply to Mike Pagano from comment #10) > Can you help me reproduce? > > gcc version 4.9.2 (Gentoo 4.9.2 p1.1, pie-0.6.2) > > #cat /etc/portage/package.env > sys-kernel/gentoo-sources gentoo-sources > > cat /etc/portage/env/gentoo-sources > UNIPATCH_EXCLUDE="1500_XATTR_USER_PREFIX.patch" > > #USE=experimental ebuild gentoo-sources-3.19.1.ebuild manifest clean unpack > install That works. What doesn't work is if I set UNIPATCH_EXCLUDE in /etc/portage/env/sys-kernel/gentoo-sources: # cat /etc/portage/env/sys-kernel/gentoo-sources UNIPATCH_EXCLUDE="1500_XATTR_USER_PREFIX.patch" With that file, unpacking fails.
Ok, I think I fixed it. I just checked in a change to the eclass. Can you please check after you sync up and get the new eclass. That might take some time through normal emerge.
(In reply to Mike Pagano from comment #12) > Ok, I think I fixed it. I just checked in a change to the eclass. Can you > please check after you sync up and get the new eclass. > > That might take some time through normal emerge. It works for me now. Thanks!
Thanks for making it much easier. Your debugging and working through this made the solve happen much faster.