Change to pkg_add - get other architecture

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

Change to pkg_add - get other architecture

Postby mix_room » 14 Apr 2010, 16:53

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.


[CMD=""]-A i386[/CMD][CMD=""]--architecture i386[/CMD]
Attachments

[The extension diff has been deactivated and can no longer be displayed.]

mix_room
Member
 
Posts: 561
Joined: 07 Aug 2009, 16:31

Postby trasz@ » 14 Apr 2010, 21:25

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.
trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland

Postby mix_room » 15 Apr 2010, 12:13

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?
mix_room
Member
 
Posts: 561
Joined: 07 Aug 2009, 16:31

Postby trasz@ » 16 Apr 2010, 09:34

Package tools are not my field, I'm afraid. I think you should do that.
trasz@
Member
 
Posts: 182
Joined: 20 Feb 2008, 22:44
Location: Warszawa, Poland


Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests