Merge lp:~albertomilone/ubuntu-archive-tools/nvidia-1000-whitelist into lp:ubuntu-archive-tools

Proposed by Alberto Milone
Status: Merged
Merged at revision: 1387
Proposed branch: lp:~albertomilone/ubuntu-archive-tools/nvidia-1000-whitelist
Merge into: lp:ubuntu-archive-tools
Diff against target: 19 lines (+6/-2)
1 file modified
update-i386-whitelist (+6/-2)
To merge this branch: bzr merge lp:~albertomilone/ubuntu-archive-tools/nvidia-1000-whitelist
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+391356@code.launchpad.net

Commit message

Add NVIDIA releases from 440 to 1000 (in steps of 5) to the i386 whitelist

Description of the change

This should save us from updating the script for a while, adding releases from 440 to 1000 in steps of 5. Having a regex in place would more efficient, but I am not sure where to do that.

To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

Thanks for this. The problem with a regexp is that the whitelist in launchpad must contain an exact list of packages, so this script would need to scrape the archive in order to expand any regexp at runtime. Possible, but would involve extra work. So I think your current approach is fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'update-i386-whitelist'
2--- update-i386-whitelist 2020-09-05 23:52:32 +0000
3+++ update-i386-whitelist 2020-09-25 09:59:12 +0000
4@@ -118,9 +118,13 @@
5 except KeyError:
6 pass
7
8- for nv_flavour in ('440-server', '450', '450-server'):
9+ nv_list = []
10+ for nv_flavour in range(440, 1005, 5):
11 nvidia_pkg = 'nvidia-graphics-drivers-%s' % (nv_flavour)
12- newSet.update([nvidia_pkg])
13+ nv_list.append(nvidia_pkg)
14+ nvidia_pkg += '-server'
15+ nv_list.append(nvidia_pkg)
16+ newSet.update(nv_list)
17
18 print("Additions:" )
19 additions = list(newSet-currentSet)

Subscribers

People subscribed via source and target branches