Adding Makefile and pkg-plist to the mix

Recently, I’ve been adding more and more file content into the database, mostly because it’s useful. For example, we add the contents of the distinfo, because that information is useful. Next, it was pkg-plist, and before I was done that, someone suggested added in the Makefile.

Neither pkg-plist nor Makefile will be perfect:

  1. Not all ports have a pkg-plist
  2. Some ports use Makefile.inc, and we are not capturing that

Why store these files?

Because we can, and then we can search on it.

Ever wondered how many ports do not have a pkg-plist file?

freshports.org=# select count(*) from ports where pkg_plist is not null and status = 'A';;
 count 
-------
 17632
(1 row)

freshports.org=# select count(*) from ports where pkg_plist is null and status = 'A';;
 count 
-------
 11733
(1 row)

freshports.org=#

How many ports use OSVERSION?

freshports.org=# select count(*) from ports where makefile ilike '%OSVERSION%';
 count 
-------
   658
(1 row)

Yes, you can do this with find and grep, but these queries are much faster than that.

We can create all kinds of queries with this data, and allow you to save the output in plain text form.

Loading this up on dev

I loaded this up on dev first. Then I looked at how many Makefiles I had.

freshports.org=# select count(*) from ports where Makefile is not null and status = 'A';;
 count 
-------
 29349
(1 row)

freshports.org=# select count(*) from ports where Makefile is null and status = 'A';;
 count 
-------
    10
(1 row)

Ten ports without Makefiles? Who are they?

freshports.org=# select id, element_pathname(element_id) from ports where Makefile is null and status = 'A';;
  id   |                    element_pathname                     
-------+---------------------------------------------------------
 39093 | /ports/branches/2014Q1/print/typetools
 39450 | /ports/branches/2014Q2/lang/twelf
 39268 | /ports/branches/2014Q1/graphics/ipe
 38946 | /ports/branches/2014Q1/textproc/hs-lhs2tex
 39958 | /ports/branches/2014Q4/multimedia/gmp-api
 40059 | /ports/branches/2014Q4/multimedia/openh264
 40223 | /ports/branches/2016Q1/sysutils/p5-Schedule-Cron-Events
 39208 | /ports/branches/2014Q1/textproc/dblatex
 40070 | /ports/branches/2015Q1/textproc/p5-HTML-FormatExternal
 39110 | /ports/branches/2014Q1/www/chromium
(10 rows)

Ahh, that explains these errors I saw while processing some ports. I won’t worry about they because they are all old branches.

Jul 18 02:48:20 jester FreshPorts[69764]: error executing make command for multimedia/gmp-api: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q4 multimedia/gmp-api 2>/tmp/FreshPorts.multimedia.gmp-api.make-error.2016.7.18.2.48.20.69764  produced this error:  Error message is: cd: /usr/local/repos/PORTS-2014Q4/multimedia/gmp-api: No such file or directory make: cannot open /usr/local/repos/PORTS-2014Q4/multimedia/gmp-api/Makefile. Make results are :  make: stopped in /  (/usr/local/FreshPorts/scripts) 
Jul 18 02:50:33 jester FreshPorts[69764]: error executing make command for multimedia/openh264: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q4 multimedia/openh264 2>/tmp/FreshPorts.multimedia.openh264.make-error.2016.7.18.2.50.33.69764  produced this error:  Error message is: cd: /usr/local/repos/PORTS-2014Q4/multimedia/openh264: No such file or directory make: cannot open /usr/local/repos/PORTS-2014Q4/multimedia/openh264/Makefile. Make results are :  make: stopped in /  (/usr/local/FreshPorts/scripts) 
Jul 18 03:12:40 jester FreshPorts[69764]: error executing make command for print/typetools: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q1 print/typetools 2>/tmp/FreshPorts.print.typetools.make-error.2016.7.18.3.12.40.69764  produced this error:  Error message is: make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.tex.mk" line 92: malformed TEX_DEFAULT: tetex  (/usr/local/FreshPorts/scripts) 
Jul 18 03:35:37 jester FreshPorts[69764]: error executing make command for sysutils/p5-Schedule-Cron-Events: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2016Q1 sysutils/p5-Schedule-Cron-Events 2>/tmp/FreshPorts.sysutils.p5-Schedule-Cron-Events.make-error.2016.7.18.3.35.37.69764  produced this error:  Error message is: cd: /usr/local/repos/PORTS-2016Q1/sysutils/p5-Schedule-Cron-Events: No such file or directory make: cannot open /usr/local/repos/PORTS-2016Q1/sysutils/p5-Schedule-Cron-Events/Makefile. Make results are :  make: stopped in /  (/usr/local/FreshPorts/scripts) 
Jul 18 03:38:48 jester FreshPorts[69764]: error executing make command for textproc/dblatex: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q1 textproc/dblatex 2>/tmp/FreshPorts.textproc.dblatex.make-error.2016.7.18.3.38.48.69764  produced this error:  Error message is: make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.tex.mk" line 92: malformed TEX_DEFAULT: tetex  (/usr/local/FreshPorts/scripts) 
Jul 18 03:39:50 jester FreshPorts[69764]: error executing make command for textproc/hs-lhs2tex: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q1 textproc/hs-lhs2tex 2>/tmp/FreshPorts.textproc.hs-lhs2tex.make-error.2016.7.18.3.39.50.69764  produced this error:  Error message is: make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.tex.mk" line 92: malformed TEX_DEFAULT: tetex  (/usr/local/FreshPorts/scripts) 
Jul 18 03:41:25 jester FreshPorts[69764]: error executing make command for textproc/p5-HTML-FormatExternal: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2015Q1 textproc/p5-HTML-FormatExternal 2>/tmp/FreshPorts.textproc.p5-HTML-FormatExternal.make-error.2016.7.18.3.41.25.69764  produced this error:  Error message is: cd: /usr/local/repos/PORTS-2015Q1/textproc/p5-HTML-FormatExternal: No such file or directory make: cannot open /usr/local/repos/PORTS-2015Q1/textproc/p5-HTML-FormatExternal/Makefile. Make results are :  make: stopped in /  (/usr/local/FreshPorts/scripts) 
Jul 18 03:48:07 jester FreshPorts[69764]: error executing make command for www/chromium: This command (FreshPorts code 1):  /usr/local/bin/sudo /usr/sbin/chroot -u dan /usr/local/FreshPorts/ports-jail /make-port.sh /usr/local/repos/PORTS-2014Q1 www/chromium 2>/tmp/FreshPorts.www.chromium.make-error.2016.7.18.3.48.7.69764  produced this error:  Error message is: make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" line 1516: Cannot open /usr/local/repos/PORTS-2014Q1/Mk/Uses/tar.mk make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" line 5281: warning: duplicate script for target "-depends" ignored make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" line 5278: warning: using previous script for "-depends" defined here make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" line 5281: warning: duplicate script for target "-depends" ignored make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" line 5278: warning: using previous script for "-depends" defined here make: "/usr/local/repos/PORTS-2014Q1/Mk/bsd.port.mk" lin

What next?

Right now, the data is loading up… Makefile, pkg-plist, distinfo, etc. The script should be done at about 0800 UTC.

Tomorrow morning, I will restart commit processing, and clear the cache so you can see all the pretty new stuff.

In the coming weeks, the search page will be amended to allow searching on the new fields.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top