Subject: pkg/34670: pkg_add failed on Linux/ppc box
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <hrs-t@t.email.ne.jp>
List: pkgsrc-bugs
Date: 09/30/2006 11:50:00
>Number:         34670
>Category:       pkg
>Synopsis:       pkg_add failed on Linux/ppc box
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 30 11:50:00 +0000 2006
>Originator:     Hiroshi TOMIE
>Release:        non NetBSD box (pkgsrc-current)
>Organization:
Japan
>Environment:
Linux SOYOKAZE 2.4.17_kuro-box #4 2004/4/16 Fri. 11:45:05 JST ppc unknown
>Description:
I'm using bootstrap-pkgsrc-kit on Linux/ppc box.
and pkg_add failed with message below.

---------- begin message ----------

pkg_add: Warning: package `/mnt/pkgsrc/packages/All/./grep-2.5.1nb4.tgz' was built for a different version of the OS:
pkg_add: Linux/powerpc 2.4.17_kuro-box (pkg) vs. Linux/ppc 2.4.17_kuro-box (this host)
pkg_add: aborting.
pkg_add: 1 package addition failed

---------- end message ----------
>How-To-Repeat:

>Fix:
--- bootstrap.orig      Sat Sep 30 13:33:35 2006
+++ bootstrap   Sat Sep 30 13:35:19 2006
@@ -409,7 +409,7 @@
        need_awk=no
        need_sed=no
        set_opsys=no
-       machine_arch=`uname -m | sed -e 's/i.86/i386/'`
+       machine_arch=`uname -m | sed -e 's/i.86/i386/' -e 's/ppc/powerpc/'`
        ;;
 NetBSD)
        root_group=wheel