Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308317 - app-cdr/burn-cd: Verify and potentially improve Python-related code
Summary: app-cdr/burn-cd: Verify and potentially improve Python-related code
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Highest normal (vote)
Assignee: Gentoo Optical Media project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-07 17:18 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2015-10-03 09:27 UTC (History)
2 users (show)

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


Attachments
ebuild patch (burn-cd.patch,1.86 KB, patch)
2011-11-12 09:11 UTC, Ian Delaney (RETIRED)
Details | Diff
ebuild patch revised (burn-cd.patch,1.76 KB, patch)
2011-11-14 08:10 UTC, Ian Delaney (RETIRED)
Details | Diff
revised ebuild patch (burn-cd.patch,1.75 KB, patch)
2011-11-15 06:03 UTC, Ian Delaney (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-03-07 17:18:22 UTC
- If this package could support installation for multiple versions of Python,
  then please try to adjust the ebuilds to support it.
- Ensure that the ebuilds do not use deprecated functions or variables.
- Please check if Python 3 is supported by this package.
- If this package does not support Python 3:
  - Specify dependency on Python 2.
    You can use PYTHON_DEPEND helper variable, which should be set before
    inheriting of python eclass.
  - If this package cannot support installation for multiple versions of
    Python, then set active version of Python using
    python_set_active_version().
  - Ensure that shebangs in installed scripts specify correct version of
    Python. If shebangs are too generic (e.g. '#!/usr/bin/python'), then you
    can use python_convert_shebangs() to convert shebangs.
    (Wrapper scripts generated by python_generate_wrapper_scripts() do not
    require any changes.)

Please see documentation [1] for more details.
[1] http://www.gentoo.org/proj/en/Python/developersguide.xml
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2011-11-12 09:11:14 UTC
Created attachment 292263 [details, diff]
ebuild patch

Tested python 2.5 2.6 2.7 3.1 3.2
Again python 2.5 doesn't support. EAPI bump 3

Tested emerges, all aok.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-11-13 01:45:36 UTC
Use PYTHON_DEPEND="2" or maybe PYTHON_DEPEND="2:2.6".
Why do you think that this package doesn't work with Python 2.5?

Such pkg_setup() is not needed.
python_convert_shebangs() internally calls die().
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-11-14 08:10:25 UTC
Created attachment 292481 [details, diff]
ebuild patch revised

done
Comment 4 Arfrever Frehtes Taifersar Arahesis 2011-11-14 19:23:57 UTC
(In reply to comment #3)

PYTHON_DEPEND still wrong.
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2011-11-15 06:03:02 UTC
Created attachment 292589 [details, diff]
revised ebuild patch

ok, 3rd time lucky
Comment 6 Róbert Čerňanský 2014-11-23 13:15:33 UTC
I guess this should go to the tree because with Python 3 as default python interpreter burn-cd does not work:

-----------------------------------
# burn-cd 
  File "/usr/bin/burn-cd", line 162
    sys.stderr.write( '[CONFIG WARNING] line %d: input "%s" is not a string\n' % (number,`obj`) )
                                                                                         ^
SyntaxError: invalid syntax
-----------------------------------

Clearly the script is not compatible with Python 3 and shebangs are not converted:

# head -n 1 /usr/bin/burn-cd 
#!/usr/bin/python -O

Tested on stable amd64 for both burn-cd versions: stable 1.7.4 and testing 1.8.0 with same results.

# eselect python list
Available Python interpreters:
  [1]   python2.7
  [2]   python3.3
  [3]   python3.4 *
Comment 7 Pacho Ramos gentoo-dev 2015-10-03 09:27:39 UTC
This approach was changed by the -r1 python eclasses