Reply
Thread Tools
Posts: 1,359 | Thanked: 2,052 times | Joined on Nov 2009 @ Dublin, Ireland
#241
I have again lost my history. Now there is no garbage in files but I couldn't trigger any command pressing CTRL+R.

I have checked that file .ash_history is empty. There is also a file .ash_history.1918.new that is empty and a ash_history.3055.new with only 100 very old commands.
 

The Following 4 Users Say Thank You to ivgalvez For This Useful Post:
Posts: 261 | Thanked: 998 times | Joined on May 2010 @ The Netherlands
#242
Originally Posted by ivgalvez View Post
I have again lost my history. Now there is no garbage in files but I couldn't trigger any command pressing CTRL+R.

I have checked that file .ash_history is empty. There is also a file .ash_history.1918.new that is empty and a ash_history.3055.new with only 100 very old commands.
Hmm, that's real unfortunate news to hear.

When you close ash, it'll append all of its new history to .ash_history, completely re-load .ash_history (other instances of ash might have written to it, and re-loading trims it to MAX_HISTORY), write the trimmed history out to .ash_history.$PID.new, and rename .ash_history.$PID.new to .ash_history.

The used code for this is pretty solid (look for save_history() in libbb/lineedit.c), and I don't see any direct cause as to why you lost your history . The only clue we have is that rename() somehow failed, since you still got .ash_history.XXXX.new files. It's rather odd though that you experienced this twice - the only other report is from Mentalist Traceur, but he mentioned that the device was unstable.

You could add something like the following to your ~/.profile file. This will backup your old history to /home/user/hist_bak/ when you close ash. It won't solve the issue you're experiencing, but at least you won't lose all of your history. I'm sorry I can't be of more help.
Code:
trap 'NAME=`date +%Y%m%d_%H%M%S`_bak && \
  cp /home/user/.ash_history /home/user/hist_bak/$NAME' 0

Last edited by iDont; 03-06-2012 at 06:27 PM.
 

The Following 2 Users Say Thank You to iDont For This Useful Post:
Posts: 261 | Thanked: 998 times | Joined on May 2010 @ The Netherlands
#243
Since this thread got bumped anyway, let me take this opportunity to call for testers . Busybox-power 1.19.3power4 has been in extras-testing for a pretty long while now, and we most certainly can't leave out those extras users from shiny new versions, can we?

Also, for those that have noticed, busybox-powers' git repo has BusyBox 1.19.4 in it since a while now. It isn't pushed to the repositories because there is no code change between 1.19.4 and 1.19.3 + hotfixes, of which busybox-power 1.19.3power5 consists. Just a FYI .

Last edited by iDont; 03-06-2012 at 06:48 PM.
 
Posts: 38 | Thanked: 16 times | Joined on Apr 2010
#244
Hi,
Got a problem with creating user and group, at least, the postinstall script from the icecast2 deb had!
Can't install this app and busybox power report a prob in user and group creation, any ideas?
 
Posts: 261 | Thanked: 998 times | Joined on May 2010 @ The Netherlands
#245
Originally Posted by deed View Post
Hi,
Got a problem with creating user and group, at least, the postinstall script from the icecast2 deb had!
Can't install this app and busybox power report a prob in user and group creation, any ideas?
Thanks for reporting.

The line that causes this error in the postinst script is:
Code:
    adduser --system --disabled-password --disabled-login \
	--home /usr/share/icecast2 --no-create-home --group icecast
However, Maemo isn't shipped with adduser at all! Busybox-power does provide an adduser applet, but it takes different arguments than the postinst tries to use.

The solution is rather simple though. Execute:
Code:
apt-get install adduser
and icecast2 will install flawlessly . The postrm script also uses utilities from the adduser package (namely: deluser and groupdel), so you shouldn't uninstall the package right after installing icecast2. It seems like the package maintainer simply forgot to add a dependency on adduser to icecast2.
 
Posts: 1,359 | Thanked: 2,052 times | Joined on Nov 2009 @ Dublin, Ireland
#246
Originally Posted by iDont View Post
Hmm, that's real unfortunate news to hear.

When you close ash, it'll append all of its new history to .ash_history, completely re-load .ash_history (other instances of ash might have written to it, and re-loading trims it to MAX_HISTORY), write the trimmed history out to .ash_history.$PID.new, and rename .ash_history.$PID.new to .ash_history.

The used code for this is pretty solid (look for save_history() in libbb/lineedit.c), and I don't see any direct cause as to why you lost your history . The only clue we have is that rename() somehow failed, since you still got .ash_history.XXXX.new files. It's rather odd though that you experienced this twice - the only other report is from Mentalist Traceur, but he mentioned that the device was unstable.

You could add something like the following to your ~/.profile file. This will backup your old history to /home/user/hist_bak/ when you close ash. It won't solve the issue you're experiencing, but at least you won't lose all of your history. I'm sorry I can't be of more help.
Code:
trap 'NAME=`date +%Y%m%d_%H%M%S`_bak && \
  cp /home/user/.ash_history /home/user/hist_bak/$NAME' 0
OK I will try that, in fact in case it happens again it would be useful to know when really happened. It might be related to any other issue.
 
peterleinchen's Avatar
Posts: 1,534 | Thanked: 1,905 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#247
Originally Posted by iDont View Post
the only other report is from Mentalist Traceur, but he mentioned that the device was unstable.
Hey iDont,

just for the reports:
I also faced this a few times. But afair always after a hard shutdown (real sw_res). I found total senseless entries in history or even lines of my e-mails (which really scared me the first time )...

But just loosing the history sometimes is just a inconvenience, no more. And the positice effects of busybox enhanced is SO much more!
Thanks again for that package and support.
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 38 | Thanked: 16 times | Joined on Apr 2010
#248
Originally Posted by iDont View Post
Thanks for reporting.

The line that causes this error in the postinst script is:
Code:
    adduser --system --disabled-password --disabled-login \
    --home /usr/share/icecast2 --no-create-home --group icecast
However, Maemo isn't shipped with adduser at all! Busybox-power does provide an adduser applet, but it takes different arguments than the postinst tries to use.

The solution is rather simple though. Execute:
Code:
apt-get install adduser
and icecast2 will install flawlessly . The postrm script also uses utilities from the adduser package (namely: deluser and groupdel), so you shouldn't uninstall the package right after installing icecast2. It seems like the package maintainer simply forgot to add a dependency on adduser to icecast2.

Thank you very much IDont, I haven't thought about it myself...
Thanks also for the hard work about busybox-power, it's a huge enhancement for the N900.
Have a nice day.
 

The Following User Says Thank You to deed For This Useful Post:
Posts: 1,359 | Thanked: 2,052 times | Joined on Nov 2009 @ Dublin, Ireland
#249
Happened again, this time after using preenv from the command line. Could it be related?
 

The Following 2 Users Say Thank You to ivgalvez For This Useful Post:
Posts: 261 | Thanked: 998 times | Joined on May 2010 @ The Netherlands
#250
Originally Posted by ivgalvez View Post
Happened again, this time after using preenv from the command line. Could it be related?
Thanks, I'll check it out when I get back home. Are you able to reproduce the issue, or did it happen at random? Also, how did you close preenv and its parent shell (by executing "exit" twice, simply closing the window, or ..)?

Update: I'm still not able to (re)produce any kind of issue with the history handling. This issue is driving me nuts! I must have looked over the code a hundred times by now. What completely puzzles me, are the reports about the completely unrelated text in .ash_history; I can't seem to relate that to BusyBox in any way .

Last edited by iDont; 03-19-2012 at 04:48 PM.
 

The Following User Says Thank You to iDont For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 12:28 AM.