[Bug 1242778] Re: python-apt malforms source lines with multiple options
Rohit R
1242778 at bugs.launchpad.net
Mon Oct 21 16:59:15 UTC 2013
** Description changed:
The str() method in SourceEntry class, has malforms the source line.
Console out:
- Python 2.7.3 (default, Apr 10 2013, 06:20:15)
+ Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aptsources.sourceslist import SourceEntry
>>> s = SourceEntry('deb [arch=amd64 trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
>>> s.str()
'deb [arch=amd64] trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main\n'
Note the extra "]". This leads to apt-add-repository to malform some
entries.
+
+ Edit:
+
+ The parsing itself is wrong.
+
+ Python 2.7.3 (default, Apr 10 2013, 06:20:15)
+ [GCC 4.6.3] on linux2
+ Type "help", "copyright", "credits" or "license" for more information.
+ >>> from aptsources.sourceslist import SourceEntry
+ >>> s = SourceEntry('deb [arch=amd64 trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
+ >>> s.architectures
+ ['amd64']
+ >>> s.uri
+ 'trusted=yes]'
+ >>> s.dist
+ 'http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu'
+ >>> s.comps
+ ['precise', 'main']
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-apt in Ubuntu.
https://bugs.launchpad.net/bugs/1242778
Title:
python-apt malforms source lines with multiple options
Status in “python-apt” package in Ubuntu:
New
Bug description:
The str() method in SourceEntry class, has malforms the source line.
Console out:
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aptsources.sourceslist import SourceEntry
>>> s = SourceEntry('deb [arch=amd64 trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
>>> s.str()
'deb [arch=amd64] trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main\n'
Note the extra "]". This leads to apt-add-repository to malform some
entries.
Edit:
The parsing itself is wrong.
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aptsources.sourceslist import SourceEntry
>>> s = SourceEntry('deb [arch=amd64 trusted=yes] http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu precise main')
>>> s.architectures
['amd64']
>>> s.uri
'trusted=yes]'
>>> s.dist
'http://ppa.launchpad.net/xubuntu-dev/xfce-4.10/ubuntu'
>>> s.comps
['precise', 'main']
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1242778/+subscriptions
More information about the foundations-bugs
mailing list