[pacman-dev] My thoughts for development

Dan McGee dpmcgee at gmail.com
Wed Dec 20 20:07:27 EST 2006


> > 7. Integrity checking- currently generating integrity checks will only
> > generate those from the first one in the INTEGRITY_CHECK array. This
> > seems to make sense as long as the array in makepkg.conf is ordered
> > the way we want it to be. When checking, we do get warning messages
> > for other types that may be in the array but are not in the PKGBUILD.
> > I just wanted to confirm this is the behavior you are looking for.
>
> Erm.  It should have generated all of them.  If it's not looped, then
> it's an oversight on my part.  I actually tested some stuff with md5
> and sha1, then moved back to just md5 for building some packages, so I
> probably missed it.

Patch below fixes this issue. Also addresses a spot where the wrong
variable was used, splits up the integrity checks and extracting of
sources into two sections for easier readability, and adds a few
comments for good measure.

--- /home/dmcgee/projects/pacman-lib.orig/scripts/makepkg   2006-12-19
11:40:51.000000000 -0500
+++ makepkg 2006-12-20 20:03:13.000000000 -0500
@@ -590,10 +590,8 @@
    fi
 done

-
-
+#Generate/Check integrity checks
 if [ "$NOEXTRACT" = "1" ]; then
-    warning "Skipping source extraction       -- using existing src/ tree"
     warning "Skipping source integrity checks -- using existing src/ tree"
 else
     for integ in ${INTEGRITY_CHECK[@]}; do
@@ -636,7 +634,6 @@
                 fi
             done
             plain ""
-            exit 0
         #Validate integrity checks
         else
             integrity_sums=($(eval echo \${${integrity_name}s[@]}))
@@ -662,11 +659,20 @@
                     exit 1
                 fi
             else
-                warning "Integrity checks ($INTEGRITY_CHECK) are
missing or incomplete."
+                warning "Integrity checks ($integ) are missing or incomplete."
             fi
         fi
     done

+   if [ "$GENINTEG" = "1" ]; then
+       exit 0
+   fi
+fi
+
+#Extract sources
+if [ "$NOEXTRACT" = "1" ]; then
+    warning "Skipping source extraction       -- using existing src/ tree"
+else
     msg "Extracting Sources..."
     for netfile in "${source[@]}"; do
         unziphack=0




More information about the pacman-dev mailing list