osmith submitted this change.
scripts: osmo_obs_add_rpm_spec: fix tar pattern
Fix the pattern that gets the source tarball with ls in order to update
the "Source:" line in the spec file. The previous assumption was that it
would always match:
ls -1 "${name}_"*".tar."*
But this isn't the case anymore since a spec file was added to
libosmo-dsp where the package name ($name) is libosmo-dsp, but the
tarball doesn't have the minus character:
libosmodsp_0.4.0.1.d7d9.202207150002.tar.xz
Therefore just change the pattern to:
ls -1 *_*.tar.*
We can do this because there is always only one tarball in the directory
and we wouldn't use ".tar." in a package name.
Fixes: OS#5619
Change-Id: Ic704f480102ab6f90f3936a3be30e3020402e750
---
M scripts/common-obs.sh
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh
index 4de2c55..6f96e95 100644
--- a/scripts/common-obs.sh
+++ b/scripts/common-obs.sh
@@ -162,7 +162,7 @@
fi
# Set source file
- tarball="$(cd "$oscdir" && ls -1 "${name}_"*".tar."*)"
+ tarball="$(cd "$oscdir" && ls -1 *_*.tar.*)"
sed -i "s/^Source:.*/Source: $tarball/g" "$spec"
osc add "$spec"
To view, visit change 28637. To unsubscribe, or for help writing mail filters, visit settings.