Remove obsolete stx.conf upgrade

Remove code that automagically changes debian archive URLs in stx.conf
to public WR mirror URLs. This upgrade was added last year and was only
relevant to un-upgraded development environments that existed at that
time (eg on developer desktops). It is no longer relevant. Removing it
because it breaks the ability of the user to explicitly set those URLs
to the real Debian archive repository under some circumstances.

How to reproduce:
* Remove existing stx.conf
* Copy stx.conf.example => stx.conf
* Replace the key:
  stx config --add stx config --add project.debian_snapshot_base http://snapshot.debian.org/archive/debian
* Upgreade configuration:
  stx config --upgrade
* ===> URL gets reset back to default (mirror) in stx.conf

TESTS
==================================
* Re-run above steps and make sure this doesn't happen

Closes-Bug: 2042854

Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
Change-Id: I3ff011d747f2804ade0152ad0296b00ba2785ebf
This commit is contained in:
Davlet Panech 2023-11-06 12:27:11 -05:00
parent 3752f6adf1
commit 1f7a760068
1 changed files with 3 additions and 5 deletions

View File

@ -218,16 +218,14 @@ class STXConfigParser:
if not self.__upgrade_id_exists('debian_snapshot_stx_mirror'):
debian_snapshot_stx_mirror_upgraded = False
# debian_snapshot_base
old_value = 'http://snapshot.debian.org/archive/debian'
old_value2 = 'http://mirror.starlingx.cengn.ca/mirror/debian/debian/snapshot.debian.org/archive/debian'
old_value = 'http://mirror.starlingx.cengn.ca/mirror/debian/debian/snapshot.debian.org/archive/debian'
new_value = 'https://mirror.starlingx.windriver.com/mirror/debian/debian/snapshot.debian.org/archive/debian'
current_value = self.__get('project', 'debian_snapshot_base')
if current_value == old_value or current_value == old_value2:
if current_value == old_value:
self.__upgrade_nonempty_key('project', 'debian_snapshot_base', new_value)
debian_snapshot_stx_mirror_upgraded = True
# debian_security_snapshot_base
old_value = 'http://snapshot.debian.org/archive/debian-security'
old_value2 = 'http://mirror.starlingx.cengn.ca/mirror/debian/debian/snapshot.debian.org/archive/debian-security'
old_value = 'http://mirror.starlingx.cengn.ca/mirror/debian/debian/snapshot.debian.org/archive/debian-security'
new_value = 'https://mirror.starlingx.windriver.com/mirror/debian/debian/snapshot.debian.org/archive/debian-security'
current_value = self.__get('project', 'debian_security_snapshot_base')
if current_value == old_value: