NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-arm/48215: pkg_add fails on recent NetBSD/evbearmv6hf-el current



The following reply was made to PR port-arm/48215; it has been noted by GNATS.

From: Nick Hudson <skrll%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>, 
port-arm-maintainer%netbsd.org@localhost, 
 gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost, 
ryoon%NetBSD.org@localhost
Subject: Re: port-arm/48215: pkg_add fails on recent NetBSD/evbearmv6hf-el
 current
Date: Mon, 16 Sep 2013 09:09:23 +0100

 This is a multi-part message in MIME format.
 --------------040706010803020104010603
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 On 09/16/13 06:55, Ryo ONODERA wrote:
 > The following reply was made to PR port-arm/48215; it has been noted by 
 > GNATS.
 >
 > From: Ryo ONODERA <ryo_on%yk.rim.or.jp@localhost>
 > To: gnats-bugs%netbsd.org@localhost
 > Cc:
 > Subject: Re: port-arm/48215: pkg_add fails on recent NetBSD/evbearmv6hf-el
 >   current
 > Date: Mon, 16 Sep 2013 14:53:43 +0900 (JST)
 >
 >   Hi,
 >   
 >   From: Matt Thomas <matt%3am-software.com@localhost>, Date: Sun, 15 Sep 
 > 2013 22:45:41 -0700
 >   
 >   > That seems to be a pkg tools program, not an arm problem.
 >   
 >   Thank you.
 >   I will investigate pkg_install deeper.
 
 Something like the attached diff should fix this. I didn't even compile 
 test it, though.
 
 Nick
 
 --------------040706010803020104010603
 Content-Type: text/plain; charset=us-ascii;
  name="diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="diff"
 
 Index: pkgtools/pkg_install/files/add/perform.c
 ===================================================================
 RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/add/perform.c,v
 retrieving revision 1.105
 diff -u -p -u -r1.105 perform.c
 --- pkgtools/pkg_install/files/add/perform.c   2 Sep 2013 10:28:44 -0000       
1.105
 +++ pkgtools/pkg_install/files/add/perform.c   16 Sep 2013 08:05:25 -0000
 @@ -908,8 +908,17 @@ check_platform(struct pkg_task *pkg)
  
        if (OverrideMachine != NULL)
                effective_arch = OverrideMachine;
 -      else
 -              effective_arch = MACHINE_ARCH;
 +      else {
 +              static char machine_arch_buf[sizeof(utsname.machine)];
 +              const int mib[2] = { CTL_HW, HW_MACHINE_ARCH };
 +              size_t len = sizeof(machine_arch_buf);
 +
 +              if (sysctl(mib, __arraycount(mib), machine_arch_buf,
 +                  &len, NULL, 0) == 0)
 +                      effective_arch = machine_arch_buf;
 +              else
 +                      effective_arch = MACHINE_ARCH;
 +      }
  
        /* If either the OS or arch are different, bomb */
        if (strcmp(OPSYS_NAME, pkg->buildinfo[BI_OPSYS]) ||
 
 --------------040706010803020104010603--
 


Home | Main Index | Thread Index | Old Index