[PC-BSD Dev] pcbsd system source idea and question
jpm820 at gmail.com
Sat Dec 14 09:56:29 PST 2013
Ok since this is going to take me a while here is what I have so far.
When I first started this I ran into the limitation with git that it can’t clone into a dir like /usr/ports/ which has an existing dir like /usr/ports/distfiles. Which also is a dataset. Otherwise this would have been easy by just using your example for fetchsource() and renaming the buttons in portsnapprogress.ui.
The only way to fix this in git was to change some things in the global configuration for git so I didn’t think that would be a good idea. I didn’t think running git clone to a temp dir and moving it was a really clean way of doing it either. So I started with the idea that I would init a fresh repo in /usr/ports. Then add the pcbsd ports tree as an upstream repo. Then fetch the ports and merge them. This way if /usr/ports/.git/config existed with an upstream repo I could just fetch and merge only the updates and not have to re-clone the entire thing. I think this could work for fetchsource() also if you wanted to only grab the updates quickly each time.
What I’m missing is the code to check /usr/ports/.git/config to check to see if the upstream repo has been added, add it, otherwise continue on to fetch ports. Then continue on to fetchports() mergeports(). Also I’ve ripped out some of the functions the fetch done stuff at the end of the script while I was testing.
Although I’ve learned a few things so far I’m by no means an expert in qt. So I figured I would pass along what I’ve been able to figure out so far. I see that some similar things already with pcdm as far as parsing config files with qt so I suspect someone will know how to finish this. I just wasn’t sure how to implement that type of function for what I was trying to do here. I will continue researching it but if someone is able to finish this before I do or do it another way I will just learn from the examples.
On Dec 13, 2013, at 8:06 AM, Joe Maloney <jpm820 at gmail.com> wrote:
> I almost finished this up last night. I should have something in another day or so.
> Joe Maloney
> On Tue, 2013-12-10 at 17:16 -0500, Kris Moore wrote:
>> On 12/08/2013 17:20, Joe Maloney wrote:
>> > I was playing around with porthshaker to fetch and merge the latest
>> > virtualbox development ports. I thought of something as I told it to
>> > grab the freebsd-ports fork from pcbsd rather than the freebsd ports
>> > tree. I've noticed that in system manager the source fetching tool is
>> > now using git. Does it now grab the source from pcbsd's github?
>> > I was just thinking how cool it would be if it did grab the source from
>> > github for whatever running kernel and world revision the user is
>> > updated to. Likewise if the fetch ports feature would fetch the
>> > modified ports from pcbsd rather than the ports tree from pcbsd. Maybe
>> > they could be renamed to "fetch pcbsd system source", and "fetch pcbsd
>> > ports".
>> > I wasn't sure if you might already be heading in the direction. However
>> > I am sure it would solve a lot of problems that I've had in the past
>> > with building things that require the source for the running kernel.
>> > This would also spare the user having to rebuild and reinstall kernel
>> > and world to install something like virtualbox from ports. I'm just
>> > curious is this something that might already be in development or sound
>> > like a good idea?
>> > Joe Maloney
>> Part of it is done. I've already switched it on 10 to download the
>> system sources from our "git" fork, so that if you recompile kernel you
>> get our PEFS merge and such. We just need to switch the ports tree over
>> to do the same and rename the buttons as you suggested. If thats
>> something you want to do, please feel free, otherwise it may be a few
>> days before I can get to it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev