Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301311 - gnome2.eclass installs empty /var/lib for many packages
Summary: gnome2.eclass installs empty /var/lib for many packages
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 413975 (view as bug list)
Depends on:
Blocks: gnome2.eclass
  Show dependency tree
 
Reported: 2010-01-17 21:05 UTC by SpanKY
Modified: 2012-05-02 21:16 UTC (History)
2 users (show)

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


Attachments
gnome2.eclass.patch (gnome2.eclass.patch,1.78 KB, patch)
2012-04-14 18:41 UTC, Gilles Dartiguelongue (RETIRED)
Details | Diff
gnome2-utils.eclass.patch (gnome2-utils.eclass.patch,2.86 KB, patch)
2012-04-14 18:44 UTC, Gilles Dartiguelongue (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.