Closed Bug 1358590 Opened 7 years ago Closed 7 years ago

Add --cargo-channel switch to repack_rust.py

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: rillian, Assigned: rillian)

References

Details

Attachments

(1 file)

We sometimes want to ship a newer cargo than the one from the rust release we're using. Add a switch to the repack script to make this easier.
Assignee: nobody → giles
Comment on attachment 8860498 [details]
Bug 1358590 - Update rust-build to v0.4.5.

https://reviewboard.mozilla.org/r/132502/#review135372

Thanks!

::: taskcluster/docker/rust-build/repack_rust.py:119
(Diff revision 1)
>      req.raise_for_status()
>      manifest = toml.loads(req.content)
>      if manifest['manifest-version'] != '2':
>          log('ERROR: unrecognized manifest version %s.' %
>              manifest['manifest-version'])
> -        return
> +        return None

This should probably just `raise` since nothing seems to handle this case anyway.

::: taskcluster/docker/rust-build/repack_rust.py:231
(Diff revision 1)
> -        return 'stable'
>  
>  if __name__ == '__main__':
> -    channel = args()
> -    repack(mac64, [mac64, mac32], channel=channel)
> -    repack(win32, [win32], channel=channel)
> +    args = args()
> +    repack(mac64, [mac64],
> +           channel=args.channel, cargo_channel=args.cargo_channel)

You can shorten this a little by doing `args = vars(args())` and then calling `repack(x, [x], **args)` to turn `args` into a dict and pass it as `kwargs`.
Attachment #8860498 - Flags: review?(ted) → review+
Thanks. I thought about passing the channels as a group but didn't realize that wouldn't clobber the `suffix` value. I'll update the script and also fix the flake8 lints.
Pushed by rgiles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/81a606f52360
Update rust-build to v0.4.5. r=ted
https://hg.mozilla.org/mozilla-central/rev/81a606f52360
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: