timsutton / brigadier

Fetch and install Boot Camp ESDs with ease.
MIT License
2.07k stars 198 forks source link

Newest date is not newest version #11

Open annemacro opened 9 years ago

annemacro commented 9 years ago

This looks to be Apple's fault not yours, but the versions that brigadier is choosing to download are on older branches of the tree, in many cases. For example, with the model Macmini5,2, it returns: 031-0787: PostDate 2014-02-11 21:35:32 031-11273: PostDate 2015-02-09 18:42:37 Selecting 031-11273 as it's the most recently posted.

But 11273 turns out to be Boot Camp v4, whereas 0787 is v5. I'm trying to work around this at the moment by using brigadier's output to figure out the URL to download the PKG manually, but some way for brigadier to either find out the actual Boot Camp version number, or to let me specify on the command line something like "--package 031-0787", would be much smoother.

Thanks so much for this tool!

timsutton commented 9 years ago

Thanks for the report!

Looking a bit at the two IDs, 11273 (v4) has these additional JavaScript statements in the dist:

    if (system.compareVersions(system.version.ProductVersion, '10.7') < 0) {
        my.result.message = system.localizedStringWithFormat('ERROR_0', '10.7');
        my.result.type = 'Fatal';
        return false;
    }
    if (system.compareVersions(system.version.ProductVersion, '10.9') > 0) {
        my.result.message = system.localizedStringWithFormat('ERROR_1', '10.9');
        my.result.type = 'Fatal';
        return false;
    }

Meaning that you might get Boot Camp v4 on some OS X versions with the Boot Camp Assistant, and v5 on others.

It would be really nice if some other more useful metadata were included in the dist files, and I agree that it would be helpful to have such a command option for cases like these.

timsutton commented 9 years ago

I'm planning to make this option available in an update, but one possible workaround for you in the meantime if you happen to have your own SUS replica server (either Apple's or Reposado): configure Brigadier to use a catalog listed there using the brigadier.plist file, and remove the v4 Boot Camp ESD from the catalog it lists.

timsutton commented 9 years ago

Pushed a new release here:

https://github.com/timsutton/brigadier/releases/tag/0.2.2