We won't be distributing CDROM anymore, so simplify to
just PERMIT_PACKAGE / PERMIT_DISTFILES
In particular, the new variables are shorter, so this makes
for better cosmetic sense in ports.
The "current" version allows for the old variables to die out
peacefully, at our leasure, and then I'll remove the old stubs.
As discussed with sthen@, various people agree, and deraadt@
is okay with the strategic change.
This does survive a bulk.
PLEASE NOTE: built packages require current pkg* tools.
In particular, the current version deals with
@comment pkgpath=* ftp=*
just fine, but the old one WILL COMPLAIN about missing cdrom info.
register-plist also doesn't care, adding/removing cdrom info
is a no-op for it. There is NO BUMP needed for the conversion.
For now, sqlports STILL carries the old variables. I'll deal
with their removal later.
So, Portsq is a snapshot of Ports... dirty but fast.
I had mixed feelings about this.
There's also a script to resync the table.
Grows the db by about 50% (+25MB)
Discussed with sthen@
Add a "meta" table that just contains a schema version and a hash.
So that some clients (e.g., portroach) can automatically figure out
whether a rebuild is required.
kill a bit of code.
adjust is now the only request "not in the mold", so just create it when
needed (so, late enough)
Add index creation (directly in create_schema), for now used for
canonical.
The main benefit is that it's easier to construct the schema from several
places, with proper indentation.
Also, sql knows a bit about sql, so it's able to
- know which column is a foreign key, just reference the table
- remove table aliases when they're not needed
- leave table names out in table.column when there's no ambiguity.
For instance, view Ports now looks like:
CREATE VIEW Ports AS
SELECT
Id AS PathId,
_Paths.FullPkgPath AS FullPkgPath,
_AutoVersion.Value AS AUTOCONF_VERSION,
T0001.Value AS AUTOMAKE_VERSION,
[...]
FROM _Ports
JOIN _Paths
ON Canonical=_Ports.FullPkgPath
LEFT JOIN _AutoVersion
ON _AutoVersion.KeyRef=AUTOCONF_VERSION
LEFT JOIN _AutoVersion T0001
ON T0001.KeyRef=AUTOMAKE_VERSION
instead of:
CREATE VIEW Ports AS
SELECT
T0057.Id AS PathId,
T0057.FULLPKGPATH AS FULLPKGPATH,
T0058.VALUE AS AUTOCONF_VERSION,
T0059.VALUE AS AUTOMAKE_VERSION,
[...]
FROM _Ports
JOIN _Paths T0057
ON T0057.Canonical=_Ports.FULLPKGPATH
LEFT JOIN _AutoVersion T0058
ON T0058.KEYREF=_Ports.AUTOCONF_VERSION
LEFT JOIN _AutoVersion T0059
ON T0059.KEYREF=_Ports.AUTOMAKE_VERSION