[arch-dev-public] Useful scripts

Travis Willard travis at archlinux.org
Tue Jul 31 00:19:46 EDT 2007


Hey guys,

Just threw together a couple of useful scripts, and I figured I may as
well share.

Note of warning!!  Do not use these scripts on any PKGBUILDs you don't
trust!  They source every PKGBUILD to obtain the information - if a
single PKGBUILD has rm -rf ~ you'd lose your home directory.  You've
been warned. ;)  (of course you could run it in a sandbox as well, but
yeah.)

find-deps:
This one finds all PKGBUILD files located in any subdirs of $(pwd), and
finds any and all packages that depend on the command line argument.
Very useful when searching for packages that might need a rebuild when
you're updating a lib - just run it in your cvs directory and it'll go
and find everything that lists your pkg as a dep. 

find-bad-licenses:
This one also finds all PKGBUILD files located in any subdirs of
$(pwd), and analyses all entries in the license array.  If the license
isn't one located in /usr/share/licenses/common, and it doesn't start
with 'custom', then the package and its invalid license are output to
stdout.  Also, if no license is defined, it outputs this info to stdout
as well.
At the moment, it doesn't check the validity of custom licenses, but it
does its job well; I've also attached the list it generates when run
against extra/community/unstable.  It's a long list - almost 2k
invalid/non-existent licenses.

I intend to go through what repos I have access to (extra, unstable,
community) sometime in the near future (probably within the next couple
of months) and clean up this license situation - we really need to get
consistent with these things.

Anyway, if you can get any use from my scripts, please do. ;)

--
Travis
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bad-licenses.txt
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20070731/4268d396/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-bad-licenses
Type: application/octet-stream
Size: 507 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20070731/4268d396/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: find-deps
Type: application/octet-stream
Size: 633 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20070731/4268d396/attachment-0001.obj>


More information about the arch-dev-public mailing list