I'm running a default Ubuntu 7.10 (Gnome) installation.
I configure the power management settings to put the computer to
sleep after a certain period of inactivity. Once that period of time
expires Gnome Power Management will put the computer to sleep even if
Synaptic Package Manager is in the middle of downloading or installing
packages.
According to the Gnome docs, the player should call a dbus method when downloading/installation/reloading starts so that the computer doesn't sleep due to inactivity. See
https://wiki.ubuntu.com/GnomePowerManagerInactiveSleep for more info.