I happened to be testing the SRU against Jammy as well and I see the
same behaviour that you do - the .sources files move to .sources.save
but don't move back to .sources when the repository profile is removed.

Though, I don't believe this is actually related to the patch. I see all files 
in sources.list.d/ affected by this issue in the current version of the package 
as well, without consuming from -proposed. For example, I attached my pro token 
to the client so my sources.list.d/ had the following list files:
ubuntu-esm-apps.list   ubuntu-esm-infra.list  

After applying the profile they moved to
ubuntu-esm-apps.list.save   ubuntu-esm-infra.list.save
which is expected.

Then after removing the profile, those also don't revert to their
original state.

I think we're hitting a separate issue related to the fact that the
reversion of sources to their original state only happens specifically
on the sources.list file (see here
https://github.com/canonical/landscape-
client/blob/main/landscape/client/manager/aptsources.py#L139 which
checks for the existence of sources.list.save and moves it back). There
is no equivalent mechanism (as far as I could tell) that reinstates the
sources.list.d directory, so none of its contents are restored to their
previous state

Maybe we could add a change that pattern matches for *.save in
sources.list.d and restores all of them in the same conditional block
that reverts sources.list.save? Though, this might open up a new can of
worms since previously applied repository profiles will be present in
that directory as profile.list.save, which we wouldn't want to restore.

I see how it could constitute a failure if we want to find a way to
selectively revert the contents of sources.list.d within the scope of
this issue. But I do just want to mention that's not the current
behaviour anyways so I don't think it's a regression. I'd be happy to
hear your thoughts on how we should go about this

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2087852

Title:
  [FFe][SRU] Repository profiles only act on .list files and do not
  affect .source files

To manage notifications about this bug go to:
https://bugs.launchpad.net/landscape-client/+bug/2087852/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to