Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308295 - app-arch/hardlink: Verify and potentially improve Python-related code
Summary: app-arch/hardlink: Verify and potentially improve Python-related code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Highest normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 308257
  Show dependency tree
 
Reported: 2010-03-07 17:09 UTC by Arfrever Frehtes Taifersar Arahesis (RETIRED)
Modified: 2012-05-19 11:01 UTC (History)
1 user (show)

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


Attachments
ebuild patch (hardlink.patch,910 bytes, patch)
2011-11-12 10:50 UTC, Ian Delaney (RETIRED)
Details | Diff
ebuild patch revised (hardlink.patch,893 bytes, text/plain)
2011-11-14 09:08 UTC, Ian Delaney (RETIRED)
Details
ebuild patch revised (hardlink.patch,842 bytes, patch)
2011-11-14 20:01 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:09:07 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 10:50:20 UTC
Created attachment 292267 [details, diff]
ebuild patch

A tiny package.

Tested python 2.6 2.7 3.1 3.2, bump EAPI3, all AOK
Comment 2 Arfrever Frehtes Taifersar Arahesis 2011-11-13 02:06:52 UTC
(In reply to comment #1)

Please also test run-time behavior. hardlink.py contains Python-2-specific syntax.

Use PYTHON_DEPEND="2".
Such pkg_setup() is not needed.
python_convert_shebangs() should be used.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2011-11-14 09:08:26 UTC
Created attachment 292487 [details]
ebuild patch revised
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2011-11-14 20:01:04 UTC
Created attachment 292549 [details, diff]
ebuild patch revised

tested, ok
Comment 5 Francesco Riosa 2011-11-18 08:46:00 UTC
spit out by dracut:

D: 33972        /var/tmp/initramfs.s1RP3C
D: 33972        total
  File "/usr/bin/hardlink", line 77
    print 'Comparing', self.path, 'to', other.path
                    ^
SyntaxError: invalid syntax

hardlink is written for python:2, the converter 2to3 should suffice to upgrade, if the result is still compatible with python:2 it should be an easy update.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2012-05-19 10:24:13 UTC
This is fixed by 0.2.0 because it doesn't use python anymore, it's plain C from what I can see.