dist: get Ubuntu version from dpkg-parsechangelog

This commit is contained in:
Peter F. Patel-Schneider 2022-11-28 06:19:02 -05:00
parent 4e6f59c2ad
commit c2b4d5a8c8
1 changed files with 3 additions and 3 deletions

View File

@ -25,15 +25,15 @@ except Exception: # get commit from Ubuntu dpkg-parsechangelog
match = re.search(r'\nVersion: (.*)~', dpkg)
print('VERSION', match.group(0), match.group(1))
with open('lib/solaar/commit', 'w') as vfile:
vfile.write(f'{match.group[1]}\n')
vfile.write(f'{match.group(1)}\n')
print('Version', subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'Version']).strip().decode())
print('version', subprocess.check_output(['dpkg-parsechangelog', '--show-field', 'version']).strip().decode())
print('Version', subprocess.check_output(['dpkg-parsechangelog', '--show-field=Version']).strip().decode())
print('version', subprocess.check_output(['dpkg-parsechangelog', '--show-field=version']).strip().decode())
# with open('lib/solaar/commit', 'w') as vfile:
# vfile.write(f'{commit]}\n')
except Exception:
pass
except Exception as e:
print('Exception using dpkg-parsechangelog', e)
def _data_files():