Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.
Thread: Installing packages from backup offline
is a discussion within theiPhone / iPod Touch SDK | Development Discussion
forums, a part of the3rd Party Apps For iPhone | iPod Touch
section;I am trying to create a way to download packages ahead of an anticipated Cydia server overload and install them when the servers are unavailable. So far I can get
...-
01-14-2012, 07:58 PM #1
Installing packages from backup offline
I am trying to create a way to download packages ahead of an anticipated Cydia server overload and install them when the servers are unavailable. So far I can get all of the debs for your currently installed packages and install them through an AutoInstall method a little too complex for mass distribution. I am seeking any help for this project. If you want a copy of my current method, PM me.
Let's go Red Wings!
.
-
01-14-2012, 08:11 PM #2iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
I'm thinking it's going to be easier to use dpkg and script it instead of an autoinstall via cydia. I am focusing on getting the dependencies right as of now. By filtering the status file of gsc.packages/other "junk" and keeping package names, depends, and pre-depends I've got a package list with dependency lists. I've got a script already that'll read this file and dpkg -i the debs stored via your script, but I'm stuck on an easy way to incorporate the depends and pre-depends efficiently.
-
01-14-2012, 08:15 PM #3
Can I see a list that you generated?
Let's go Red Wings!
.
-
01-14-2012, 08:22 PM #4iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Yeah let me upload it. I just used grep and cat on /var/lib/dpkg/status grabbing only
Package:
Depends:
Pre-Depends:
Then I filtered the gsc.packages out with grep and saved to ~/package.txt
I'll pm you a link to my list In just one minute.
Here's just a quick cut and paste from the list I created. I'll post the command I used if you need as well.
I don't know if I'll need to add a conflicts to the script as well.Package: system-cmds
Depends: pam, firmware-sbin
Pre-Depends: dpkg (>= 1.14.25-8)
Package: zip
Package: net.howett.cydelete
Depends: mobilesubstrate, preferenceloader (>= 2.0), apt, bash, grep, coreutilsLast edited by A3gOwner; 01-14-2012 at 08:31 PM.
-
01-14-2012, 08:40 PM #5
Since the dependencies come in order after the packages, couldn't you just install all of the packages in the order that they appear?
I figured out the command in under a minute
Let's go Red Wings!
.
-
01-14-2012, 08:46 PM #6iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Yes but I'm trying to do it with a dependency and predependency check before installing said package. To lower the chances of issues if/when it's implemented. My status file doesn't seem to be in perfect order if that makes sense.
-
01-14-2012, 08:48 PM #7
So install the packages backwards and when it comes to the "package:" line check if the dependencies are good and if not abort installation of that package?
I'll look into it a little more.
Let's go Red Wings!
.
-
01-14-2012, 08:51 PM #8iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
That's what I'm doing essentially. I don't want the abort if I have the deb for the depend. Since this comes from a working phone there's no reason not to have the depend deb already. Plus if this is to be released for more than say a couple people's personal needs it's got to be packaged and easy to use.
Last edited by A3gOwner; 01-14-2012 at 08:54 PM.
-
01-14-2012, 09:00 PM #9
I just tested the 'dpkg -i' command and found that it refuses to install a package without the dependencies already installed.
I'm thinking strip it of the "Package:", "Depends:", and "Pre-Depends", then replace the commas with newlines, then strip it of duplicates, then import every line of the file from bottom to top into a "dpkg -i ${$line}*.deb" command.Last edited by Zokunei; 01-14-2012 at 09:08 PM.
Let's go Red Wings!
.
-
01-14-2012, 09:10 PM #10iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Yeah I could have saved you the trouble there. It's just gonna take some tweaking time to get the script right. It's all going to come down to handling the depends and getting them installed before initiating the install of main package.
Edit scratch above. That's just it how to achieve this without having to install multiple packages multiple times. If you do all that then strip out all multiple depends and use your said command.Last edited by A3gOwner; 01-14-2012 at 09:13 PM.
-
01-14-2012, 09:10 PM #11
Then again, which duplicates are stripped could lead to problems.
Let's go Red Wings!
.
-
01-14-2012, 09:14 PM #12iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
-
01-14-2012, 09:15 PM #13Livin the iPhone Life
- Join Date
- Jan 2010
- Location
- Dallas, TX
- Posts
- 2,322
- Thanks
- 9
- Thanked 251 Times in 213 Posts
So, question? I have no idea how you two know how to do what ur doing but are you saying that the dependencies ALSO have to be installed in a certain order? They can't all be installed at once???
-
01-14-2012, 09:19 PM #14iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Essentially things have to be installed in a certain order. Cydia and apt take care of this for you. Dependencies before main package because said main package needs said depend package to function/install. Then since packages share depend with other packages which may have there own depend packages. Getting it to install everything only once is the tricky part otherwise you may install a package 6-8x.
Last edited by A3gOwner; 01-14-2012 at 09:21 PM.
-
01-14-2012, 09:19 PM #15
Also strip the info in parentheses.
Let's go Red Wings!
.
-
01-14-2012, 09:22 PM #16iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Way ahead of you there. I though I edited it out but I didn't.
-
01-14-2012, 09:22 PM #17Livin the iPhone Life
- Join Date
- Jan 2010
- Location
- Dallas, TX
- Posts
- 2,322
- Thanks
- 9
- Thanked 251 Times in 213 Posts
-
01-14-2012, 09:23 PM #18iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Edit: re read that. No The only issue I have is just reinstalling packages over and over in the process. It's easy to do a depend with a depend.
Last edited by A3gOwner; 01-14-2012 at 09:26 PM.
-
01-14-2012, 09:25 PM #19Livin the iPhone Life
- Join Date
- Jan 2010
- Location
- Dallas, TX
- Posts
- 2,322
- Thanks
- 9
- Thanked 251 Times in 213 Posts
It appears from your previous post that 'system-cmds' (which is a dependency) is dependent on other dependencies first but ALSO has a pre-dependency! That sux!!!
...and, if I understand correctly, you're trying to strip/remove those dependencies/pre-dependencies from 'said' dependent file. Am I on the same page?Last edited by thazsar; 01-14-2012 at 09:27 PM.
-
01-14-2012, 09:27 PM #20iPhone Underground
- Join Date
- Jun 2009
- Location
- Underground
- Posts
- 1,172
- Thanks
- 2
- Thanked 117 Times in 110 Posts
Sorry I was confusing myself along the way. I edited a couple of my posts to kinda clear things up. I'm not real good at explaining what going on sometimes.
It's getting it to only install every package only once which includes all dependency as well. So not Really stripping those out just making sure they are there first. Which I think I have it figured out.Last edited by A3gOwner; 01-14-2012 at 09:31 PM.




LinkBack URL
About LinkBacks
Reply With Quote
