Just downloaded the drupal wiki install profile and uncompressed it and got a folder named drupal-6.17. I would expect it to be drupal_wiki-1.0-beta1 or something similar.

Comments

avpaderno’s picture

Does the name of the created directory make any difference?

boris mann’s picture

@kiamlaluno: if you download 3 different install profiles at the same time and are testing them, then yes. And it's definitely not an edge case (adding them as platforms to Aegir, having them all in the same directory and having them overwrite each other, etc.)

juliangb’s picture

Subscribe.

I've started to manage my deployments via Aegir, and as #2, have found that downloads of installation profiles have overwritten over downloads.

Is this by design? It is not a good user experience!

boris mann’s picture

@juliangb my joke would be that this is by "non design" -- in that no one ever thought about it, so it just ended up being called "drupal"

dww’s picture

Install profile packaging lives in contributions/modules/drupalorg/drupalorg_project/plugins/release_packager/DrupalorgProjectPackageReleaseDistro.class.php

Knock yourselves out. ;)

juliangb’s picture

Project: Drupal.org infrastructure » Drupal.org customizations
Version: » 6.x-3.x-dev
Component: Packaging » Code

OK I'll give this a go.

Can I confirm which branch I should patch from? It sounds like 2.x is currently running, but this will switch to 3.x next week with the git migration - therefore, best to patch 3.x - is that correct?

dww’s picture

@juliangb: It actually doesn't matter -- I'm pretty sure the file you care about didn't change between the two branches. But sure, if you want to try it with 6.x-3.x that's probably wise. I doubt we're going to deploy this change before the Git launch...

juliangb’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

Patch attached.

Caveat that this is the first time I've looked at the release packager, and also have no way to test it myself!

juliangb’s picture

Does anyone have a minute to look at this?

dww’s picture

Status: Needs review » Needs work

Sorry, this completely fell off my radar. However, I remembered it while working on #1455614: Packaging script doesn't allow distributions to patch core or specify a git revision last night. The patch no longer applies, but it is indeed a trivial fix if/when we decide this is a good idea to change this. Should wait for 1455614 to actually land, but then I can easily get this fixed. It'd just be nice to get more feedback on if it's actually the right thing to be doing. ;)

webchick’s picture

dww: makes sense, I think
dww: that'd match what modules do

sun’s picture

Title: Install profiles should have tarballs with names derived from the profile name » Top-level directory in packaged install profiles should use the shortname of the install profile project

If I understand this correctly (the variable names in the patch aren't very intuitive) then:

The proposal is to change the packaging for install profiles, so that contained top-level directory is no longer

./drupal-x.y/...

but instead:

./[install-profile-project-shortname]-[version]/...
dww’s picture

Correct, that's the proposal. Yeah, sorry the variable names are wonky.

sun’s picture

It's not really clear whether the proposal also foresees to include the release version in the top-level folder name.

I'm not 100% sure whether it would make sense to include the version, as the most common and wanted operation is most likely to overwrite an existing extracted archive; i.e., an older version.

Likewise, when extracting a module, there's also no version suffix.

EDIT: but as long as the Drupal core tarball has a version suffix, it prolly makes sense to do it for install profiles, too...

dww’s picture

Yes, the idea is that if you unpack a tarball called something like:

openpublic-7.x-1.0-beta5-core.tar.gz

You end up with a directory called

openpublic-7.x-1.0-beta5

The point of this issue is to prevent clobbering things by mistake. Therefore, clobbering should be opt-in. Therefore, the directory should include the version.

Note that both of the "no-core" variants do *not* include the version, since that's for the use-case of "upgrading" your site, etc. That's more like a standard module release. This issue is just about the fully-packaged thing, including core.

dww’s picture

Assigned: Unassigned » dww
Status: Needs work » Needs review
StatusFileSize
new1.12 KB

Re-rolled. Tested on http://distro-drupal.redesign.devdrupal.org. Working great. Any final objections?

sun’s picture

Status: Needs review » Reviewed & tested by the community

Thanks!

Nope -- other than perhaps informing drush maintainers about this naming change to make sure that drush dl picks it up properly.

dww’s picture

#1476994: Handle change in top-level directory name in fully-packaged distribution tarballs

I'll give them a little while to respond before I deploy this.

Thanks,
-Derek

dww’s picture

Status: Reviewed & tested by the community » Fixed

drush doesn't care. Committed, pushed, and deployed.

Yay!
-Derek

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

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

  • Commit 3a0f618 on 6.x-3.x, 7.x-3.x-dev by dww:
    [#863938] by juliangb, dww: Fixed top-level directory in distribution...