Message ID | 20220929163328.229460-2-kleber.souza@canonical.com |
---|---|
State | New |
Headers | show |
Series | Add lrm autogenerated transitional independent of variants | expand |
On 29.09.22 18:33, Kleber Sacilotto de Souza wrote: > BugLink: https://bugs.launchpad.net/bugs/1991130 > > Add a new "migrate" command to be used by 'debian/package.config' which > contrary to "transitional" doesn't have the autogenerated contents > filtered out by 'debian/rules.in' depending on the source's variants. > > Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- I think this change would go into cranky fix for rollout. Until the new keyword gets added to config it won't have any effect on existing lrm either. So it should be a safe thing. A note to consider... and not sure this will offend some darn checker, but you can use "<<-EOL" which allows to indent the inline doc. I believe whitespace at the beginning of a line gets stripped. But it would make it clearer that the text is inside the loop. -Stefan > debian/scripts/gen-rules.lrm | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm > index 574a00ec..ebd17f1f 100755 > --- a/debian/scripts/gen-rules.lrm > +++ b/debian/scripts/gen-rules.lrm > @@ -25,6 +25,7 @@ mkdir -p "debian/control.d" > : >"debian/control.d/nvidia" > : >"debian/control.d/migrate-nvidia" > : >"debian/control.d/transitionals-local" > +: >"debian/control.d/migrate-local" > : >"debian/control.d/signatures" > > cat - "debian/rules.in" >"debian/rules.gen" <<EOL > @@ -225,3 +226,23 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package) > Transitional package for upgrades of ${from} to ${to}. > EOL > done <"debian/package.config" > + > +while read command from to archs > +do > + case "$command" in > + migrate) ;; > + *) continue ;; > + esac > + > + # debian/control.d/migrate-local > + echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to" > + cat - >>"debian/control.d/migrate-local" <<EOL > + > +Package: linux-modules-nvidia-${from} > +Architecture: ${archs} > +Section: oldlibs > +Depends: linux-modules-nvidia-${to} > +Description: Extra drivers for nvidia-${from} (dummy transitional package) > + Transitional package for upgrades of ${from} to ${to}. > +EOL > +done <"debian/package.config"
diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm index 574a00ec..ebd17f1f 100755 --- a/debian/scripts/gen-rules.lrm +++ b/debian/scripts/gen-rules.lrm @@ -25,6 +25,7 @@ mkdir -p "debian/control.d" : >"debian/control.d/nvidia" : >"debian/control.d/migrate-nvidia" : >"debian/control.d/transitionals-local" +: >"debian/control.d/migrate-local" : >"debian/control.d/signatures" cat - "debian/rules.in" >"debian/rules.gen" <<EOL @@ -225,3 +226,23 @@ Description: Extra drivers for nvidia-${from} (dummy transitional package) Transitional package for upgrades of ${from} to ${to}. EOL done <"debian/package.config" + +while read command from to archs +do + case "$command" in + migrate) ;; + *) continue ;; + esac + + # debian/control.d/migrate-local + echo "II: manual migrate linux-modules-nvidia-$from -> linux-modules-nvidia-$to" + cat - >>"debian/control.d/migrate-local" <<EOL + +Package: linux-modules-nvidia-${from} +Architecture: ${archs} +Section: oldlibs +Depends: linux-modules-nvidia-${to} +Description: Extra drivers for nvidia-${from} (dummy transitional package) + Transitional package for upgrades of ${from} to ${to}. +EOL +done <"debian/package.config"
BugLink: https://bugs.launchpad.net/bugs/1991130 Add a new "migrate" command to be used by 'debian/package.config' which contrary to "transitional" doesn't have the autogenerated contents filtered out by 'debian/rules.in' depending on the source's variants. Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> --- debian/scripts/gen-rules.lrm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)