[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#850172: apt: feature request: wait for lock



Package: apt
Version: 1.0.9.8.3
Severity: normal

Hi folks,

i like this new shorter and unified apt frontend called apt, now you dont have to think about which one ist it, apt-cache, apt-get or apt-whatever, you can just go on and you have a PROGRESSBAR!!!!!

so thanks a realy lot of for this improvemnet of the debian pacakging system tools

but there is one thing i, an sure many others are missing, because we like to do multi tasking and apt dosent allow it, which is good of cause, but multitasking is as we all now just a simulation which is using time sharing technologie, if i remeber correctly the fist unix concept/version/whatever was also called "timesharing system"

so why add not an option called 

--wait

or sort 

-w

that fixes problems like this:

$ sudo apt install texlive-latex-extra
[sudo] password for treaki: 
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

and the problems that came with it: you have to remember things.

Like i am doing a hundert things at one time (possible not that much but it feels like (or even more)), or better i have to keep in mind a hundert things that i will have to do 'til the end of the week, like get this running and parraly get the other thing running on my system, where both need packages, like i am installing on the one terminal the web server system (with tomcat, mariadb, apache and all that stuff working togeter for my dynamic website development system stuff) and on the other terminal i am writing the documentation of all that because my boss wants to have all employes replacable everytime and is willing to pay me for wasting my time generating nice pdfs for him (hes an total noob but plz dont tell him, he luckely dont know my nickname ;0 ...) so to get that documentation mega fency (which my boss likes and makes me on the otherand kindoff unreplacable...) i use latex.

so back to the topic:

i am doing some preparement on my system for generating fancy pdfs and i want to do that while i am waiting for the developent enviorment to be installed,

so what i have to do now is

i need to try that out but i need that package for it, but i havent it installed right now and i cant trigger the instalation of it cause the system is locked so i have to keep it in mind and watch the other terminal while that is doing stuff until it is done to start the other job you know:

BRAINFUCK

so it is highly possible that i forgett to try that thing i wanted to try out because of that i have so much to remember...


so following would be nice
 

terminal one:

$sudo apt install much much much packages that i have to install which will take some time

terminal two:

$ sudo apt install texlive-latex-extra
[sudo] password for treaki:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
$#oh i have to wait but why not let the system wait for me
$sudo apt --wait install texlive-latex-extra
[sudo] password for treaki:
I: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
I: Wait mode activated, doing some fuser lsof whatever
I: PID X is using the lock /var/lib/dpkg/lock
I: waiting for it to be terminated til [TIMESTAMP] (something working with interupts would be nice for the system load but i dont have problems with polling either)
I: recognised end of PID X at [TIMESTAMP] continue after waited Y minutes and Z secounds
I: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
I: Wait mode activated, doing some fuser lsof whatever
I: PID  is using the lock /var/lib/dpkg/lock
I: PID XT is using the lock /var/lib/dpkg/lock
I: waiting for it to be terminated til [TIMESTAMP] (something working with interupts would be nice for the system load but i dont have problems with polling either)
I: recognised end of PID XT at [TIMESTAMP] continue after waited XX secounds
I: got lock to /var/lib/dpkg/lock
I: Wait mode done, waited for 2 processes in total XY minutes and XZ secounds, contuniing normal run...
Reading package lists... Done
Building dependency tree... 0%
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libavdevice55 libclass-isa-perl libswitch-perl
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  preview-latex-style texlive-latex-extra-doc
The following NEW packages will be installed:
  preview-latex-style texlive-latex-extra texlive-latex-extra-doc
0 upgraded, 3 newly installed, 0 to remove and 68 not upgraded.
Need to get 335 MB of archives.
After this operation, 492 MB of additional disk space will be used.
Get:1 http://http.debian.net/debian/ jessie/main preview-latex-style all 11.87-3+deb8u1 [318 kB]
Get:2 http://http.debian.net/debian/ jessie/main texlive-latex-extra all 2014.20141024-1 [7,604 kB]
Get:3 http://http.debian.net/debian/ jessie/main texlive-latex-extra-doc all 2014.20141024-1 [327 MB]
Fetched 335 MB in 3min 16s (1,700 kB/s)                                                                                                    
Selecting previously unselected package preview-latex-style.
(Reading database ... 258804 files and directories currently installed.)
Preparing to unpack .../preview-latex-style_11.87-3+deb8u1_all.deb ...
Unpacking preview-latex-style (11.87-3+deb8u1) ...
Selecting previously unselected package texlive-latex-extra.
Preparing to unpack .../texlive-latex-extra_2014.20141024-1_all.deb ...
Unpacking texlive-latex-extra (2014.20141024-1) ...
Selecting previously unselected package texlive-latex-extra-doc.
Preparing to unpack .../texlive-latex-extra-doc_2014.20141024-1_all.deb ...
Unpacking texlive-latex-extra-doc (2014.20141024-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up preview-latex-style (11.87-3+deb8u1) ...
Setting up texlive-latex-extra-doc (2014.20141024-1) ...
Processing triggers for tex-common (5.03) ...
Running mktexlsr. This may take some time... done.
Setting up texlive-latex-extra (2014.20141024-1) ...
Processing triggers for tex-common (5.03) ...
Running mktexlsr. This may take some time... done.
Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.


So that would things make a lot of more user frendly, you may sould also enable an extensive usage of the system bell terminal special caracter and/or the beep command to notify about that it is going on, some nice sound like the old antivirus software did teese past days.

So i hope you understand my point of view and the need/usability of such a feature for all debian users and would be realy realy glad if you all could implement such a thing.

thanks a very grate lot in advance 

treaki



-- Package-specific info:

-- (no /etc/apt/preferences present) --


-- (/etc/apt/sources.list present, but not submitted) --


-- System Information:
Debian Release: 8.6
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages apt depends on:
ii  debian-archive-keyring  2014.3
ii  gnupg                   1.4.18-7+deb8u3
ii  libapt-pkg4.12          1.0.9.8.3
ii  libc6                   2.19-18+deb8u6
ii  libgcc1                 1:4.9.2-10
ii  libstdc++6              4.9.2-10

apt recommends no packages.

Versions of packages apt suggests:
pn  apt-doc     <none>
ii  aptitude    0.6.11-1+b1
pn  dpkg-dev    <none>
ii  python-apt  0.9.3.12
ii  synaptic    0.81.2

-- no debconf information


Reply to: