Skip to content

Commit

Permalink
Don’t apply changes from dcf07ad to anything but x86_64.
Browse files Browse the repository at this point in the history
  • Loading branch information
akhansen committed Dec 30, 2013
1 parent 11ebccd commit d7cc85b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lockwait.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if ($> == 0) {
# FIXME: add self-test for order & size of fields in struct.
# The "right way" is to use direct access, but compiled-C perl
# modules are problematic for runtime fink core.
my $struct_flock = pack("qqiss", 0, 0, 0, F_WRLCK, SEEK_SET);
my $struct_flock = pack(@PACKARGS@, 0, F_WRLCK, SEEK_SET);
my $lock_ok = fcntl(LOCK, F_SETLK, $struct_flock);
unless ($lock_ok || $! == EOPNOTSUPP || $! == ENOLCK) {
die "lockwait: Can't get lock: $!" unless $! == EAGAIN || $! == EACCES;
Expand Down
11 changes: 9 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,19 @@ sed "s|@PREFIX@|$basepath|g" <fink-dpkg-status-cleanup.in >fink-dpkg-status-clea
# dpkg-lockwait, but to GIVE the full path to the apt-get executable in
# apt-get-lockwait

# set arguments for pack() up in an architecture-appropriate manner
if [ "$architecture" = "x86_64" ]; then
packargs='"qqiss", 0, 0'
else
packargs='"lllliss", (0, 0), (0, 0)'
fi

echo "Creating lockwait wrappers..."
for prog in dpkg; do
sed -e "s|@PREFIX@|$basepath|g" -e "s|@PROG@|$prog|g" <lockwait.in >$prog-lockwait
sed -e "s|@PREFIX@|$basepath|g" -e "s|@PROG@|$prog|g" -e "s|@PACKARGS@|$packargs|" <lockwait.in >$prog-lockwait
done
for prog in apt-get; do
sed -e "s|@PREFIX@|$basepath|g" -e "s|@PROG@|$basepath/bin/$prog|g" <lockwait.in >$prog-lockwait
sed -e "s|@PREFIX@|$basepath|g" -e "s|@PROG@|$basepath/bin/$prog|g" -e "s|@PACKARGS@|$packargs|" <lockwait.in >$prog-lockwait
done

echo "Creating g++ wrappers..."
Expand Down

0 comments on commit d7cc85b

Please sign in to comment.