Reply
Thread Tools
Posts: 32 | Thanked: 7 times | Joined on Jun 2012 @ Russian Federation
#11
Hi! After installation of this package all other packages (not from Store) is not installing (error "Installation aborted"). Please, check it and fix )
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#12
Try with this line:

Code:
Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/AptBackup/; if [ ! -d $BKPDIR ]; then mkdir -p $BKPDIR; fi; while read pkg; do cp $pkg $BKPDIR; done"};
This is what I have and iirc modified that, because apt/dpkg bails out on any error (mkdir returns "1" when directory already present).
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#13
Hi
I added auto-backup to N9QT (thanks to minimos & peterleinchen). It also have option to create icon on the desktop for quick ON/OFF
 

The Following 3 Users Say Thank You to Schturman For This Useful Post:
coderus's Avatar
Posts: 6,436 | Thanked: 12,699 times | Joined on Nov 2011 @ Ängelholm, Sweden
#14
modified aptbackup script to be more flexible
aptbackup.sh automatically changing file extension to .deb before copying
/etc/apt/apt.conf.d/02backup
Code:
Dpkg::Pre-Install-Pkgs {"while read pkg; do /home/user/aptbackup.sh $pkg; done"};
/home/user/aptbackup.sh
Code:
#!/bin/sh

PKG=$1
BKPDIR=/home/user/MyDocs/AptBackup
FNAME=$(echo $PKG | sed -re "s/.*(\/)([^\/]*$).*/\2/" | sed -e "s/\.[^\.]*$/.deb/")
mkdir -p $BKPDIR
cp -f $PKG $BKPDIR/$FNAME;
dont forget to chmod +x aptbackup.sh
__________________
Telegram | Openrepos | GitHub | Revolut donations

Last edited by coderus; 2013-06-24 at 19:00.
 

The Following 2 Users Say Thank You to coderus For This Useful Post:
Posts: 646 | Thanked: 1,124 times | Joined on Jul 2010 @ Espoo, Finland
#15
Originally Posted by coderus View Post
aptbackup.sh automatically changing file extension to .deb before copying
Nice idea! BTW I always wondered why the packages from Ovi (and especially their file extensions) can have such wacky names
 
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#16
Hmmm...
You mean if previous file looks like:
Code:
echo 'Dpkg::Pre-Install-Pkgs {"BKPDIR=/home/user/MyDocs/Downloads/OVIcatch; if [ ! -d $BKPDIR ]; then mkdir -p $BKPDIR; fi; while read pkg; do cp $pkg $BKPDIR; done"};' > /etc/apt/apt.conf.d/02backup
Now it include:
Code:
echo 'Dpkg::Pre-Install-Pkgs {"while read pkg; do /home/user/aptbackup.sh $pkg; done"};' > /etc/apt/apt.conf.d/02backup
and your new script ?
I'm right ?

PS. Checked, it work perfectly

Last edited by Schturman; 2013-06-22 at 17:07.
 
Reply


 
Forum Jump


All times are GMT. The time now is 02:02.