The package doesn't ship any tests or examples I could run.
I don't know the code at all, and I'm still too bad with this stuff, but this is what I've done. I've needed, I could poke Sebastian to have a quick look at it.
emilio@pika:~$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aptsources import distro
>>> ubuntu = distro.UbuntuDistribution('ubuntu_hardy', 'hardy', 'Ubuntu', '8.04')
>>> ubuntu.is_codename('hardy')
True
>>> distro.get_distro()
<aptsources.distro.UbuntuDistribution instance at 0xb7d3184c>
>>> ubuntu.enable_component('universe')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/aptsources/distro.py", line 293, in enable_component
sources.extend(self.main_sources)
AttributeError: UbuntuDistribution instance has no attribute 'main_sources'
>>> ubuntu.enable_component('main')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/aptsources/distro.py", line 293, in enable_component
sources.extend(self.main_sources)
AttributeError: UbuntuDistribution instance has no attribute 'main_sources'
>>> from aptsources import sourceslist
>>> sources = sourceslist.SourcesList()
>>> ubuntu.get_sources(sources)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.5/site-packages/aptsources/distro.py", line 85, in get_sources
"Error: could not find a distribution template")
aptsources.distro.NoDistroTemplateException
>>> ubuntu.enable_component('main')
>>> ubuntu.disable_component('main')
>>> ubuntu.disable_component('universe')
>>> ubuntu.disable_component('universeasdf')
>>>
Build and installs fine.
The package doesn't ship any tests or examples I could run.
I don't know the code at all, and I'm still too bad with this stuff, but this is what I've done. I've needed, I could poke Sebastian to have a quick look at it.
emilio@pika:~$ python UbuntuDistribut ion('ubuntu_ hardy', 'hardy', 'Ubuntu', '8.04') is_codename( 'hardy' ) distro. UbuntuDistribut ion instance at 0xb7d3184c> enable_ component( 'universe' ) python2. 5/site- packages/ aptsources/ distro. py", line 293, in enable_component extend( self.main_ sources) enable_ component( 'main') python2. 5/site- packages/ aptsources/ distro. py", line 293, in enable_component extend( self.main_ sources) SourcesList( ) get_sources( sources) python2. 5/site- packages/ aptsources/ distro. py", line 85, in get_sources distro. NoDistroTemplat eException enable_ component( 'main') disable_ component( 'main') disable_ component( 'universe' ) disable_ component( 'universeasdf' )
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from aptsources import distro
>>> ubuntu = distro.
>>> ubuntu.
True
>>> distro.get_distro()
<aptsources.
>>> ubuntu.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
sources.
AttributeError: UbuntuDistribution instance has no attribute 'main_sources'
>>> ubuntu.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
sources.
AttributeError: UbuntuDistribution instance has no attribute 'main_sources'
>>> from aptsources import sourceslist
>>> sources = sourceslist.
>>> ubuntu.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
"Error: could not find a distribution template")
aptsources.
>>> ubuntu.
>>> ubuntu.
>>> ubuntu.
>>> ubuntu.
>>>