From 50d5a14d3eee1c7ce04ae85fa458d43d8e0cf998 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 23 Jun 2020 20:07:40 -0400 Subject: update_feeds(): Don't remove empty feed indices --- diff --git a/NEWS b/NEWS index 5d0bc26..3886eda 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,10 @@ ProteanOS Archive Manager version 2.0.1+dev Released: ????-??-?? +Changes in this release: + + * Feed indices are no longer removed when feeds become empty. + ProteanOS Archive Manager version 2.0.1 --------------------------------------- diff --git a/src/index.sh b/src/index.sh index 62208b9..33dca70 100644 --- a/src/index.sh +++ b/src/index.sh @@ -184,26 +184,19 @@ update_feeds() 1>"${sect}/Packages~" mv -- "${sect}/Packages~" \ "${sect}/Packages" - if ${conf_gzip}; then - "${GZIP}" -9c -- \ - "${sect}/Packages" \ - 1>"${sect}/Packages.gz" - fi - feed_sign "${sect}/Packages" else - rm -f -- "${sect}/Packages" \ - "${sect}/Packages.gz" + 1>"${sect}/Packages" + fi + if ${conf_gzip}; then + "${GZIP}" -9c -- "${sect}/Packages" \ + 1>"${sect}/Packages.gz" fi + feed_sign "${sect}/Packages" rmdir -- "${sect_dirent}" - try_rmdir "${sect}" || : done rmdir -- "${archplat_dirent}" - try_rmdir "${archplat}" || : - try_rmdir "${archplat%/*}" || : done rmdir -- "${suite_dirent}" - try_rmdir "${suite}" - try_rmdir "${suite%/*}" done # Generate all suites' arch/plat/sect manifests. -- cgit v0.9.1