Almost finished with this, just wanted to give an update. I named this script 
portest, I still need to add a few more things and do some bug testing but so 
far it seems to work pretty well. This is the usage page for the script.
Usage: portest [-f bulkfile] [-apPrRtv] patchfile
Options:    -a     --  Do everything except revert (-ptf build.ports.txt)    -f 
    --  Generate a poudiere usable bulk file    -p     --  Patch and give 
output    -P     --  Do not exit on failed patch    -r     --  Revert the files 
listed in patchfile    -R     --  Paranoid revert, will remove and restore 
anything and               everything the patchfile may have changed or added   
 -t     --  Test with portlint    -v     --  Show version of portest
By default, (no options) portest shows the ports that will be modified

 Decided to add the -a option to do the task you asked for specifically. So far 
every option works on the patch you supplied and several others I had laying 
around. One thing that it will not detect is if slave port will be affected by 
the change, also changes to Uses or any other non CAT/PORT directory will not 
be detected. I'm still trying to figure out how to solve these problem. Are 
they important? or not so much?
 Right now on my todo is to add a config file to change the default settings, 
Add a -T option that will do port test or poudrieretesting depending on what 
was selected in the config file. Also later on choose between svn, git or 
portsnap. Once i'm finished adding the config file ill post it for some testing 
and if you can give me some feedback on what else you need or don't like.
Ultima
Date: Mon, 9 Nov 2015 13:55:38 -0800
Subject: Re: Call for Help: need script for patching ports tree, building with 
poudriere
From: rodr...@freebsd.org
To: ricky1...@hotmail.com
CC: freebsd-test...@freebsd.org; freebsd-ports@freebsd.org

On Sun, Nov 8, 2015 at 6:18 PM, Ricky G <ricky1...@hotmail.com> wrote:



Hello, 
 Started working on a simple sh script to do as requested. So far have 1,2,4,5 
complete. There is much error checking to be added still though. Wanted to ask 
a few things first.
2- Does port tree checkout matter? Right now my script assumes svnlite 
generated the patch at the root of the tree5- Does duplicates matter? poudriere 
doesn't care but is this strictly for poudriere?6- How should the output be 
handled?

The script should not worry about the port tree checkout so much,
since that will probably be done outside the script.  For now, if the script
assumes that the port checkout is an SVN tree, and you can run SVN operations 
on it, that should be sufficient.

For duplicates, I don't think it matters so much.  I believe poudriere is smart 
enough so that if you pass it a list of ports with duplicate entries,
it does the right thing.

At this point, the output format is not so important.  For now,
making sure that error status is propagated as a return value from
the script (0 on success, non-zero on failure) is a good start.

The only other suggestion that I have is that when you work on the
script, make sure that you put a proper license in it (BSD license preferred).

Thanks.

--
Craig
                                          
_______________________________________________
freebsd-ports@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to