Portfile Workflow Advice

Bradley Giesbrecht pixilla at macports.org
Tue Jan 15 10:03:12 PST 2013


On Jan 15, 2013, at 9:48 AM, Sean Farley wrote:

> On Mon, Jan 14, 2013 at 2:18 AM, rod <rod at pu-gh.com> wrote:
>> Hi!
>> 
>> I've been finding developing and especially updating Portfiles a bit tricky
>> and error prone, so have been writing some tools for myself to help with
>> this...
>> 
>> https://github.com/rodnaph/pearl
>> https://github.com/rodnaph/ghsum
> 
> Neato.
> 
>> But while submitting the second via Trac it was pointed out you can do this
>> already with Macports...
>> 
>> $> port -d checksum
>> 
>> So I was wondering what tools everyone else uses to create and update their
>> Portfiles?  Are all the utilities provided through the "port" tool and I'm
>> just missing them?  Or are there other utilities (like
>> https://trac.macports.org/browser/users/ryandesign/scripts/portcheckup) that
>> are available to help?
>> 
>> Any links/tips appreciated, and I'd be especially interested if someone
>> could describe their workflow too.
> 
> I'm pretty new here, so take my advice with a grain of salt :-) My
> workflow consists of using mercurial instead of subversion but that is
> personal preference. I see you're on github, so you might have seen
> the macports git repo already but just in case you haven't,
> 
> git://git.macports.org/macports/trunk.git
> 
> and for those that prefer mercurial,
> 
> https://bitbucket.org/seanfarley/macports
> 
> As for common tasks such as changing the checksum, I have gotten by so
> far with using `port -v <command>` to fail at the extraction phase and
> tell me the checksum. Also, I use codesearch (already in macports)
> through emacs with this script,
> 
> https://github.com/abingham/codesearch.el

I do this a lot, adjusting the first grep with "-B" and "-A" flags: (in the example I am searching for where to install the AUTHORS file)
$ echo $MP_SVNDPORTS 
/opt/local/var/macports/sources/svn.macports.org/trunk/dports
$ find $MP_SVNDPORTS -maxdepth 3 -name Portfile -exec echo {} \; -exec grep -E -- "AUTHORS" {} \; | grep -B1 -v -E "/Portfile"

This has worked for me for a long while, though I wouldn't mind something nicer. Maybe an sqlite registry query?

> so that I can easily search for how other ports do common tasks. With
> all of that being said, I still have questions of my own:
> 
> 1) The gap between Trac and the mailing lists is huge. Sometimes there
> are long discussion on Trac that I completely miss since they don't
> happen on the mailing list. My question is how could we close this
> gap?

Do you subscribe to these lists?
macports-tickets at lists.macosforge.org
macports-changes at lists.macosforge.org


Regards,
Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130115/087f104c/attachment.p7s>


More information about the macports-dev mailing list