Skip to content

Commit d2278ce

Browse files
authored
Changes for building dpks (#1268)
1 parent 1255497 commit d2278ce

3 files changed

Lines changed: 4 additions & 22 deletions

File tree

l2tdevtools/build_helpers/dpkg.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Helper for building projects from source."""
22

33
import datetime
4-
import fileinput
54
import glob
65
import logging
76
import os
@@ -263,23 +262,6 @@ def _CreatePackagingFiles(self, source_directory, project_version):
263262
logging.error(f'Missing debian sub directory in: {source_directory:s}')
264263
return False
265264

266-
if self.distribution == 'noble':
267-
control_file_path = os.path.join(debian_directory, 'control')
268-
for line in fileinput.input(control_file_path, inplace=True):
269-
if line.startswith('Build-Depends:'):
270-
line = line.rstrip() + ', pybuild-plugin-pyproject\n'
271-
print(line, end='')
272-
273-
patches_path = os.path.join(debian_directory, 'patches')
274-
if not os.path.exists(patches_path):
275-
os.mkdir(patches_path)
276-
277-
# pyproject_patch = os.path.join(patches_path, 'pyproject.patch')
278-
# TODO: add option to control patches for noble pyproject.toml builds
279-
280-
# TODO: create series file
281-
# patches_series = os.path.join(patches_path, 'series')
282-
283265
return True
284266

285267
# pylint: disable=redundant-returns-doc,unused-argument
@@ -1010,12 +992,12 @@ def Clean(self, source_helper_object):
1010992
self._RemoveOlderDPKGPackages(project_name, project_version)
1011993

1012994
if project_name.startswith('python-'):
1013-
project_name = f'python3-{project_name[7]:s}'
995+
project_name = f'python3-{project_name[7:]:s}'
1014996
self._RemoveOlderDPKGPackages(project_name, project_version)
1015997

1016998
elif (project_name.startswith('python2-') or
1017999
project_name.startswith('python3-')):
1018-
project_name = f'python3-{project_name[8]:s}'
1000+
project_name = f'python3-{project_name[8:]:s}'
10191001
self._RemoveOlderDPKGPackages(project_name, project_version)
10201002

10211003

l2tdevtools/dpkg_files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ def _GenerateControlFile(self, dpkg_path):
359359
python3_depends.append(f'python3-{dependency[7:]:s}')
360360
elif (dependency.startswith('python2-') or
361361
dependency.startswith('python3-')):
362-
python3_depends.append(f'python3-{dependency[9:]:s}')
362+
python3_depends.append(f'python3-{dependency[8:]:s}')
363363
else:
364364
depends.append(dependency)
365365

tests/download_helpers/github.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ class Log2TimelineGitHubReleasesDownloadHelperTest(test_lib.BaseTestCase):
168168

169169
_PROJECT_ORGANIZATION = 'log2timeline'
170170
_PROJECT_NAME = 'dfvfs'
171-
_PROJECT_VERSION = '20240505'
171+
_PROJECT_VERSION = '20260411'
172172

173173
@classmethod
174174
def setUpClass(cls):

0 commit comments

Comments
 (0)