Compare commits

..

3 Commits

Author SHA1 Message Date
William Douglas 3bf41ad9c9 Update vendor script to always use the latest tag
Sometimes vendor repos get tagged but the package fails to update for
another reason. In this case the repo wouldn't have the new vendor
ARCHIVE set and new attempts to build would use the old vendor archive
causing failures. Force using the latest vendor tag as generally this
is what we want (if we get a bad vendor tag somehow, it should mean a
new tag needs to be created to replace it anyway).

Signed-off-by: William Douglas <william.douglas@intel.com>
2024-09-06 13:12:13 -07:00
Arjan van de Ven 92b3d682ec udpate 2024-08-22 18:35:05 +00:00
Arjan van de Ven ce873b4b19 packages update 2024-08-20 15:16:40 +00:00
2 changed files with 20 additions and 8 deletions
+11
View File
@@ -26,6 +26,7 @@ LibreCAD
Linux-PAM
LuaJIT
LyX
MangoHud
MarkupSafe
ModemManager
MuseScore
@@ -1570,6 +1571,7 @@ fwupd
fwupd-efi
garcon
gawk
gbinder-python
gc
gcab
gcc
@@ -2179,6 +2181,7 @@ libfontenc
libfprint
libfreehand
libftdi1
libgbinder
libgcrypt
libgd
libgdata
@@ -2187,6 +2190,7 @@ libgee
libgeotiff
libgit2
libgit2-glib
libglibutil
libglvnd
libgnome-keyring
libgnomekbd
@@ -2437,6 +2441,7 @@ luarocks
lutris
luv
lv2
lxc
lynx
lz4
lzlib
@@ -3915,6 +3920,7 @@ pypi-docopt
pypi-docstring_parser
pypi-docstring_to_markdown
pypi-docutils
pypi-doit
pypi-doxypypy
pypi-doxyqml
pypi-dpcontracts
@@ -4117,6 +4123,9 @@ pypi-jupyterlab_link_share
pypi-jupyterlab_pygments
pypi-jupyterlab_server
pypi-jupyterlab_widgets
pypi-jupyterlite_core
pypi-jupyterlite_pyodide_kernel
pypi-jupyterlite_sphinx
pypi-jxmlease
pypi-kcc
pypi-kerberos
@@ -4335,6 +4344,7 @@ pypi-pybind11
pypi-pybtex
pypi-pybtex_docutils
pypi-pycares
pypi-pyclip
pypi-pyclipper
pypi-pycodestyle
pypi-pycollada
@@ -5155,6 +5165,7 @@ vsqlite
vte
waffle
wavpack
waydroid
wayland
wayland-protocols
waypipe
+9 -8
View File
@@ -82,7 +82,11 @@ def update_cargo_vendor(path, name, git):
shell=True, check=True, stdout=subprocess.DEVNULL)
repo = Repo(vendor_path)
if not (len(repo.untracked_files) > 0 or repo.is_dirty()):
return False, ""
# Always use the newest tag as sometimes a new tag will
# be created but the package won't be updated to use it
# for a different failure reason.
tag = sorted(repo.tags, key=lambda x: x.name, reverse=True)[0]
return tag, cargo_vendors
subprocess.run('git add .', cwd=vendor_path, shell=True, check=True,
stdout=subprocess.DEVNULL)
subprocess.run('git commit -m "vendor update"', cwd=vendor_path,
@@ -139,7 +143,6 @@ def update_cargo_sources(name, tag, cargo_vendors):
def main():
updated = False
args = get_args()
vtype = vendor_check()
@@ -150,13 +153,11 @@ def main():
tdir = setup_content(args.url)
if vtype == 'cargo':
vdir = setup_cargo_vendor(tdir)
if vdir:
if not vdir:
print(args.archives)
else:
tag, cargo_vendors = update_cargo_vendor(vdir, args.name, args.git)
if tag:
update_cargo_sources(args.name, tag, cargo_vendors)
updated = True
if not updated:
print(args.archives)
update_cargo_sources(args.name, tag, cargo_vendors)
shutil.rmtree(tdir)