[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-11-08 Thread Phillip Susi
lockfile from the procmail package will do it.


** Changed in: util-linux (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-10-24 Thread Jarno Suni
flock is used for managing locks from shell script. dpkg uses lock file
/var/lib/dpkg/lock, but I can not manage it by flock. What is right tool
for the job I want to do then?

** Changed in: util-linux (Ubuntu)
   Status: Invalid => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-10-24 Thread Phillip Susi
No; what you want to do and what flock is intended to do are different
things.  You're complaining that you can't use a hammer to screw in a
screw.  You're using the wrong tool for the job.


** Changed in: util-linux (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-10-12 Thread Jarno Suni
Phillip Susi, I never claimed it did. But I may want to lock the
/var/lib/dpkg/lock beforehand, so that system is guaranteed to be
unchanged before I launch apt-get in a script. So I think the status
change you made, and the justification you gave is invalid.

** Changed in: util-linux (Ubuntu)
   Status: Invalid => New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-10-12 Thread Phillip Susi
dpkg does not use flock(); it uses the lock file /var/lib/dpkg/lock.


** Changed in: util-linux (Ubuntu)
   Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

[Bug 1720541] Re: flock does not lock dpkg lock file properly

2017-09-30 Thread Jarno Suni
** Description changed:

- 
  Test:
  sudo flock /var/lib/dpkg/lock -c \
  'echo 1; apt-get -o Debug::NoLocking=true check; echo 2; apt-get check'
  
  Expected behavior:
  apt-get fails in stage 2.
  
  
- Workaround (needs moreutils package)
+ Workaround (needs moreutils package, which is not installed by default):
  
  sudo lckdo /var/lib/dpkg/lock /bin/sh -c \
  'echo 1; apt-get -o Debug::NoLocking=true check; echo 2; apt-get check'
  
  
  Similarly, flock does not recognize lock set by e.g. apt-get.
+ 
+ man lckdo:
+ "Now that util-linux contains a similar command named flock, lckdo is 
deprecated, and will be removed from some  future version of moreutils."
+ 
+ So developer can not rely on lckdo.
+ 
  
  ProblemType: Bug
  DistroRelease: Ubuntu 14.04
  Package: util-linux 2.20.1-5.1ubuntu20.9
  ProcVersionSignature: Ubuntu 4.4.0-96.119~14.04.1-generic 4.4.83
  Uname: Linux 4.4.0-96-generic x86_64
  ApportVersion: 2.14.1-0ubuntu3.25
  Architecture: amd64
  CurrentDesktop: XFCE
  Date: Sat Sep 30 16:30:50 2017
  EcryptfsInUse: Yes
  InstallationDate: Installed on 2014-09-21 (1105 days ago)
  InstallationMedia: Ubuntu-Studio 14.04.1 LTS "Trusty Tahr" - Release amd64 
(20140722.1)
  SourcePackage: util-linux
  UpgradeStatus: No upgrade log present (probably fresh install)
  mtime.conffile..etc.cron.weekly.fstrim: 2014-09-21T13:07:51.420447

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1720541

Title:
  flock does not lock dpkg lock file properly

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1720541/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs