index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Nathan Jones <nathanj@insightbb.com> | 2007-11-12 16:54:50 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-11-13 00:13:21 -0600 |
commit | c29209e7b6555b140794ffb6907fbd33f0d0aa88 (patch) | |
tree | 63e8f027832b633b174be7c007f816432923a9db /scripts | |
parent | 103c3ac5a789dc0ec9855c18800a0616940351b1 (diff) |
-rw-r--r-- | scripts/repo-add.sh.in | 8 |
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...")" |