[Piuparts-devel] Bug#668863: Make piuparts-slave.py default to sid
Dave Steele
dsteele at gmail.com
Mon Apr 16 17:33:19 UTC 2012
On Sun, Apr 15, 2012 at 10:37 AM, <dsteele at gmail.com> wrote:
>
> On Apr 15, 2012, at 10:35 AM, Andreas Beckmann <debian at abeckmann.de> wrote:
>
>> On 2012-04-15 16:12, Holger Levsen wrote:
>>>> Without the patch, Section.run() terminates with an unhandled
>>>> exception, due to a reference the unassigned variable 'distro' (line
>>>> 389), if the 'distro' configuration parameter is not defined.
>>>
>>> Did you test this with an upgrade configuration, like testing2sid or
>>> squeeze2wheezy? I seem to recall that setting "distro" for these tests will
>>> cause unwanted consequences.
>>
>> setting both distro and upgrade-test-distros is not problematic (at
>> least in my heavily patched instance), but I think a section without
>> both distro and upgrade-test-distros is not well-formed ... defaulting
>> to something unrelated may cause more problems for upgrade tests.
>> I'll fix the slave to print an error and skip the bad section.
>>
>
> Sounds good
Just noticed your patch 41aad1f3470835aa29367faebede520289b6e103 on
this. I think the problem remains - the last line below can still blow
up.
if self._config["distro"]:
distros = [self._config["distro"]]
else:
distros = []
if self._config["upgrade-test-distros"]:
distros += self._config["upgrade-test-distros"].split()
if not distros:
logging.error("neither 'distro' nor 'upgrade-test-distros'
configured")
self._sleep_until = time.time() + 3600
packages_files = {}
for distro in distros:
if distro not in packages_files:
try:
packages_files[distro] =
fetch_packages_file(self._config, distro)
except IOError:
logging.error("failed to fetch packages file for
%s" % distro)
self._sleep_until = time.time() + 900
return 0
if self._config["distro"]:
packages_file = packages_files[self._config["distro"]]
else:
packages_file = packages_files[distro]
More information about the Piuparts-devel
mailing list