Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/repo-add.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/repo-add.sh.in')
-rw-r--r--scripts/repo-add.sh.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 4dfedbe6..adcefc1d 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -218,7 +218,13 @@ db_write_entry()
# create deltas entry if there are delta files
for delta in $startdir/$pkgname-*-*_to_*-*-$arch.delta; do
- if [ -f "$delta" ]; then
+ # This for loop also pulls in all files that start with the current package
+ # name and are followed by a -whatever. For instance, running this loop for
+ # gcc would also grab gcc-libs. To guard against this, compare the package
+ # name of the delta to the current package name.
+ local filename=$(basename "$delta")
+ local dpkgname="$(echo "$filename" | sed -e 's/\(.*\)-.*-.*_to_.*-.*-.*.delta/\1/')"
+ if [ "$pkgname" = "$dpkgname" -a -f "$delta" ]; then
# create deltas file if it does not already exist
if [ ! -f "deltas" ]; then
msg2 "$(gettext "Creating 'deltas' db entry...")"