One of the components of http://drupal.org/node/596488 (see also http://3281d.com/projects/improve-install-profile-packaging) that we're going to add is something sort of like an update status report for each release of an installation profile, so that everyone can immediately tell if a profile release contains the most up-to-date releases or not (with big nasty red warnings if a profile includes code with security updates available).

To do this, we're going to add another project sub-module called project_package, which keeps track of the release nids of everything included in a package release (e.g. an install profile) so we can do the comparisons and provide this status report table.

This probably sounds related to #102102: Parse project .info files: present module list and dependency information, and in a way, it is. However, this is actually quite a bit different. That effort is about figuring out the dependencies of the sub-items included inside a single project release. This is about remembering what projects are included in a "meta-project". If every sub-module was its own distinct project (e.g. we had both d.o/project/views and d.o/project/views_ui), then they'd really be the same thing, but until then (which may never happen) we need pretty much completely different code and schema to handle these two different cases...

Here's a very primitive skeleton module that has the basic schema defined. I'll be fleshing this out over the next few days, but wanted to open an issue about it so hunmonk can use the {project_package_item} table in some of the parts he's working on.

An initial question occurred to me while putting this together: Once #594704: Allow packaged install profiles on d.o to pull in code from other sources + sites is resolved and profile packages include stuff off d.o, this table here will be insufficient. Should we actually call it {project_package_local_item} with the two nid fields, and then use a whole separate table with a more extensive schema for remote items (stuff we pulled in from elsewhere where we don't have a local release nid to use)?

Anyway, you should apply this patch at the root of the project module, and it should make a "package" subdir with project_package.(info|install|module).

Comments

dww’s picture

Status: Active » Needs work

hunmonk and I agreed to {project_package_local_release_item} for the initial table name. It's important that we know it's "local", as in, lives in our current DB. More than that, it's actually a release node.

We can punt on what the other table is called and what the schema is until we're actually solving that problem. ;)

dww’s picture

Adding tag

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new26.43 KB
new14.7 KB

Phew! After a huge round of changes in project_release, I could finally come back here. This is seriously starting to take shape. ;) Here's a new version of project_package, including views support, and a default view for listing the contents of a package. At this point, it lives as a tab at node/%/package-items, but that has a few problems and we won't want that in general. But, it works find for testing. Attached is a screenshot of the view in action on my local test site.

hunmonk’s picture

Status: Needs review » Needs work

haven't dug into the code yet -- i tried to view a package manifest, but got this db error:

user warning: Unknown column 'package_nid' in 'on clause' query: SELECT node.nid AS nid, node_project_release_nodes.title AS node_project_release_nodes_title, node_project_release_nodes.nid AS node_project_release_nodes_nid, project_release_nodes.version AS project_release_nodes_version, project_release_nodes.nid AS project_release_nodes_nid, project_release_nodes.security_update AS project_release_nodes_security_update, project_release_nodes.update_status AS project_release_nodes_update_status FROM node node INNER JOIN node node_project_package_local_release_item ON package_nid = node_project_package_local_release_item.nid LEFT JOIN project_release_nodes project_release_nodes ON node.nid = project_release_nodes.nid INNER JOIN node node_project_release_nodes ON project_release_nodes.pid = node_project_release_nodes.nid WHERE (node.status <> 0 OR (node.uid = 1 AND 1 <> 0) OR 1 = 1) AND (node_project_package_local_release_item.nid = 361) ORDER BY node_project_release_nodes_title ASC in /Users/hunmonk/Sites/drupal/rw_contrib/contributions/modules/views/includes/view.inc on line 769.

i'll review the code more tomorrow.

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new15.09 KB

Whoops, sorry about that. The patch I uploaded wasn't actually what I was running which generated the screenshot. ;) Try this.

dww’s picture

Status: Needs review » Fixed

Committed to HEAD. Let's deal with specific followup in other issues, instead of making this a catch-all.

Status: Fixed » Closed (fixed)
Issue tags: -packaged install profiles

Automatically closed -- issue fixed for 2 weeks with no activity.