apt-get flushes read buffer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Have a script that installs all the additional programs (chromium-browser, glabel, gimp,,,, etc) after installing the base 14.04 system. Have used this same script for many relase of Ubuntu. When I run it now it appears that the first call to apt-get will purge the read buffer on the script. Example of the script
while read cmdtodo prodtoinst
do
apt-get -y $cmdtodo $prodtoinst
done < $infile
The infile contains a list of commands and products
remove rythmbox
install glabel
install gimp
install gnucash
What I see at the terminal after calling the user install script is the output of apt-get remove rythmbox and then the rest of the lines in the infile (the "install glabel" "install gimp" etc get outputed to the terminal before the completion of the apt-get remove command. The installs stop.
If the user command is immediately re-run the first product fails because it is either installed or uninstalled and the next product is picked up and run. Again during the run the infile buffer is flushed to the terminal and the installs stop.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: apt 0.9.14.1ubuntu1
ProcVersionSign
Uname: Linux 3.12.0-7-generic x86_64
ApportVersion: 2.12.7-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Dec 17 14:36:52 2013
InstallationDate: Installed on 2013-12-17 (0 days ago)
InstallationMedia: Ubuntu-GNOME 14.04 "Trusty Tahr" - Alpha amd64 (20131217)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: No upgrade log present (probably fresh install)
No activity on this bug report. Was wondering if it is valid to call apt-get within as scripts read file loop? I have changed the script to read the file into a local variable products and use a "for products in $productlist" to loop through the calls to "apt-get install $product".