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

Bug 92843

Summary: [EBUILD] update: app-cdr/sync2cd-1.1.ebuild
Product: Gentoo Linux Reporter: Remy Blank <remy>
Component: New packagesAssignee: App-Backup Team <app-backup>
Status: RESOLVED FIXED    
Severity: enhancement CC: j.habenicht, python
Priority: Normal Keywords: EBUILD
Version: unspecified   
Hardware: All   
OS: All   
URL: http://www.calins.ch/software/sync2cd.html
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: sync2cd-0.9.ebuild
sync2cd-1.1.ebuild

Description Remy Blank 2005-05-16 15:53:09 UTC
New ebuild for sync2cd-0.9.
Comment 1 Remy Blank 2005-05-16 15:54:54 UTC
Created attachment 59064 [details]
sync2cd-0.9.ebuild

To be put into app-cdr/sync2cd.
Comment 2 Daniel Black (RETIRED) gentoo-dev 2005-06-08 06:47:41 UTC
looks good  
Comment 3 Remy Blank 2005-06-08 07:28:02 UTC
Is it normal that the ebuild has to call python_mod_compile in pkg_postinst to
compile the python modules? Wasn't this automatic before?

I see at least one other ebuild (gnome-python) calls python_mod_optimize, and
python_mod_cleanup in pkg_postrm. Should the latter also be added?
Comment 4 Daniel Black (RETIRED) gentoo-dev 2005-06-08 14:38:45 UTC
Remy,  
  
You're right - python_mod_compile in src_install is a bit odd. I'm not sure if 
anything has changed as I don't maintain many (any?) python modules. 
 
I'd look for more examples of dist eclass usage. When I get around to this one 
I'll consult some of the more python savy devs. 
Comment 5 Remy Blank 2005-06-09 00:54:33 UTC
Looking at distutils_src_install(), it seems that starting with python-2.3,
modules are not compiled through distutils anymore, but later in
distutils_pkg_postinst(), where python_mod_optimize() is called with every
module in PYTHON_MODNAME. This will compile the modules, but only if they are
packages, i.e. subdirectories of /usr/lib/pythonX.Y/site-packages.

This ebuild, however, installs just one file at this location. The comment at
the beginning of python_mod_compile() seems to indicate that this is the
function to call for the job. That's why I added the call in pkg_postinst().

Would it make sense to change distutils_pkg_postinst() to call
python_mod_compile() if a module in PYTHON_MODNAME is a file instead of a
directory? I could write a patch for that, if it does.
Comment 6 Daniel Black (RETIRED) gentoo-dev 2005-06-09 05:27:21 UTC
python people - any comment on comment #5 
Comment 7 Remy Blank 2005-07-11 22:45:06 UTC
Daniel,

I noticed you added an ebuild for sync2cd-0.9 to portage, pretty much identical
to the old 0.8 ebuild. Did you get any answers to the questions above? I'm
always interested in improving my ebuild writing skills ;-)
Comment 8 Daniel Black (RETIRED) gentoo-dev 2005-07-12 22:33:26 UTC
sorry Remy - I'm not that familiar with the internals of python building. 
 
I was hoping on of the python herd members could answer your question. 
Comment 9 Remy Blank 2005-07-13 00:05:12 UTC
No problem. But would it be possible to add the dependency on virtual/eject, as
it is used during restore, and to add the src_test() function so that the unit
tests are run? This would allow catching platform-specific bugs.

RDEPEND="virtual/eject"

src_test() {
	cd ${S}/tests
	./runTests.py || die "Unit tests failed"
}
Comment 10 Remy Blank 2006-04-07 12:09:12 UTC
Version 1.0 is out.
Comment 11 Remy Blank 2006-04-07 12:10:49 UTC
Created attachment 84149 [details]
sync2cd-1.1.ebuild

Ebuild for new version.

I added running of the test suite during the test phase.
Comment 12 Remy Blank 2006-05-07 10:01:17 UTC
Comment on attachment 84149 [details]
sync2cd-1.1.ebuild

Version 1.1 is out. Massively decreased memory usage for large archives.
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2006-05-12 05:08:43 UTC
*** Bug 133105 has been marked as a duplicate of this bug. ***
Comment 14 Lisa Seelye (RETIRED) gentoo-dev 2006-06-27 08:30:38 UTC
Fixed In CVS