ac22 Change to pkg_add - get other architecture - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Development > FreeBSD Development

FreeBSD Development Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

Reply
 
Thread Tools Display Modes
  #1  
Old April 14th, 2010, 17:53
mix_room mix_room is offline
Member
 
Join Date: Aug 2009
Posts: 497
Thanks: 9
Thanked 39 Times in 36 Posts
Default Change to pkg_add - get other architecture

I was compiling an embedded image using nanobsd when I realised that I was adding packages for the wrong architecture. My development machine was running amd64, but the target requires i386. Cross-compiling to i386 seems to work, but a problem remained with packages. I was using pkg_add to fetch the latest packages, and didn't want to add them manually.

I patched /usr/src/usr.sbin/pkg_install/add/main.c to solve my problem. I added a '-A' or '--architecture' argument which lets pkg_add fetch other architectures.

I would like to submit my patch to the community in case any one else has similar needs. I realise that I probably don't fulfill the style requirements, and I guess my patch file may be fully standard conforming, but hope that my, albeit small, contribution may be accepted.


-A i386 --architecture i386
Attached Files
File Type: diff patch.diff (3.1 KB, 15 views)
Reply With Quote
  #2  
Old April 14th, 2010, 22:25
trasz@ trasz@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Location: Warszawa, Poland
Posts: 178
Thanks: 7
Thanked 37 Times in 29 Posts
Default

Thanks! Note, however, that the suggested way of submitting patches is via the PR system (http://www.freebsd.org/send-pr.html) and posting it to mailing lists. Many (most) developers don't track the FreeBSD Forums yet.
Reply With Quote
  #3  
Old April 15th, 2010, 13:13
mix_room mix_room is offline
Member
 
Join Date: Aug 2009
Posts: 497
Thanks: 9
Thanked 39 Times in 36 Posts
Default

Thanks for the tip. Do I still need to do this, or have you already pushed it upstream?

Which mailing-list is the correct one to post it to, or is this done automatically when a PR is submitted?
Reply With Quote
  #4  
Old April 16th, 2010, 10:34
trasz@ trasz@ is offline
FreeBSD Developer
 
Join Date: Feb 2008
Location: Warszawa, Poland
Posts: 178
Thanks: 7
Thanked 37 Times in 29 Posts
Default

Package tools are not my field, I'm afraid. I think you should do that.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Website architecture gpatrick Networking 1 January 21st, 2010 00:53
Changing architecture? Dinchamion Installing & Upgrading 5 July 2nd, 2009 21:32
change pkg_add -r to look in packages-7-stable? mobiusnz Installation and Maintenance of FreeBSD Ports or Packages 3 June 5th, 2009 09:29
Architecture of Linux (FC8) in FreeBSD on amd64 rocky Installation and Maintenance of FreeBSD Ports or Packages 1 May 15th, 2009 12:31
smart network architecture for SOHO? m4rtin Networking 11 March 11th, 2009 22:22


All times are GMT +1. The time now is 07:51.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0