smeserver-update/root/etc/e-smith/db/configuration/migrate/smeserver-update
Jean-Philippe Pialasse c158b051fd * Mon Mar 25 2024 Jean-Philippe Pialasse <jpp@koozali.org> 2.6.2-9.sme
- initial release of smeserver-update based on smeserver-yum
  * tidy centos repos, add rocky repos, add support for metalinks,
  tidy most references to yum (except manager), tidy config and templates
  * yum-cron moved to dnf-automatic,
  * rename yum_** esmith db, except yum_repositories
  * moved yum.conf to dnf.conf with deltarpm , fastestmirror support
  * add requirement for dnf post-transaction-actions
  * adapt setting for priorities
  * renamed yum.service to dnf.service
  * TODO smeserver.py plugin
2024-03-25 22:42:14 -04:00

34 lines
1.0 KiB
Plaintext

{
# migrate from yum to dnf key
my $yum = $DB->get("yum");
if ($yum){
my $dnf = $DB->get("dnf") ||
$DB->new_record("dnf", { type => "service" });
$dnf->merge_props($yum->props);
$yum->delete;
}
# tidy EOL tag
use POSIX qw(strftime);
my $curdate = strftime '%Y%m%d', localtime;
my $curVers = 8;
my $curVersEOL = 20290531;
# we remove the forced value if for a previous release;
# also if not after the eol date
my $dropit = $DB->get_prop_and_delete('dnf','eolversion') if ( (substr($dnf{eolversion},0,1)<$curVers) || ( "$curdate" < "$curVersEOL") );
# Added for bug 8855 and bug 8858
# we want to remove the property check4contribsupdates
my $check4contribsupdates = $DB->get_prop('dnf','check4contribsupdates');
if ($check4contribsupdates) {
$DB->get('dnf')->delete_prop('check4contribsupdates');
}
my $output_width = $DB->get_prop('dnf','output_width');
if ($output_width) {
$DB->get('dnf')->delete_prop('output_width');
}
}