Find installed unmaintained ports: Difference between revisions

From TykWiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 24: Line 24:
I plan to run the script now and then to see if anything I really need is unmaintained, and if so I might consider becoming the maintainer.
I plan to run the script now and then to see if anything I really need is unmaintained, and if so I might consider becoming the maintainer.


Later in the same thread I found this little gem, which will list all installed ports that are marked as DEPRECATED:
Later in the same thread I found this little gem, which will list all installed ports that are marked as DEPRECATED, or slave ports where the master port is marked as DEPRECATED:


<pre>
<pre>
#!/bin/sh                                                                                                                                      
#!/bin/sh
                                                                                                                                               
#
prefix=/usr/ports/                                                                                                                             
PORTSDIR=${1-"/usr/ports"}
makefile=/Makefile                                                                                                                             
for port in $(pkg_info -oa | grep /)
                                                                                                                                               
do
for file in `pkg_info -oxa | grep "/"`                                                                                                         
    dep=$(make -C ${PORTSDIR}/${port} -V DEPRECATED)
do                                                                                                                                              
    [ -n "${dep}" ] && echo "${port}: ${dep}"
        yes=`grep DEPRECATED= ${prefix}${file}${makefile}`
done
        if [ -n "$yes" ]                                                                                                                        
        then
                echo $file $yes
        fi                                                                                                                                     
done  
</pre>
</pre>

Latest revision as of 10:02, 30 April 2011

The FreeBSD ports collection is huge. Not all ports are fortunate enough to have a maintainer, this script can show you a list of unmaintained ports installed on a FreeBSD system:

#!/bin/sh

prefix=/usr/ports/
makefile=/Makefile

for file in `pkg_info -oxa | grep "/"`
do
 if test -f ${prefix}${file}${makefile}
 then
  yes=`grep MAIN ${prefix}${file}${makefile} | grep -i 'ports@freebsd\.org'`
  if [ -n "$yes" ]
  then
   echo $file
  fi
 fi
done

I found the script in this thread on the freebsd-ports@ mailing list.

I plan to run the script now and then to see if anything I really need is unmaintained, and if so I might consider becoming the maintainer.

Later in the same thread I found this little gem, which will list all installed ports that are marked as DEPRECATED, or slave ports where the master port is marked as DEPRECATED:

#!/bin/sh
#
PORTSDIR=${1-"/usr/ports"}
for port in $(pkg_info -oa | grep /)
do
    dep=$(make -C ${PORTSDIR}/${port} -V DEPRECATED)
    [ -n "${dep}" ] && echo "${port}: ${dep}"
done