Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 128194 - app-portage/genlop-0.30.5 Date::Manip error when using --date yesterday
Summary: app-portage/genlop-0.30.5 Date::Manip error when using --date yesterday
Status: RESOLVED NEEDINFO
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-30 18:59 UTC by Matthias Langer
Modified: 2022-10-20 02:33 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Langer 2006-03-30 18:59:23 UTC
While filing this bug, "$ date" prints "Fri Mar 31 04:54:06 CEST 2006", 
"$ genlop --list --date today" prints nothing, but
"$ genlop --list --date yesterday" prints

....
....
Thu Mar 30 23:35:09 2006 >>> app-text/docbook-xml-dtd-4.4-r1
Thu Mar 30 23:44:23 2006 >>> sys-apps/busybox-1.1.0
Fri Mar 31 03:02:12 2006 >>> www-client/mozilla-firefox-1.0.7-r4
Fri Mar 31 03:16:37 2006 >>> gnome-base/gnome-applets-2.12.3
Fri Mar 31 03:20:32 2006 >>> dev-lang/swig-1.3.21

I guess this is a bug ....

Portage 2.0.54 (default-linux/x86/no-nptl, gcc-3.4.5, glibc-2.3.5-r3, 2.6.15.6 i686)
=================================================================
System uname: 2.6.15.6 i686 Celeron (Coppermine)
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inode.at/ "
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X alsa audiofile avi berkdb bitmap-fonts bzip2 cairo cdrom cli crypt css ctype cups dba dbus dri emboss evo exif expat fam fame fastbuild firefox flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 hal imlib ipv6 java jpeg lcms libg++ libwww mad memlimit mikmod mmx mmxext mng motif mp3 mpeg nautilus ncurses nls nsplugin ogg oggvorbis opengl pam pcre pdflib perl png posix python quicktime readline real sdl session simplexml soap sockets spell spl sse ssl tcpd theora tiff tokenizer truetype truetype-fonts type1-fonts udev unicode usb userlocales utf8 vcd win32codecs xml xml2 xsl xv zlib linguas_en linguas_de userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 1 lotso 2007-07-21 13:52:40 UTC
genlop --list --date yesterday
ERROR: Date::Manip unable to determine TimeZone.
 at /usr/lib/perl5/vendor_perl/5.8.8/Date/Manip.pm line 3635
        Date::Manip::Date_TimeZone called at /usr/lib/perl5/vendor_perl/5.8.8/Date/Manip.pm line 676
        Date::Manip::Date_Init() called at /usr/lib/perl5/vendor_perl/5.8.8/Date/Manip.pm line 1446
        Date::Manip::ParseDate('ARRAY(0x8142978)') called at /usr/bin/genlop line 200
        main::parse('--date') called at /usr/bin/genlop line 948

I've already recompiled DateManip w/ no avail.

What's up with this anyway? Is my Timezone wrong??


Comment 2 Jimmy.Jazz 2007-08-17 13:01:58 UTC
(In reply to comment #1)
Same problem and it appends only when the user also in group portage isn't root.

root reads /etc/localtime, but a user doesn't. (same bash environment, TZ not set)

ls -l /etc/localtime gives,
-rw-r--r-- 1 root root 2945 May  8 13:10 /etc/localtime

# genlop --list --date 3 days ago
Result when root executes the command:

--- SIGCHLD (Child exited) @ 0 (0) ---
read(3, "", 4096)                       = 0
fstat64(3, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
close(3)                                = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
waitpid(19741, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0) = 19741
rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
stat64("/etc/TIMEZONE", 0x81680c8)      = -1 ENOENT (No such file or directory)
stat64("/etc/timezone", 0x81680c8)      = -1 ENOENT (No such file or directory)
time(NULL)                              = 1187346459
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2945, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7bae000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\f\0\0\0\f\0\0"..., 4096) = 2945
close(3)                                = 0
munmap(0xb7bae000, 4096)                = 0
time(NULL)                              = 1187346459
time(NULL)                              = 1187346459
time(NULL)                              = 1187346459
stat64("/var/log/emerge.log", {st_mode=S_IFREG|0660, st_size=71079, ...}) = 0
open("/var/log/emerge.log", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfb86330) = -1 ENOTTY (Inappropriate ioctl for device)
_llseek(3, 0, [0], SEEK_CUR)            = 0
fstat64(3, {st_mode=S_IFREG|0660, st_size=71079, ...}) = 0
read(3, "1187027930: Started emerge on: A"..., 4096) = 4096
_llseek(3, 512, [512], SEEK_SET)        = 0
_llseek(3, 0, [512], SEEK_CUR)          = 0
close(3)                                = 0

A different result when a user is used instead,

--- SIGCHLD (Child exited) @ 0 (0) ---
close(6)                                = 0
ioctl(4, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf8e27f0) = -1 EINVAL (Invalid argument)
_llseek(4, 0, 0xbf8e2810, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
fstat64(4, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
read(4, "", 4096)                       = 0
close(4)                                = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
waitpid(16015, [{WIFSIGNALED(s) && WTERMSIG(s) == SIGPIPE}], 0) = 16015
rt_sigaction(SIGHUP, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGINT, {SIG_DFL}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL}, NULL, 8) = 0
stat64("/etc/TIMEZONE", 0x81680c8)      = -1 ENOENT (No such file or directory)
stat64("/etc/timezone", 0x81680c8)      = -1 ENOENT (No such file or directory)
stat64("/etc/perl/Carp/Heavy.pmc", 0xbf8e29ec) = -1 ENOENT (No such file or directory)
stat64("/etc/perl/Carp/Heavy.pm", 0xbf8e292c) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/vendor_perl/5.8.8/i686-linux-thread-multi/Carp/Heavy.pmc", 0xbf8e29ec) = -1 ENOENT (No such file or directory)
stat64("/usr/lib/perl5/vendor_perl/5.8.8/i686-linux-thread-multi/Carp/Heavy.pm", 

[...]

        Date::Manip::ParseDate('ARRAY(0x81693a8)') called at /usr/bin/genlop line 200
        main::parse('--date') called at /usr/bin/genlop line 948
) = 434
exit_group(2)                           = ?
Process 16013 detached

Other strangeness when following the timezone man page.

for an unprivileged user but in portage group,
TZ=MET works
TZ=:MET doesn't
TZ=:Europe/Paris doesn't
TZ=Europe/Paris doesn't

All have successfully opened the TZ file in /usr/share/zoneinfo

Could that be a bug in perl /usr/lib/perl5/vendor_perl/5.8.8/Date/Manip.pm file ?

versions used:

app-i18n/man-pages-fr-2.39.0
app-portage/genlop-0.30.7
app-shells/bash-3.2_p17
dev-lang/perl-5.8.8-r2 

Thx

Jj
Comment 3 michael@smith-li.com 2008-02-26 20:36:30 UTC
OK: Comment #0 is not a bug.

genlop --help says:

--date datestring1 [ --date datestring2]  only shows results between datestring1
       and datestring2. datestring2 dafaults to "now" if not explicitly set.
       (e.g. genlop --list --date 3 days ago)

In other words, if datestring1 is 'today' you're asking it to list all packages emerged between "today" and "now". Since today == now, that should always be empty.

As for comment #1 and comment #2: I haven't been able to reproduce this problem yet.

If you are still seeing this problem please show me how your TIMEZONEs are set up by attaching the contents of /etc/conf.d/clock and showing me what version of sys-libs/timezone-data you have.