Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 386625 - sys-process/at-3.1.10.2-r1: duplicate job ids after ebuild re-emerge
Summary: sys-process/at-3.1.10.2-r1: duplicate job ids after ebuild re-emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 09:12 UTC by Christian Kauhaus
Modified: 2011-10-10 10:44 UTC (History)
1 user (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 Christian Kauhaus 2011-10-10 09:12:14 UTC
When I emerge sys-process/at, the file /var/spool/at/atjobs/.SEQ gets overwritten and at job ids start again with 1. This is problematic since (1) job ids are not unique anymore and (2) job ids are not monotonically increasing. In addition, re-emerging at while at jobs are still running leads to additional weird effects if id collisions are involved.

I suggest that the ebuild should be changed to touch the .SEQ file into existence but not overwrite it once it is there.

Reproducible: Always

Steps to Reproduce:
$ echo true | at now
warning: commands will be executed using /bin/sh
job 1 at Mon Oct 10 11:01:00 2011
$ echo true | at now
warning: commands will be executed using /bin/sh
job 2 at Mon Oct 10 11:01:00 2011
# emerge -1q sys-process/at
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) sys-process/at-3.1.10.2-r1
>>> Installing (1 of 1) sys-process/at-3.1.10.2-r1
Actual Results:  
$ echo true | at now
warning: commands will be executed using /bin/sh
job 1 at Mon Oct 10 11:11:00 2011

Expected Results:  
$ echo true | at now
warning: commands will be executed using /bin/sh
job 3 at Mon Oct 10 11:11:00 2011

emerge --info
Portage 2.1.10.11 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.3, glibc-2.12.2-r0, 2.6.39-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.39-gentoo-r3-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-gentoo-2.0.3
Timestamp of tree: Mon, 03 Oct 2011 15:15:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.4.6, 2.5.4-r4, 2.6.6-r2, 2.7.1-r1, 3.1.3-r1
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA AdobeFlash-10.1 dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/gtk-2.0 /etc/init.d /etc/php/apache2-php5.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /usr/share/X11/xkb"
CXXFLAGS="-O2 -pipe -march=core2"
DISTDIR="/var/tmp/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=2 --load-average=2"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
FFLAGS=""
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ "
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="de en en_US en_GB el la nl"
MAKEOPTS="-j2 -l2"
PKGDIR="/var/tmp/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 applet async augeas autoipd avahi bash-completion battery berkdb bluetooth branding bzip2 cairo caps cdda cdr cgi cli consolekit cpufreq cracklib crypt cscope cups curl cxx dbus dell device-mapper dhcp dhcpcd directfb divx dovecot-sasl dri dts dvd dvdr dvi emboss emerald encode epiphany evo exif extras fam fastcgi ffmpeg firefox flac fontconfig fts3 gcj gd gdbm gdu gedit geoip gif git gmedia gmp gnome gnome-keyring gnutls gphoto gpm graphics gstreamer gtk humanities iconv id3 id3tag ieee1394 imap inifile iproute2 ipv6 irmc jack java jpeg jpeg2k jpgraph json kpathsea ladspa lame laptop lash lcms ldap libnotify libsamplerate libv4l2 lightning lm_sensors logrotate lua lzma mad managesieve mdnsresponder-compat mhash midi mmx mng modules mozdevelop mozdom mp3 mp4 mpeg mudflap multilib music mysql nautilus ncurses network networkmanager nls nptl nptlonly nsplugin nss nvidia ogg opengl openmp pam pango passwordsave pcre pdf perl php png policykit postgres ppds pppd publishers pulseaudio python qt3support qt4 raw readline realmedia replaygain replytolist rtsp ruby samba sasl science sdl session sftp sieve simplexml slp smime sms smtp sndfile spell sqlite sqlite3 sse sse2 ssl startup-notification subversion suexec svg symlink sysfs syslog tcpd tex4ht theora tidy tiff tk tokenizer tools truetype udev unicode usb v4l2 vamp vhosts vim-syntax visualization vorbis webdav wifi x264 xattr xcb xcomposite xetex xinerama xinetd xml xmlrpc xmp xorg xscreensaver xulrunner xv xvid zeroconf zip zlib" ALSA_CARDS="hdsp hdspm emu10k1x" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="canon directory" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_US en_GB el la nl" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-10-10 10:44:20 UTC
+  10 Oct 2011; Lars Wendler <polynomial-c@gentoo.org> at-3.1.10.2-r1.ebuild,
+  at-3.1.10.2-r2.ebuild, at-3.1.13.ebuild:
+  non-maintainer commit: Don't install .SEQ file when it's already installed.
+  Thanks to Christian Kauhaus who reported this in bug #386625.
+