I just installed python 2.7 and 3.2 on my g/fbsd-8.0: # eselect python list Available Python interpreters: [1] python2.6 * [2] python2.7 [3] python3.1 [4] python3.2 I run python-updater and it always fail with message "package:slot is not a valid package atom" after addind to list about 22 packages, even if I delete this package. Reproducible: Always Steps to Reproduce: 1. emerge python python:2.7 (maybe emerge -vuDN world) 2. python-updater 3. emerge -C package:slot (which is invalid) 4. python-updater 5. eselect python set 2 && eselect python set --python3 2 .. 10. python-updater 11. emerge -=app-admin/python-updater-0.7-r1 12. python-updater Actual Results: 2. * Starting Python Updater... * Main active version of Python: 2.6 * Active version of Python 2: 2.6 * Active version of Python 3: 3.1 * Adding to list: app-admin/webapp-config-1.50.18:0 * Adding to list: app-portage/gentoolkit-0.3.0_rc10-r1:0 * Adding to list: app-portage/layman-1.4.2-r2:0 * Adding to list: dev-lang/python-2.6.6-r1:2.6 * Adding to list: dev-lang/python-2.7.1-r1:2.7 * Adding to list: dev-lang/python-2.7.1-r1:2.7 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-libs/glib-2.28.8:2 * Adding to list: dev-libs/libgamin-0.1.10-r2:0 * Adding to list: dev-libs/libxml2-2.7.8:2 * Adding to list: dev-python/django-1.3:0 * Adding to list: dev-python/imaging-1.1.7:0 * Adding to list: dev-python/ipython-0.10.2:0 * Adding to list: dev-python/pexpect-2.4:0 * Adding to list: dev-python/psycopg-2.4.1:2 * Adding to list: dev-python/py-freebsd-0.9.3-r2:0 * Adding to list: dev-python/setuptools-0.6.14-r1:0 * Adding to list: dev-util/xdelta-3.0.0:3 * Adding to list: dev-vcs/git-1.7.5.3:0 * Adding to list: dev-vcs/subversion-1.6.16:0 * Adding to list: sys-apps/file-5.07-r2:0 * Adding to list: sys-devel/distcc-3.1-r5:0 * emerge -Dv1 --keep-going app-admin/webapp-config-1.50.18:0 app-portage/gentoolkit-0.3.0_rc10-r1:0 app-portage/layman-1.4.2-r2:0 dev-lang/python-2.6.6-r1:2.6 dev-lang/python-2.7.1-r1:2.7 dev-lang/python-2.7.1-r1:2.7 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.2:3.2 dev-lang/python-3.2:3.2 dev-libs/glib-2.28.8:2 dev-libs/libgamin-0.1.10-r2:0 dev-libs/libxml2-2.7.8:2 dev-python/django-1.3:0 dev-python/imaging-1.1.7:0 dev-python/ipython-0.10.2:0 dev-python/pexpect-2.4:0 dev-python/psycopg-2.4.1:2 dev-python/py-freebsd-0.9.3-r2:0 dev-python/setuptools-0.6.14-r1:0 dev-util/xdelta-3.0.0:3 dev-vcs/git-1.7.5.3:0 dev-vcs/subversion-1.6.16:0 sys-apps/file-5.07-r2:0 sys-devel/distcc-3.1-r5:0 !!! 'app-admin/webapp-config-1.50.18:0' is not a valid package atom. !!! Please check ebuild(5) for full details. 10. * Starting Python Updater... * Main active version of Python: 2.6 * Active version of Python 2: 2.6 * Active version of Python 3: 3.1 * Adding to list: dev-lang/python-2.6.6-r1:2.6 * Adding to list: dev-lang/python-2.7.1-r1:2.7 * Adding to list: dev-lang/python-2.7.1-r1:2.7 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-libs/glib-2.28.8:2 * Adding to list: dev-libs/libgamin-0.1.10-r2:0 * Adding to list: dev-libs/libxml2-2.7.8:2 * Adding to list: dev-python/django-1.3:0 * Adding to list: dev-python/imaging-1.1.7:0 * Adding to list: dev-python/ipython-0.10.2:0 * Adding to list: dev-python/pexpect-2.4:0 * Adding to list: dev-python/psycopg-2.4.1:2 * Adding to list: dev-python/py-freebsd-0.9.3-r2:0 * Adding to list: dev-python/setuptools-0.6.14-r1:0 * Adding to list: dev-util/xdelta-3.0.0:3 * Adding to list: dev-vcs/git-1.7.5.3:0 * Adding to list: dev-vcs/subversion-1.6.16:0 * Adding to list: sys-apps/file-5.07-r2:0 * Adding to list: sys-devel/distcc-3.1-r5:0 * emerge -Dv1 --keep-going dev-lang/python-2.6.6-r1:2.6 dev-lang/python-2.7.1-r1:2.7 dev-lang/python-2.7.1-r1:2.7 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.2:3.2 dev-lang/python-3.2:3.2 dev-libs/glib-2.28.8:2 dev-libs/libgamin-0.1.10-r2:0 dev-libs/libxml2-2.7.8:2 dev-python/django-1.3:0 dev-python/imaging-1.1.7:0 dev-python/ipython-0.10.2:0 dev-python/pexpect-2.4:0 dev-python/psycopg-2.4.1:2 dev-python/py-freebsd-0.9.3-r2:0 dev-python/setuptools-0.6.14-r1:0 dev-util/xdelta-3.0.0:3 dev-vcs/git-1.7.5.3:0 dev-vcs/subversion-1.6.16:0 sys-apps/file-5.07-r2:0 sys-devel/distcc-3.1-r5:0 !!! 'dev-lang/python-2.6.6-r1:2.6' is not a valid package atom. 12. * Starting Python Updater from 3.2 to 2.7 : * No packages needs to be remerged. Expected Results: Remerging all python-related packages I don't really understand what happen. Maybe this problem not in FreeBSD or python-updater. If there some test actions to clear it up, I will perform it.
Excuse me. On step 12 I had 2.7 and 3.2: # python-updater * Starting Python Updater... * Main active version of Python: 2.7 * Active version of Python 2: 2.7 * Active version of Python 3: 3.2 * Adding to list: dev-lang/python-2.6.6-r1:2.6 * Adding to list: dev-lang/python-2.6.6-r1:2.6 * Adding to list: dev-lang/python-2.7.1-r1:2.7 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.1.3-r1:3.1 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-lang/python-3.2:3.2 * Adding to list: dev-libs/glib-2.28.8:2 * Adding to list: dev-libs/libgamin-0.1.10-r2:0 * Adding to list: dev-libs/libxml2-2.7.8:2 * Adding to list: dev-python/django-1.3:0 * Adding to list: dev-python/imaging-1.1.7:0 * Adding to list: dev-python/ipython-0.10.2:0 * Adding to list: dev-python/pexpect-2.4:0 * Adding to list: dev-python/psycopg-2.4.1:2 * Adding to list: dev-python/py-freebsd-0.9.3-r2:0 * Adding to list: dev-python/setuptools-0.6.14-r1:0 * Adding to list: dev-util/xdelta-3.0.0:3 * Adding to list: dev-vcs/git-1.7.5.3:0 * Adding to list: dev-vcs/subversion-1.6.16:0 * Adding to list: net-dialup/freeradius-2.0.5:0 * Adding to list: sys-apps/file-5.07-r2:0 * Adding to list: sys-devel/distcc-3.1-r5:0 * emerge -Dv1 --keep-going dev-lang/python-2.6.6-r1:2.6 dev-lang/python-2.6.6-r1:2.6 dev-lang/python-2.7.1-r1:2.7 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.1.3-r1:3.1 dev-lang/python-3.2:3.2 dev-lang/python-3.2:3.2 dev-libs/glib-2.28.8:2 dev-libs/libgamin-0.1.10-r2:0 dev-libs/libxml2-2.7.8:2 dev-python/django-1.3:0 dev-python/imaging-1.1.7:0 dev-python/ipython-0.10.2:0 dev-python/pexpect-2.4:0 dev-python/psycopg-2.4.1:2 dev-python/py-freebsd-0.9.3-r2:0 dev-python/setuptools-0.6.14-r1:0 dev-util/xdelta-3.0.0:3 dev-vcs/git-1.7.5.3:0 dev-vcs/subversion-1.6.16:0 net-dialup/freeradius-2.0.5:0 sys-apps/file-5.07-r2:0 sys-devel/distcc-3.1-r5:0 !!! 'dev-lang/python-2.6.6-r1:2.6' is not a valid package atom. !!! Please check ebuild(5) for full details.
Created attachment 276421 [details] emerge --info
This may happen because there's no old version (here, dev-lang/python-2.6.6-r1) available on tree. Please try updating first. (but anyway, I'd like to have python-updater to handle this issue better)
(In reply to comment #3) > This may happen because there's no old version (here, dev-lang/python-2.6.6-r1) > available on tree. Please try updating first. (but anyway, I'd like to have > python-updater to handle this issue better) Update didn't help. # eix -Ic python [I] app-admin/eselect-python (20100321@03/25/2010): Eselect module for management of multiple Python versions [I] app-admin/python-updater (0.9@05/30/2011): Script used to reinstall Python packages after changing of active Python versions [U] dev-lang/python (2.6.6-r2(2.6)@07/31/2011 2.7.1-r1(2.7)@07/31/2011 3.1.3-r1(3.1)@02/25/2011 -> (~)2.4.6(2.4) (~)2.5.4-r4(2.5) (~)2.6.7(2.6) (~)2.7.2(2.7) (~)3.1.4(3.1) (~)3.2(3.2)): Python is an interpreted, interactive, object-oriented programming language. Found 3 matches. All versions present in tree. But python-updater still write "not a valid package atom".
(In reply to comment #4) > (In reply to comment #3) > > This may happen because there's no old version (here, dev-lang/python-2.6.6-r1) > > available on tree. Please try updating first. (but anyway, I'd like to have > > python-updater to handle this issue better) > > Update didn't help. > > All versions present in tree. But python-updater still write "not a valid > package atom". What package is claimed as "not a valid package atom"? Still "dev-lang/python" or not? What I meant was applied not only for python. I'm suspecting "not a valid package atom" is due to any missing package in the tree.
(In reply to comment #5) > What package is claimed as "not a valid package atom"? Still "dev-lang/python" > or not? > What I meant was applied not only for python. I'm suspecting "not a valid > package atom" is due to any missing package in the tree. app-admin/webapp-config-1.50.18:0 the first. If I begin to delete packages, it will be dev-lang/python.
Now I have deleted app-admin/webapp-config-1.50.18, app-portage/gentoolkit-0.3.0.4-r1, app-portage/layman-2.0.0_rc1-r1 and python-updater writes: !!! 'dev-lang/python-2.6.6-r2:2.6' is not a valid package atom. !!! Please check ebuild(5) for full details. All this versions now in tree. It seems all package atoms is invalid for python-updater in my system.
(In reply to comment #7) > Now I have deleted app-admin/webapp-config-1.50.18, > app-portage/gentoolkit-0.3.0.4-r1, app-portage/layman-2.0.0_rc1-r1 and > python-updater writes: > > !!! 'dev-lang/python-2.6.6-r2:2.6' is not a valid package atom. > !!! Please check ebuild(5) for full details. > > All this versions now in tree. It seems all package atoms is invalid for > python-updater in my system. hm, then my idea was wrong. Python team, Any idea or suggestion about this problem?
hm, we shouldn't have both version and slot... we might have to get dev-lang/python:2.6.
(In reply to comment #9) > hm, we shouldn't have both version and slot... we might have to get > dev-lang/python:2.6. There is a difference between environment.bz2 on linux and fbsd for app-admin/webapp-config-1.50.18 as example Linux: PVR="1.50.18" FreeBSD: declare -x PVR="1.50.18" In `/usr/sbin/python-updater' 1. `get_vdb_variable()' outputs PVR=declare -x PVR="1.50.18", 2. PN="${PF%-${PVR}}"=PF="webapp-config-1.50.18", 3. CATPKG=CATPKGVER="${CATEGORY}/${PN}"="app-admin/webapp-config-1.50.18", 4. CATPKGVER="${CATPKG}:${SLOT}"="${CATPKGVER}:${SLOT}"="app-admin/webapp-config-1.50.18:0"
Created attachment 284973 [details, diff] patch to use sed from /usr/lib/portage/bin/ebuild-helpers This behavior is because of difference with "GNU sed" and "FreeBSD sed". The easiest way to solve this would be to use "/usr/lib/portage/bin/ebuild-helpers/sed" instead. python team, Could you review the attached patch and consider applying the patch or give me some comments?
Seems fine, go ahead.
Thanks. Commit to -r1
This patch causes usage of /usr/lib/portage/bin/ebuild-helpers/einfo instead of /lib/rc/bin/einfo. This change breaks indentation. eindent() and eoutdent() functions don't affect einfo from Portage.
Today with app-admin/python-updater-0.10 on g/fbsd-8.2 I see the same behavior: python-updater -p * Starting Python Updater... * Main active version of Python: 2.7 * Active version of Python 2: 2.7 * Active version of Python 3: 3.1 * Globally supported Python ABIs in installed repositories: * gentoo-bsdngentoonlocal: * Adding to list: app-admin/webapp-config-1.50.18:0 * Adding to list: app-portage/gentoolkit-0.3.0.4-r5:0 * Adding to list: app-portage/layman-2.0.0_rc3:0 * Adding to list: dev-lang/python-2.6.6-r2:2.6 * Adding to list: dev-lang/python-2.6.6-r2:2.6 * Adding to list: dev-lang/python-2.7.2-r3:2.7 * Adding to list: dev-lang/python-3.1.4-r3:3.1 * Adding to list: dev-lang/python-3.1.4-r3:3.1 * Adding to list: dev-libs/libgamin-0.1.10-r2:0 * Adding to list: dev-libs/libxml2-2.7.8-r4:2 * Adding to list: dev-python/argparse-1.2.1:0 * Adding to list: dev-python/django-1.3.1-r1:0 * Adding to list: dev-python/flup-1.0.2:0 * Adding to list: dev-python/imaging-1.1.7-r1:0 * Adding to list: dev-python/psycopg-2.4.2:2 * Adding to list: dev-python/py-freebsd-0.9.3-r1:0 * Adding to list: dev-python/pyopenssl-0.13:0 * Adding to list: dev-python/python-dateutil-1.5:python-2 * Adding to list: dev-python/setuptools-0.6.24:0 * Adding to list: dev-python/twisted-11.1.0:0 * Adding to list: dev-python/twistedschedule-1.0_beta1:0 * Adding to list: dev-python/vobject-0.8.1c:0 * Adding to list: dev-vcs/git-1.7.8.4:0 * Adding to list: dev-vcs/subversion-1.7.2:0 * Adding to list: net-dialup/freeradius-2.0.5:0 * Adding to list: net-zope/zope-fixers-1.0:0 * Adding to list: net-zope/zope-interface-3.8.0:0 * Adding to list: sys-apps/file-5.10:0 * Adding to list: sys-devel/distcc-3.1-r6:0 * Adding to list: www-apps/donjon-0.1.2:0 * Adding to list: www-apps/mailc-0.3.9999:0 * emerge -Dv1 --keep-going -p app-admin/webapp-config-1.50.18:0 app-portage/gentoolkit-0.3.0.4-r5:0 app-portage/layman-2.0.0_rc3:0 dev-lang/python-2.6.6-r2:2.6 dev-lang/python-2.6.6-r2:2.6 dev-lang/python-2.7.2-r3:2.7 dev-lang/python-3.1.4-r3:3.1 dev-lang/python-3.1.4-r3:3.1 dev-libs/libgamin-0.1.10-r2:0 dev-libs/libxml2-2.7.8-r4:2 dev-python/argparse-1.2.1:0 dev-python/django-1.3.1-r1:0 dev-python/flup-1.0.2:0 dev-python/imaging-1.1.7-r1:0 dev-python/psycopg-2.4.2:2 dev-python/py-freebsd-0.9.3-r1:0 dev-python/pyopenssl-0.13:0 dev-python/python-dateutil-1.5:python-2 dev-python/setuptools-0.6.24:0 dev-python/twisted-11.1.0:0 dev-python/twistedschedule-1.0_beta1:0 dev-python/vobject-0.8.1c:0 dev-vcs/git-1.7.8.4:0 dev-vcs/subversion-1.7.2:0 net-dialup/freeradius-2.0.5:0 net-zope/zope-fixers-1.0:0 net-zope/zope-interface-3.8.0:0 sys-apps/file-5.10:0 sys-devel/distcc-3.1-r6:0 www-apps/donjon-0.1.2:0 www-apps/mailc-0.3.9999:0 !!! 'app-admin/webapp-config-1.50.18:0' is not a valid package atom. !!! Please check ebuild(5) for full details. With 0.9-r1 OK.
app-admin/python-updater-0.10 uses the following code: if [[ "${PMS_COMMAND[${PMS_INDEX}]}" == "emerge" ]]; then alias sed="$(/usr/bin/python -c "import os; print(os.path.dirname(os.path.realpath('$(type -p emerge)')))")/ebuild-helpers/sed" fi Could you check with 'set -x' where is the problem?
Created attachment 301189 [details] output of `python-updater -p` with `set -x` inside (In reply to comment #16) I placed `set -x` above this statement and got 1.7 M of output (: ++ echo app-admin/webapp-config-1.50.18/environment.bz2 ++ sed -e 's:/.*::' + CATEGORY=app-admin ++ echo webapp-config-1.50.18/environment.bz2 ++ sed -e 's:/.*::' + PF=webapp-config-1.50.18 + PN=webapp-config-1.50.18 + [[ -f /var/db/pkg/app-admin/webapp-config-1.50.18/SLOT ]] + SLOT=0 + CATPKG=app-admin/webapp-config-1.50.18 + [[ 0 -eq 0 ]] + [[ -n 0 ]] + CATPKGVER=app-admin/webapp-config-1.50.18:0 + veinfo 2 'Checking app-admin/webapp-config-1.50.18:0'
Created attachment 301191 [details, diff] python-updater.patch Please test this patch.
(In reply to comment #18) > Created attachment 301191 [details, diff] [details, diff] > python-updater.patch > > Please test this patch. Wow! It looks like the right output: # python-updater -p * Starting Python Updater... * Main active version of Python: 2.7 * Active version of Python 2: 2.7 * Active version of Python 3: 3.1 * Globally supported Python ABIs in installed repositories: * gentoo: 2.4 2.5 2.6 2.7 3.1 3.2 2.5-jython 2.7-pypy-1.7 * gentoo-bsd: 2.4 2.5 2.6 2.7 3.1 3.2 2.5-jython 2.7-pypy-1.7 * local: 2.4 2.5 2.6 2.7 3.1 3.2 2.5-jython 2.7-pypy-1.7 * progress: 2.4 2.5 2.6 2.7 3.1 3.2 3.3 2.5-jython 2.6-jython 2.7-pypy-1.7 * No packages need to be reinstalled.
http://code.google.com/p/gentoo-progress/source/detail?spec=svn1864&r=1782# The SVN head already has the above patch included. Python team, if you don't mind, I'd like to include this patch as -0.10-r1.
Looks good to me, go ahead.
Applied. Thanks.
I've committed a followup patch (as 0.10-r2) that undoes the breakage this patch causes on any portage without /usr/lib/portage/bin/ebuild-helpers/sed (which I think means any non-prefix portage). I think I didn't re-break prefix portages in the process, but could a prefix user please confirm that? I've set the bug back to "confirmed" until this has been done.
Looks like this is fixed then.
This happens again with app-admin/python-updater-0.11: * Starting Python Updater... * Main active version of Python: 2.7 * Active version of Python 2: 2.7 * Active version of Python 3: 3.2 * Globally supported Python ABIs in installed repositories: * django-toolsngentoo-bsdnprogressntrac-pluginsngentoonlocal: !!! Repository 'gentoo-bsd' is missing masters attribute in '/var/lib/layman/gentoo-bsd/metadata/layout.conf' !!! Set 'masters = gentoo' in this file for future compatibility ... !!! 'app-portage/gentoolkit-0.3.0.7-r2:0' is not a valid package atom. !!! Please check ebuild(5) for full details.
@python team portage no longer install gsed in bin/ebuild-helpers/sed but in bin/ebuild-helpers/bsd/sed which is causing the bug above. Please apply a patch to correct this path problem.
Created attachment 369036 [details, diff] a patch to update sed path
I'll add the above patch into portage tree soon, if python team won't take/review it.
Feel free!
Sorry, I missed this in my last round of updates. +*python-updater-0.13 (07 Apr 2014) + + 07 Apr 2014; Mike Gilbert <floppym@gentoo.org> +python-updater-0.13.ebuild: + Version bump. Fix path to sed on BSD, bug 370935. +