Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 301311

Summary: gnome2.eclass installs empty /var/lib for many packages
Product: Gentoo Linux Reporter: SpanKY <vapier>
Component: EclassesAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: enhancement CC: esigra, sera
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 262490    
Attachments: gnome2.eclass.patch
gnome2-utils.eclass.patch

Description SpanKY gentoo-dev 2010-01-17 21:05:54 UTC
gnome2_src_install does:
    local sk_tmp_dir="/var/lib/scrollkeeper"
    dodir "${sk_tmp_dir}"
...
    rm -rf "${D}${sk_tmp_dir}"
...

unfortunately, this causes many packages to leave behind an empty /var/lib when they otherwise dont need/care about it.  perhaps after the `rm -rf`, you add:
    rmdir "${D}"/var/lib "${D}"/var >& /dev/null # don't leave empty dirs

also, the install line looks weird:
emake ... "scrollkeeper_localstate_dir=${D}${sk_tmp_dir} " ...

are you sure there's supposed to be a trailing space there ?
Comment 1 Pacho Ramos gentoo-dev 2011-02-04 09:47:29 UTC
I am not sure if this is still needed now that scrollkeeper is not being used :-|
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2011-02-04 10:08:33 UTC
well, scrollkeeper is still used by some packages but the problem is that the eclass is a bit stupid and creates to directory anyway. The whole scrollkeeper handling needs reviewing imho.
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-04-14 18:41:43 UTC
Created attachment 308963 [details, diff]
gnome2.eclass.patch

This patch:
  * passes --disable-scrollkeeper when the argument exists (number of ebuilds doing this by hand)
  * removes /var/lib/scrollkeeper up to /var if the folder is empty in order to leave no traces in the package content file
  * uses gnome2_scrollkeeper_savelist which is coming in gnome2-utils.eclass patch
  * drops useless checks around gnome2_scrollkeeper_update due to changes in gnome2-utils.eclass patch

As a result SCROLLKEEPER_UPDATE variable has no effect at all anymore (only 3 ebuilds using it, that I'll work on cleaning up asap).
Comment 4 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-04-14 18:44:51 UTC
Created attachment 308965 [details, diff]
gnome2-utils.eclass.patch

This patch:
  * defines a new variable GNOME2_ECLASS_SCROLLS which contains the list of scrolls installed by the package
  * updates gnome2_scrollkeeper_update to match other updater function behavior
  * adds a gnome2_scrollkeeper_savelist function that finds and saves scrolls
  * adds gnome-doc-utils.make to the list of makefiles to modify
  * provides a little fix for a test in gnome2_omf_fix (looked like a typo)
Comment 5 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-05-02 15:58:10 UTC
*** Bug 413975 has been marked as a duplicate of this bug. ***
Comment 6 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-05-02 21:13:25 UTC
FTR, since there were no complaints, I commited the changes with
appropriate ebuild modifications for camorama (with glib-2.32 build
fixes), ekiga and gtetrinet.

If there is any problem with it, feel free to ping me on irc or by mail.


And finally all gnome2 inheriting ebuilds will not have /var/lib in vdb.
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2012-05-02 21:16:00 UTC
And closing now. Thanks all.