:: [devuan-dev] Patch dak to skip dupl…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Mark Hindley
日付:  
To: devuan-dev
題目: [devuan-dev] Patch dak to skip duplicate source uploads when importing.
Hello,

I have a patch which I hope will finally get rid of the frustration we all have
with dak rejecting subsequent .dsc uploads of the same source version.

The issue is that, even when signed with the same key, the signature in the .dsc
file is different each time and therefor the file has a different checksum.

I propose the attached patch for add_pkg so that it checks for an existing .dsc
file in the pool and skips it, continuing with the rest of the jenkins build
artifacts.

This makes it much easier to correct missing binaries on single architectures
without having to bump the source version and rebuild everything.

Any comments?

Thanks.

Mark
1 file changed, 8 insertions(+)
tools/add_pkg | 8 ++++++++

modified   tools/add_pkg
@@ -112,6 +112,14 @@ if [ -d "$BASEP" ] ; then
     fi
     cd sources
     for dsc in *.dsc ; do
+            # Check is the .dsc file is already in the pool. If it is,
+            # bailout, as dak won't accept a new version
+                DSC_POOLFILE=/$(echo $dsc | sed 's/^\(lib.\|.\)[^_]\+/\1\/&\/&/')
+                echo "Checking for $DSC_POOLFILE in the pool."
+                if [ -f /srv/dak/ftp/pool/main/${DSC_POOLFILE} ] ; then
+                        echo "${DSC_POOLFILE} already exists in dak pool. Skipping."
+                        continue
+                fi
         echo "execute dak import -a $SUITE $COMPONENT $dsc"
         dak import $SUITE $COMPONENT $dsc || test 3 -eq $? && dakmove $SUITE $COMPONENT $dsc || exit $?
         O=$(grep -A 1 ^Package-List "$dsc" | tail -n 1 | awk '{print $4" "$3}')


[back]