mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
patchinstall.sh: No longer depend on debian changelog file.
The repository no longer contains packaging files for debian.
This information will be provided on a separate website soon.
(cherry picked from commit e4321c5093
)
This commit is contained in:
parent
7fc4595aaa
commit
02d83cab14
@ -58,7 +58,7 @@ upstream_commit()
|
||||
# Show version information
|
||||
version()
|
||||
{
|
||||
echo "Wine Staging 1.8"
|
||||
echo "Wine Staging 1.8.1 (unreleased)"
|
||||
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
|
1
staging/VERSION
Normal file
1
staging/VERSION
Normal file
@ -0,0 +1 @@
|
||||
Wine Staging 1.8.1 (unreleased)
|
1760
staging/changelog
1760
staging/changelog
File diff suppressed because it is too large
Load Diff
@ -58,7 +58,7 @@ upstream_commit()
|
||||
# Show version information
|
||||
version()
|
||||
{{
|
||||
echo "Wine Staging {latest_staging_version}"
|
||||
echo "{staging_version}"
|
||||
echo "Copyright (C) 2014-2016 the Wine Staging project authors."
|
||||
echo ""
|
||||
echo "Patchset to be applied on upstream Wine:"
|
||||
|
@ -53,7 +53,7 @@ class config(object):
|
||||
path_config = os.path.expanduser("~/.config/patchupdate.conf")
|
||||
|
||||
path_patches = "patches"
|
||||
path_changelog = "staging/changelog"
|
||||
path_version = "staging/VERSION"
|
||||
path_wine = "staging/wine"
|
||||
|
||||
path_template_script = "staging/patchinstall.sh.in"
|
||||
@ -151,21 +151,10 @@ def _parse_int(val, default=0):
|
||||
except AttributeError:
|
||||
return default
|
||||
|
||||
def _read_changelog():
|
||||
"""Read information from changelog."""
|
||||
with open(config.path_changelog) as fp:
|
||||
for line in fp:
|
||||
r = re.match("^([a-zA-Z0-9][^(]*)\((.*)\) ([^;]*)", line)
|
||||
if r: yield (r.group(1).strip(), r.group(2).strip(), r.group(3).strip())
|
||||
|
||||
def _latest_staging_version(only_released=False):
|
||||
"""Get version number of the latest release / unreleased version."""
|
||||
for package, version, distro in _read_changelog():
|
||||
version = version.replace("~rc", "-rc")
|
||||
if distro.lower() != "unreleased":
|
||||
return version
|
||||
elif not only_released:
|
||||
return "%s (unreleased)" % version
|
||||
def _staging_version():
|
||||
"""Get the current version number of Wine Staging."""
|
||||
with open(config.path_version) as fp:
|
||||
return fp.read().strip()
|
||||
|
||||
def _latest_wine_commit(commit=None):
|
||||
"""Get latest wine commit."""
|
||||
@ -785,7 +774,7 @@ def generate_script(all_patches, skip_checks=False):
|
||||
with open(config.path_template_script) as template_fp:
|
||||
template = template_fp.read()
|
||||
with open(config.path_script, "w") as fp:
|
||||
fp.write(template.format(latest_staging_version=_latest_staging_version(),
|
||||
fp.write(template.format(staging_version=_staging_version(),
|
||||
latest_wine_commit=latest_wine_commit,
|
||||
patch_helpers="".join(lines_helpers).rstrip("\n"),
|
||||
patch_resolver="".join(lines_resolver).rstrip("\n"),
|
||||
@ -794,24 +783,6 @@ def generate_script(all_patches, skip_checks=False):
|
||||
# Add changes to git
|
||||
subprocess.call(["git", "add", config.path_script])
|
||||
|
||||
def wrap_changelog():
|
||||
|
||||
lines = []
|
||||
with open(config.path_changelog) as fp:
|
||||
for line in fp:
|
||||
if line.startswith(" *") and len(line.rstrip("\n")) > 80:
|
||||
wrapped = textwrap.wrap(line[3:].strip(), 80 - 4)
|
||||
lines.append(" * %s\n" % "\n ".join(wrapped))
|
||||
else:
|
||||
lines.append(line)
|
||||
|
||||
with open(config.path_changelog, "w") as fp:
|
||||
for line in lines:
|
||||
fp.write(line)
|
||||
|
||||
# Add changes to git
|
||||
subprocess.call(["git", "add", config.path_changelog])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@ -859,7 +830,6 @@ if __name__ == "__main__":
|
||||
# Update autogenerated files
|
||||
generate_ifdefined(all_patches, skip_checks=args.skip_checks)
|
||||
generate_script(all_patches, skip_checks=args.skip_checks)
|
||||
wrap_changelog()
|
||||
|
||||
except PatchUpdaterError as e:
|
||||
print ""
|
||||
|
Loading…
Reference in New Issue
Block a user