mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 13:45:45 -05:00
packages/cli: linter fixes
This commit is contained in:
parent
f38fb798bc
commit
78874a15e6
2 changed files with 13 additions and 11 deletions
|
@ -64,7 +64,7 @@ def shrink_fs(loop_device: str, file: str, sector_size: int):
|
||||||
|
|
||||||
logging.debug(f'Finding end block of shrunken filesystem on {loop_device}p2')
|
logging.debug(f'Finding end block of shrunken filesystem on {loop_device}p2')
|
||||||
blocks = int(re.search('is now [0-9]+', result.stdout.decode('utf-8')).group(0).split(' ')[2]) # type: ignore
|
blocks = int(re.search('is now [0-9]+', result.stdout.decode('utf-8')).group(0).split(' ')[2]) # type: ignore
|
||||||
sectors = blocks * sectors_blocks_factor #+ 157812 - 25600
|
sectors = blocks * sectors_blocks_factor
|
||||||
|
|
||||||
logging.debug(f'Shrinking partition at {loop_device}p2 to {sectors} sectors')
|
logging.debug(f'Shrinking partition at {loop_device}p2 to {sectors} sectors')
|
||||||
child_proccess = subprocess.Popen(
|
child_proccess = subprocess.Popen(
|
||||||
|
|
|
@ -224,15 +224,17 @@ def cmd_sideload(paths: Iterable[str], arch: Optional[Arch] = None, no_build: bo
|
||||||
logging.fatal("No packages matched")
|
logging.fatal("No packages matched")
|
||||||
return
|
return
|
||||||
scp_put_files(files, '/tmp').check_returncode()
|
scp_put_files(files, '/tmp').check_returncode()
|
||||||
run_ssh_command([
|
run_ssh_command(
|
||||||
'sudo',
|
[
|
||||||
'pacman',
|
'sudo',
|
||||||
'-U',
|
'pacman',
|
||||||
] + [os.path.join('/tmp', os.path.basename(file)) for file in files] + [
|
'-U',
|
||||||
'--noconfirm',
|
*[os.path.join('/tmp', os.path.basename(file)) for file in files],
|
||||||
"'--overwrite=\\*'",
|
'--noconfirm',
|
||||||
],
|
"'--overwrite=\\*'",
|
||||||
alloc_tty=True).check_returncode()
|
],
|
||||||
|
alloc_tty=True,
|
||||||
|
).check_returncode()
|
||||||
|
|
||||||
|
|
||||||
CLEAN_LOCATIONS = ['src', 'pkg', *SRCINFO_CACHE_FILES]
|
CLEAN_LOCATIONS = ['src', 'pkg', *SRCINFO_CACHE_FILES]
|
||||||
|
@ -439,7 +441,7 @@ def cmd_check(paths):
|
||||||
formatted = False
|
formatted = False
|
||||||
reason = 'Found literal " although no special character was found in the line to justify the usage of a literal "'
|
reason = 'Found literal " although no special character was found in the line to justify the usage of a literal "'
|
||||||
|
|
||||||
if "'" in line and not '"' in line:
|
if "'" in line and '"' not in line:
|
||||||
formatted = False
|
formatted = False
|
||||||
reason = 'Found literal \' although either a literal " or no qoutes should be used'
|
reason = 'Found literal \' although either a literal " or no qoutes should be used'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue