|
32 |
# <http://www.gnu.org/licenses/>. |
32 |
# <http://www.gnu.org/licenses/>. |
33 |
import shutil |
33 |
import shutil |
34 |
import glob |
34 |
import glob |
|
|
35 |
import os |
35 |
|
36 |
|
36 |
from univention.management.console.modules.setup.setup_script import AptScript, main, _ |
37 |
from univention.management.console.modules.setup.setup_script import AptScript, main, _ |
37 |
|
38 |
|
|
51 |
# Copy local files into the local cache |
52 |
# Copy local files into the local cache |
52 |
# https://forge.univention.org/bugzilla/show_bug.cgi?id=27935 |
53 |
# https://forge.univention.org/bugzilla/show_bug.cgi?id=27935 |
53 |
for filename in glob.glob('/var/cache/univention-system-setup/packages/*.deb'): |
54 |
for filename in glob.glob('/var/cache/univention-system-setup/packages/*.deb'): |
54 |
shutil.copy(filename, '/var/cache/apt/archives/') |
55 |
try: |
|
|
56 |
basename = os.path.basename(filename) |
57 |
os.link(filename, os.path.join('/var/cache/apt/archives/', basename)) |
58 |
except OSError: |
59 |
shutil.copy(filename, '/var/cache/apt/archives/') |
55 |
self.reopen_cache() |
60 |
self.reopen_cache() |
56 |
|
61 |
|
57 |
current_server_role_package = self.get_package_for_role(self.current_server_role) if self.current_server_role else None |
62 |
current_server_role_package = self.get_package_for_role(self.current_server_role) if self.current_server_role else None |