My distfiles are situated on a path where the chars "tar" is part, e.g. "ryttargarden/distfiles". The unipatch functions uses a grep statement: if [ -n "$(echo ${i} | grep -e ".tar" -e ".tbz" -e ".tgz")" ] This will not work with a path as the above stated when unpacking a patch like "gentoo-sources-2.4.22-r5.patch.bz2" which isn't a tar archive. The grep should have been something like this: if [ -n "$(echo ${i} | grep -e "\.tar" -e "\.tbz" -e "\.tgz")" ] Escapeing the dot (.) is essential! /Andreas Reproducible: Always Steps to Reproduce: 1. Place your distfiles directory on a path where the chars "tar" is included and point it out to portage. 2. ebuild <some kernel ebuild with a patch that is not a tar archive> unpack Actual Results: tar: This does not look like a tar archive tar: Skipping to next header tar: Archive contains obsolescent base-64 headers tar: Error exit delayed from previous errors Failed to unpack /usr/portage/portage.ryttargarden/distfiles/gentoo-sources-2.4.22-r5.patch.bz2 <snip> !!! Function unipatch, Line 253, Exitcode 0 Expected Results: Clean unpack of the kernel source of choice Portage 2.0.50_pre16 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.4.22-gentoo-r4) ================================================================= System uname: 2.4.22-gentoo-r4 i686 AMD Athlon(tm) XP 2200+ Gentoo Base System version 1.4.3.12 distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59 Automake: sys-devel/automake-1.7.8 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/portage.ryttargarden/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo http://gentoo.linux.no/ http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/portage.ryttargarden/packages/arch/athlon-xp" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://portage.ryttargarden/gentoo-portage" USE="3dnow X alsa apm arts avi berkdb cdr crypt cups dvd emacs encode esd evms2 foomaticdb gdbm gif gphoto2 gpm gtk2 imlib java jikes joystick jpeg kde libg++ libwww mad maildir mikmod mmx motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pda pdflib perl png python qt quicktime readline scanner sdl slang spell sse ssl svga tcltk tcpd tiff truetype usb x86 xml2 xmms xv zlib"
Created attachment 23939 [details, diff] Patch to fix the grep in unipatch function
thanks for pointing this out, a small oversight on my part :) fixed in portage
now in portage