Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176644 - net-print/hplip-1.7.4a writes 0 byte config file into /-directory
Summary: net-print/hplip-1.7.4a writes 0 byte config file into /-directory
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Denis Dupeyron (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-01 03:57 UTC by Heiko Baums
Modified: 2009-07-20 11:16 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 Heiko Baums 2007-05-01 03:57:26 UTC
net-print/hplip-1.7.4a always writes a 0 byte file .hplip.conf into the /-directory where a config file definitively doesn't belong.

It possibly doesn't read the config file from the right places /etc/hp/hplip.conf or ~/.hplip.conf.


emerge --info:

Portage 2.1.2.5 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r1, 2.6.20-gentoo-r6 i686)
=================================================================
System uname: 2.6.20-gentoo-r6 i686 AMD Athlon(tm) XP 1600+
Gentoo Base System release 1.12.10
Timestamp of tree: Sun, 29 Apr 2007 16:00:10 +0000
dev-java/java-config: 1.3.7, 2.0.31-r7
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/"
LANG="de_DE.UTF-8"
LINGUAS="de"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/usr/var"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/portage/local/private"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib accessibility acl acpi alsa apache2 apm arts asf audiofile avi berkdb bitmap-fonts bluetooth bzip2 cairo caps cdda cddb cdparanoia cdr chardet chipcard cli cracklib crypt cups curl d dbus dga directfb divx dlloader doc dri dv dvb dvd dvdnav dvdr dvdread eds effects emboss encode evo expat extrafilters fam fame fbcon ffmpeg firefox flac foomaticdb fortran ftp gcc-libffi gcj gd gdbm geldkarte gif gimp glib glitz gmedia gmp gnutls gpm graphviz gs gstreamer gtk gtk2 gtkhtml hbci iconv idn ilbc imagemagick imlib inkjar ipv6 irmc isdnlog jack jack-tmpfs jce jpeg kde kerberos ladspa lcms ldap libg++ libnotify libsamplerate lirc live lm_sensors mad mbox mbrola md5sum midi mikmod mjpeg mmx mmx2 mmxext mng modplug motif mozilla mp2 mp3 mp4 mpeg mplayer musicbrainz mysql mysqli nas ncurses network nls noamazon nptl nptlonly nsplugin ntfs nvidia objc objc++ objc-gc odbc offensive ofx ogg oggvorbis opengl osc oss pam pcre pdf perl php plugin png ppds pppd print python qmail-spp qt qt3 qt3support qt4 quicktime quotes rar readline real realmedia reflection reiserfs rtc rtsp scanner sdl session slideshow smime speex spell spl sqlite sse sse-filters ssl svg svga tcl tcltk tcpd tetex themes theora threads threadsafe tidy tiff tk tokenizer tools truetype truetype-fonts type1-fonts udev unicode usb utempter v4l v4l2 vdr vidix visualization vlm vorbis win32codecs wma wmf wmp x86 xcomposite xine xml xml2 xorg xpm xv xvid yv12 zip zlib zrtp" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" LIRC_DEVICES="devinput" USERLAND="GNU" VIDEO_CARDS="nvidia v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Denis Dupeyron (RETIRED) gentoo-dev 2007-05-02 06:45:33 UTC
Kinda confirmed. I found that file on my disk, and deleted it. I checked the package contents, and re-emerged hplip to be real sure, and it doesn't come from the ebuild. I then restarted the hplip and cupsd services, and it didn't reappear. I played a bit with the GUI front-end, and it didn't come back either. That was yesterday.

This morning I check my root, and it's there again. I remove it, restart the hplip and cupsd services, ant it doesn't come back.

I'll need to investigate. In the meantime, if you can obtain any clue to this mystery, please let us know.

Denis.
Comment 2 Heiko Baums 2007-05-02 11:06:10 UTC
I'll do. My first thought was about a possible typo somewhere in the source code but I couldn't check the source code, yet. Maybe that somewhere where the config file is read or written a ~ is missing before the / in the path or something like this.
Comment 3 Heiko Baums 2007-05-02 11:38:28 UTC
I'm not sure if this helps but I've quickly greped the source code for hplip.conf. I don't know python but maybe I found something.

These were the only parts in grep's search result where no path for .hplip.conf is given. Maybe the problem is with the function pwd.getpwnam or os.path.join. But I don't know for what these scripts are used.


setup.py: line 642:

        if username:
            import pwd
            user_path = pwd.getpwnam(username)[5]
            user_config_file = os.path.join(user_path, '.hplip.conf')

            if os.path.exists(user_config_file):
                cfg = Config(user_config_file)
                cfg.last_used.device_uri = print_uri


ui/setupform.py: line 834:

        if self.username:
            import pwd
            user_path = pwd.getpwnam(self.username)[5]
            user_config_file = os.path.join(user_path, '.hplip.conf')

            if os.path.exists(user_config_file):
                cfg = Config(user_config_file)
                cfg.last_used.device_uri = self.device_uri
Comment 4 Denis Dupeyron (RETIRED) gentoo-dev 2007-07-22 15:24:57 UTC
This doesn't seem to be the case anymore with the new 2.7.6 release (at least for me). Please test it on your system (see bug #183022).

I'm not closing this WORKSFORME, but TEST-REQUEST instead. Comments welcome.

Denis.
Comment 5 Heiko Baums 2007-07-24 09:18:59 UTC
With 2.7.6 this bug seems to be fixed for me, too.
Comment 6 Daniel Pielmeier gentoo-dev 2009-07-20 11:16:54 UTC
Reopen to mark as fixed.