You are not logged in.

#1 2003-01-26 19:29:18

orelien
Forum Fellow
From: France
Registered: 2002-12-05
Posts: 220
Website

Try to run makepkg while pacman is running...

I tried to run makepkg, while pacman was downloading a package, and I got the following error:

error: unable to lock pacman database.
       if you're sure pacman is not already running, you
       can remove /tmp/pacman.lck
==> ERROR: Dependency Check Failed:

Maybe a "dependency check failure" is not the appropriate error message?
makepkg should perhaps handle the case where pacman is already running (or that there is an existing lock file)?

Sorry for disturbing everyone, it is just a detail...

Offline

#2 2003-01-27 08:06:23

ody
Member
From: Manchester, UK
Registered: 2002-08-12
Posts: 216
Website

Re: Try to run makepkg while pacman is running...

well the first stage of makepkg is to check dependencies, so actualy that is the point if fails at.. smile

Offline

#3 2003-01-27 09:05:51

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: Try to run makepkg while pacman is running...

so stage 0 should be
if (pacman.lck) {
cout << "error: unable to lock pacman database.
       if you're sure pacman is not already running, you
       can remove /tmp/pacman.lck "
  exit(0);
}

don't mind the syntax, it's a combination of c and java smile


apt-get install arch

Offline

#4 2003-01-27 11:41:16

orelien
Forum Fellow
From: France
Registered: 2002-12-05
Posts: 220
Website

Re: Try to run makepkg while pacman is running...

In fact, makepkg is using pacman to check dependencies:

  msg "==> Checking Dependencies..."
  missdep=`pacman -T ${depends[@]}`
  ret=$?
  if [ "$ret" != "0" ]; then
    if [ "$ret" = "127" ]; then
      msg "==> ERROR: Dependency Check Failed:"
      ...
    else
      msg "==> ERROR: pacman returned a fatal error."
    fi
    exit 1
  fi

If the returned value is 127, it displays "==> ERROR: Dependency Check Failed:"

The problem is that pacman can return an error code of 127 in 2 cases: "dependency failure" OR "pacman already locked".

I think pacman should return an error different from 127 when there is already a lock.
As a consequence, without changing makepkg, we would have: "ERROR: Dependency Check Failed" when dependencies checking fails and: "ERROR: pacman returned a fatal error" for other cases.

Offline

Board footer

Powered by FluxBB