Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390153 - sys-power/nut-2.6.2 fails to build if python is python3
Summary: sys-power/nut-2.6.2 fails to build if python is python3
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on: 406099
Blocks: 415635
  Show dependency tree
 
Reported: 2011-11-11 06:01 UTC by Alexandre Rostovtsev (RETIRED)
Modified: 2012-06-02 17:56 UTC (History)
1 user (show)

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


Attachments
whitespace fix (nut-2.6.2-whitespace-fix.patch,346 bytes, patch)
2012-03-29 14:38 UTC, Blu3
Details | Diff
replace the outdated "file" builtin reference and automatically close after reading (nut-2.6.2-fd-leak-fix.patch,495 bytes, patch)
2012-03-29 14:39 UTC, Blu3
Details | Diff
patch to update ebuild to include these two patches (x,464 bytes, patch)
2012-03-29 14:41 UTC, Blu3
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-11 06:01:09 UTC
# eselect python set python3.2
# emerge nut
[...]
make[3]: Leaving directory `/var/tmp/portage/sys-power/nut-2.6.2/work/nut-2.6.2/tools/nut-scanner'
make[2]: Leaving directory `/var/tmp/portage/sys-power/nut-2.6.2/work/nut-2.6.2/tools/nut-scanner'
Regenerating the SNMP helper files.
  File "../tools/nut-snmpinfo.py", line 119
    sysoid = ""
              ^
TabError: inconsistent use of tabs and spaces in indentation
make[1]: *** [nut-scanner-deps] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-power/nut-2.6.2/work/nut-2.6.2/tools'
make: *** [all-recursive] Error 1
emake failed

Note: sys-power/nut-2.6.2 emerges correctly if python is python2.7
Comment 1 Blu3 2012-03-29 14:38:35 UTC
Created attachment 307089 [details, diff]
whitespace fix

patch #1 fixes the stray ' ' prior to a \t for whitespace correctness
Comment 2 Blu3 2012-03-29 14:39:27 UTC
Created attachment 307091 [details, diff]
replace the outdated "file" builtin reference and automatically close after reading

patch #2 replaces "file(...)" with: "with open(...) as f" to deal with the outdated "file" builtin reference and to also close the file descriptor automatically
Comment 3 Blu3 2012-03-29 14:41:38 UTC
Created attachment 307093 [details, diff]
patch to update ebuild to include these two patches

patch to update ebuild to include these two patches
Comment 4 Guillaume Castagnino 2012-04-10 20:09:24 UTC
Just to notice: this is fixed by update to 2.6.3 here: #406099 :)
Comment 5 Michael Weber (RETIRED) gentoo-dev 2012-06-02 17:45:38 UTC
let's fix this with bug 406099