diff options
-rw-r--r-- | scripts/common-obs.sh | 16 | ||||
-rwxr-xr-x | scripts/osmocom-latest-packages.sh | 2 | ||||
-rwxr-xr-x | scripts/osmocom-nightly-packages.sh | 2 |
3 files changed, 15 insertions, 5 deletions
diff --git a/scripts/common-obs.sh b/scripts/common-obs.sh index 1566def..47f3f3d 100644 --- a/scripts/common-obs.sh +++ b/scripts/common-obs.sh @@ -18,13 +18,23 @@ osmo_cmd_require \ # Add dependency to all (sub)packages in debian/control and commit the change. # $1: path to debian/control file -# $2: name of the package to depend on +# $2: package name (e.g. "libosmocore") +# $3: dependency package name (e.g. "osmocom-nightly") osmo_obs_add_depend_deb() { + local d_control="$1" + local pkgname="$2" + local depend="$3" + + if [ "$pkgname" = "$depend" ]; then + echo "NOTE: skipping dependency on itself: $depend" + return + fi + # Note: adding the comma at the end should be fine. If there is a Depends: line, it is most likely not empty. It # should at least have ${misc:Depends} according to lintian. - sed "s/^Depends: /Depends: $2, /g" -i "$1" + sed "s/^Depends: /Depends: $depend, /g" -i "$d_control" - git -C "$(dirname "$1")" commit -m "auto-commit: debian: depend on $2" . + git -C "$(dirname "$d_control")" commit -m "auto-commit: debian: depend on $depend" . } # Copy a project's rpm spec.in file to the osc package dir, set the version/source and 'osc add' it diff --git a/scripts/osmocom-latest-packages.sh b/scripts/osmocom-latest-packages.sh index 271824f..2689e35 100755 --- a/scripts/osmocom-latest-packages.sh +++ b/scripts/osmocom-latest-packages.sh @@ -73,7 +73,7 @@ build() { ./git-version-gen . > .tarball-version 2>/dev/null fi - osmo_obs_add_depend_deb "./debian/control" "osmocom-latest" + osmo_obs_add_depend_deb "./debian/control" "$project" "osmocom-latest" if [ "$project" = "open5gs" ]; then # we cannot control the output directory of the generated source :( diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 4234021..3f95d17 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -129,7 +129,7 @@ build() { if [ "$changelog" = "commit" ] ; then VER=$(get_commit_version) - osmo_obs_add_depend_deb "./debian/control" "osmocom-$FEED" + osmo_obs_add_depend_deb "./debian/control" "$name" "osmocom-$FEED" dch -b -v "$VER" -m "Snapshot build" git commit -m "$VER snapshot" debian/ fi |