The tree structure is not quite accurate

Early this morning I started poking around the database to see if there were some issue I needed to fix. I found some. Specifically, the port commits are all under ports/, but the src commits appear to be under /. This situation can be fixed fairly easily via SQL, but to maintain the structure will require a code change.

I suspect the ports commits prefix ports/ to the pathname before saving. The src commits need to do similar.

Here is a list of files in the root directory of the tree structure:

freshports.org=# select name, element_pathname(id) from element where parent_id is null order by element_pathname(id);
                     name                      |                element_pathname
-----------------------------------------------+------------------------------------------------
   release                                     | /  release
   releng                                      | /  releng
   svnadmin                                    | /  svnadmin
   vendor-crypto                               | /  vendor-crypto
   vendor-sys                                  | /  vendor-sys
 COPYRIGHT                                     | /COPYRIGHT
 COPYRIGHT   (contents, props changed)         | /COPYRIGHT   (contents, props changed)
 CVSROOT                                       | /CVSROOT
 CVSROOT-doc                                   | /CVSROOT-doc
 CVSROOT-ports                                 | /CVSROOT-ports
 CVSROOT-src                                   | /CVSROOT-src
 Directory Properties:                         | /Directory Properties:
 MAINTAINERS                                   | /MAINTAINERS
 MAINTAINERS   (contents, props changed)       | /MAINTAINERS   (contents, props changed)
 Makefile                                      | /Makefile
 Makefile   (contents, props changed)          | /Makefile   (contents, props changed)
 Makefile.inc1                                 | /Makefile.inc1
 Makefile.inc1   (contents, props changed)     | /Makefile.inc1   (contents, props changed)
 Makefile.mips                                 | /Makefile.mips
 Mk                                            | /Mk
 NetBSD                                        | /NetBSD
 ObsoleteFiles.inc                             | /ObsoleteFiles.inc
 ObsoleteFiles.inc   (contents, props changed) | /ObsoleteFiles.inc   (contents, props changed)
 Replaced:                                     | /Replaced:
 UPDATING                                      | /UPDATING
 UPDATING   (contents, props changed)          | /UPDATING   (contents, props changed)
 bin                                           | /bin
 bind9                                         | /bind9
 byacc                                         | /byacc
 cddl                                          | /cddl
 clang                                         | /clang
 com_err                                       | /com_err
 compiler-rt                                   | /compiler-rt
 contrib                                       | /contrib
 crypto                                        | /crypto
 databases                                     | /databases
 de_DE.ISO8859-1                               | /de_DE.ISO8859-1
 distrib                                       | /distrib
 doc                                           | /doc
 dtracetoolkit                                 | /dtracetoolkit
 en_US.ISO8859-1                               | /en_US.ISO8859-1
 es_ES.ISO8859-1                               | /es_ES.ISO8859-1
 etc                                           | /etc
 file                                          | /file
 flex                                          | /flex
 fr_FR.ISO8859-1                               | /fr_FR.ISO8859-1
 games                                         | /games
 gcc                                           | /gcc
 gnu                                           | /gnu
 gperf                                         | /gperf
 groff                                         | /groff
 illumos                                       | /illumos
 include                                       | /include
 it_IT.ISO8859-15                              | /it_IT.ISO8859-15
 ja_JP.eucJP                                   | /ja_JP.eucJP
 kerberos5                                     | /kerberos5
 ldns                                          | /ldns
 less                                          | /less
 lib                                           | /lib
 libarchive                                    | /libarchive
 libc++                                        | /libc++
 libcxxrt                                      | /libcxxrt
 libexec                                       | /libexec
 libpcap                                       | /libpcap
 libz                                          | /libz
 llvm                                          | /llvm
 mn_MN.UTF-8                                   | /mn_MN.UTF-8
 net-im                                        | /net-im
 netcat                                        | /netcat
 nl_NL.ISO8859-1                               | /nl_NL.ISO8859-1
 one-true-awk                                  | /one-true-awk
 openpam                                       | /openpam
 openresolv                                    | /openresolv
 pciids                                        | /pciids
 ports                                         | /ports
 projects                                      | /projects
 release                                       | /release
 rescue                                        | /rescue
 ru_RU.KOI8-R                                  | /ru_RU.KOI8-R
 sbin                                          | /sbin
 secure                                        | /secure
 share                                         | /share
 src                                           | /src
 sys                                           | /sys
 tcpdump                                       | /tcpdump
 tcsh                                          | /tcsh
 tools                                         | /tools
 tzdata                                        | /tzdata
 unbound                                       | /unbound
 usr.bin                                       | /usr.bin
 usr.sbin                                      | /usr.sbin
 www                                           | /www
 xz-embedded                                   | /xz-embedded
 zh_CN.GB2312                                  | /zh_CN.GB2312
(94 rows)

freshports.org=#

Yes, some pathnames are not quite what I’d like them to be. For example, this commit:

freshports.org=# select *, element_pathname(element_id) from commit_log_elements where commit_log_id = (select id from commit_log where message_id = '201207071717.q67HHh5s068245@svn.freebsd.org');
   id    | commit_log_id | element_id | revision_name | change_type |     element_pathname
---------+---------------+------------+---------------+-------------+--------------------------
 1884404 |        441606 |     393311 | 238200        | M           | /sys/cam/scsi/scsi_ch.c
 1884403 |        441606 |     378774 | 238200        | M           | /sys/cam/scsi/scsi_all.c

Those pathnames, I think, should start with src/

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

Leave a Comment

Scroll to Top