Bug 4491 - Update perl-Time-ZoneInfo to correctly work with current system layout
: Update perl-Time-ZoneInfo to correctly work with current system layout
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-09 14:42 MSD by Denis Silakov
Modified: 2015-02-27 00:45 MSK (History)
1 user (show)

See Also:
RPM Package:
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Silakov 2014-10-09 14:42:20 MSD
perl-Time-ZoneInfo package in its current state tries to get time zone information from /etc/timezone or /etc/sysconfig/clock files. However, these files are missing in modern Desktop Fresh, so perl-Time-ZoneInfo can't detect timezone properly.

perl-Time-ZoneInfo is used by urpmi when choosing the best mirrors. If it doesn't work properly, the mirror choice can be inaccurate.
Comment 1 Denis Silakov 2014-10-09 14:47:55 MSD
Advisory:

perl-Time-ZoneInfo has been updated to take current time zone using modern DateTime::TimeZone module instead of parsing hardcoded files.

Build list:
https://abf.io/build_lists/2289209
https://abf.io/build_lists/2289208

Note for testers:
For complete test, ensure that you use $MIRRORLIST in repository urls in /etc/urpmi/urpmi.cfg, delete /var/cache/mirror.cache file and try to install any package.
Comment 2 FirstLevel 2014-10-09 15:20:21 MSD
I have installed this package in 32bit system. Then I have removed sources for packages and removed /var/cache/urpmi.
After that I could not add sources for packages
[root@r4 cache]# edit-urpm-sources.pl 
getting exclusive lock on urpmi
загружается список зеркал из http://mirror.rosalinux.com/rosa/rosa2014.1/rosa2014.1.i586.list
загружено http://mirror.rosalinux.com/rosa/rosa2014.1 rosa2014.1.i586.list
Cannot determine local time zone
unlocking urpmi database

and /etc/urpmi/urpmi.cfg conains only {}
Comment 3 Denis Silakov 2014-10-09 16:07:47 MSD
Please try together with updated perl-DateTime-TimeZone:

(perl-DateTime-TimeZone)
https://abf.io/build_lists/2290221
https://abf.io/build_lists/2290222

(perl-Time-ZoneInfo)
https://abf.io/build_lists/2289209
https://abf.io/build_lists/2289208
Comment 4 FirstLevel 2014-10-09 16:29:26 MSD
(In reply to comment #3)
> Please try together with updated perl-DateTime-TimeZone:
> 
> (perl-DateTime-TimeZone)
> https://abf.io/build_lists/2290221
> https://abf.io/build_lists/2290222
> 
> (perl-Time-ZoneInfo)
> https://abf.io/build_lists/2289209
> https://abf.io/build_lists/2289208

Now I could to add sources for packages. I see that yandex mirror is added. But after I launch installation of VLC - process is hanging.
...
 vlc-plugin-upnp                2.1.5        2plf          plf   2014.1 i586 (рекомендуется)
Будет использовано 43МБ дополнительного дискового пространства.
Будет загружено 8.8МБ пакетов.
Установить 26 пакетов? (Y/n) y


    ftp://mirror.yandex.ru/rosa/rosa2014.1/repository/i586/media/main/release/libebml4-1.3.0-2-rosa2014.1.i586.rpm
Comment 5 FirstLevel 2014-10-09 16:31:01 MSD
I see that installation process is too slow
Comment 6 FirstLevel 2014-10-09 21:05:16 MSD
Without patches urpmi select mirror mirror.rosalab.ru.
With patches urpmi select mirror mirror.yandex.ru
Comment 7 Denis Silakov 2014-10-17 15:20:37 MSD
One more attempt, with more fixes to urpmi to preserve previous behavior:

(perl-DateTime-TimeZone)
https://abf.io/build_lists/2290221
https://abf.io/build_lists/2290222

(perl-Time-ZoneInfo)
https://abf.io/build_lists/2289209
https://abf.io/build_lists/2289208

(urpmi)
https://abf.io/build_lists/2311141
https://abf.io/build_lists/2311140
Comment 8 FirstLevel 2014-10-20 12:09:14 MSD
(In reply to comment #7)
> One more attempt, with more fixes to urpmi to preserve previous behavior:
> 
> (perl-DateTime-TimeZone)
> https://abf.io/build_lists/2290221
> https://abf.io/build_lists/2290222
> 
> (perl-Time-ZoneInfo)
> https://abf.io/build_lists/2289209
> https://abf.io/build_lists/2289208
> 
> (urpmi)
> https://abf.io/build_lists/2311141
> https://abf.io/build_lists/2311140

Without patches urpmi select mirror mirror.rosalab.ru.
With patches urpmi select mirror mirror.yandex.ru

But what should we expect?
Comment 9 Denis Silakov 2014-10-20 19:25:50 MSD
I expected urpmi to behave identically in both cases. But I see the issue, will provide one more fix soon.
Comment 10 Denis Silakov 2014-10-20 19:43:56 MSD
Please try these ones:

(perl-DateTime-TimeZone)
https://abf.io/build_lists/2290221
https://abf.io/build_lists/2290222

(perl-Time-ZoneInfo)
https://abf.io/build_lists/2289209
https://abf.io/build_lists/2289208

(urpmi)
https://abf.io/build_lists/2316517
https://abf.io/build_lists/2316516

urpmi behavior should not change, but the issue in perl-Time-ZoneInfo and perl-DateTime-TimeZone should be fixed.
Comment 11 FirstLevel 2014-10-22 10:06:32 MSD
(In reply to comment #10)
> Please try these ones:
> 
> (perl-DateTime-TimeZone)
> https://abf.io/build_lists/2290221
> https://abf.io/build_lists/2290222
> 
> (perl-Time-ZoneInfo)
> https://abf.io/build_lists/2289209
> https://abf.io/build_lists/2289208
> 
> (urpmi)
> https://abf.io/build_lists/2316517
> https://abf.io/build_lists/2316516
> 
> urpmi behavior should not change, but the issue in perl-Time-ZoneInfo and
> perl-DateTime-TimeZone should be fixed.

How should I check this issue for new packages?
Comment 12 Denis Silakov 2014-10-22 15:47:39 MSD
Launch the following command from command line:

perl -e "require Time::ZoneInfo; print Time::ZoneInfo->current_zone"

With old packages, it prints nothing. With new packages, it should print your timezone.
Comment 13 FirstLevel 2014-10-22 22:09:33 MSD
(In reply to comment #12)
> Launch the following command from command line:
> 
> perl -e "require Time::ZoneInfo; print Time::ZoneInfo->current_zone"
> 
> With old packages, it prints nothing. With new packages, it should print
> your timezone.

OLD URPMI -------------------
I have follow this scenario:
1. remove sources
2. delete urpmi cache
3. add sources
4. try urpmi --debug --auto-update 
and have got 
ftp://mirror.yandex.ru/ru
and have such output
[root@r4 cache]# perl -e "require Time::ZoneInfo; print Time::ZoneInfo->current_zone"
Europe/Moscow
with such versions of urpmi
[root@r4 cache]# rpm -qa | grep urpmi
urpmi-7.32.3-18-rosa2014.1.noarch
gurpmi-7.32.3-18-rosa2014.1.noarch


NEW URPMI an other packages-------------------
I have follow this scenario:
1. remove sources
2. delete urpmi cache
3. add sources (it is very very very slow process. More that 30 minutes )
and have got 
ftp://mirror.yandex.ru/ru
But it is very very slow process too.
I think such speed regress is ugly

P.S. see output of requested commands for old version of urpmi.
Comment 14 Denis Silakov 2014-10-23 23:55:50 MSD
(In reply to comment #13)

> OLD URPMI -------------------
> I have follow this scenario:
> 1. remove sources
> 2. delete urpmi cache
> 3. add sources
> 4. try urpmi --debug --auto-update 
> and have got 
> ftp://mirror.yandex.ru/ru
> and have such output
> [root@r4 cache]# perl -e "require Time::ZoneInfo; print
> Time::ZoneInfo->current_zone"
> Europe/Moscow
> with such versions of urpmi
> [root@r4 cache]# rpm -qa | grep urpmi
> urpmi-7.32.3-18-rosa2014.1.noarch
> gurpmi-7.32.3-18-rosa2014.1.noarch
> 

Which version of perl-Time-Zoneinfo wasused here? The output of that command depends only on version of perl-Time-Zoneinfo, not urpmi.
Comment 15 FirstLevel 2014-10-24 07:23:40 MSD
(In reply to comment #14)
> (In reply to comment #13)
> 
> > OLD URPMI -------------------
> > I have follow this scenario:
> > 1. remove sources
> > 2. delete urpmi cache
> > 3. add sources
> > 4. try urpmi --debug --auto-update 
> > and have got 
> > ftp://mirror.yandex.ru/ru
> > and have such output
> > [root@r4 cache]# perl -e "require Time::ZoneInfo; print
> > Time::ZoneInfo->current_zone"
> > Europe/Moscow
> > with such versions of urpmi
> > [root@r4 cache]# rpm -qa | grep urpmi
> > urpmi-7.32.3-18-rosa2014.1.noarch
> > gurpmi-7.32.3-18-rosa2014.1.noarch
> > 
> 
> Which version of perl-Time-Zoneinfo wasused here? The output of that command
> depends only on version of perl-Time-Zoneinfo, not urpmi.

[root@r4 ~]# rpm -qa | grep perl-Time-ZoneInfo-0.300.0-11-rosa2014.1.noarch
perl-Time-ZoneInfo-0.300.0-11-rosa2014.1.noarch
[root@r4 ~]# perl -e "require Time::ZoneInfo; print Time::ZoneInfo->current_zone"
Europe/Moscow[root@r4 ~]#
Comment 16 Denis Silakov 2014-10-24 08:18:34 MSD
Ah, I see. Check who owns the /etc/sysconfig/clock file:

rpm -qf /etc/sysconfig/clock

If it is not owned by any package, remove it and try again.
Comment 17 FirstLevel 2014-10-24 11:13:59 MSD
(In reply to comment #16)
> Ah, I see. Check who owns the /etc/sysconfig/clock file:
> 
> rpm -qf /etc/sysconfig/clock
> 
> If it is not owned by any package, remove it and try again.

Ooops...
[sergei@r4 ~]$ rpm -qf /etc/sysconfig/clock
файл /etc/sysconfig/clock не принадлежит ни одному из пакетов
Comment 18 FirstLevel 2014-10-27 16:02:01 MSK
(In reply to comment #16)
> Ah, I see. Check who owns the /etc/sysconfig/clock file:
> 
> rpm -qf /etc/sysconfig/clock
> 
> If it is not owned by any package, remove it and try again.

Yes, without file I have no any output
[root@r4 ~]# rpm -qf /etc/sysconfig/clock 
файл /etc/sysconfig/clock не принадлежит ни одному из пакетов
[root@r4 ~]# rm /etc/sysconfig/clock 
rm: удалить обычный файл «/etc/sysconfig/clock»? y
[root@r4 ~]# perl -e "require Time::ZoneInfo; print Time::ZoneInfo->current_zone"


But As I said urpmi is very slow with new packages.
Comment 19 Denis Silakov 2014-10-27 16:53:47 MSK
Ok. Currently I can't say why urpmi slows down in the latest variant, will dig into it later.

This issue is not critical, so let's postpone this fix for now.
Comment 20 Denis Silakov 2015-02-27 00:45:14 MSK
Some time ago we have finally updated perl-Time-ZoneInfo with a patch which allows it working in either situation (either with /etc/timezone or with other files). There were no problems reported so far, so let's say that we are satisfied for now. It would be better to implement some smarter algorithm of mirror selection (e.g, choose the fastest one), but this is a topic for a different bug.