Commit 0501eda7 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

obs/_generic: small improvements

 * use cp instead of mv so that the original file doesn't disappear and we
can rerun the script
 * osc rm can fail if the package is empty (especially at creation time
of the package)
parent 11bf27f1
......@@ -9,7 +9,7 @@ source _generic/build-scripts/00env.sh
osc checkout "$OBS_PROJECT" "$OBS_PACKAGE" || true
cd "$OBS_DIR"
osc update
osc rm -f "$SOFTWARE_AND_VERSION$ARCHIVE_EXT" "$SOFTWARE_AND_VERSION".dsc
osc rm "$SOFTWARE_AND_VERSION$ARCHIVE_EXT" "$SOFTWARE_AND_VERSION".dsc || true
cd "$INITIAL_DIR"
# copy compilation files and override the files from _generic
......@@ -22,7 +22,7 @@ copy_and_solve_templates "$DISTRIB_FILES_SOFTWARE_DIR" "$OBS_DIR"
### Finalize the tarball directory preparation
# switch to the buildout wrapper for OBS
mv "$TARBALL_DIR/obs_buildout.cfg" "$RUN_BUILDOUT_DIR/buildout.cfg"
cp "$TARBALL_DIR/obs_buildout.cfg" "$RUN_BUILDOUT_DIR/buildout.cfg"
# save the local $TARBALL_DIR path so that it is replaced by the $TARBALL_DIR path from OBS' VM
echo "$TARBALL_DIR" > "$TARBALL_DIR"/local_tarball_directory_path
# add a stamp so that OBS does not clean the local preparation before compiling
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment