Notices


Reply
Thread Tools
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#1
And yes, the pun was intended.

I got tired of having to use separate tools to manage my packages. As it stood before, I had to use apt-get to install and remove remote packages, apt-cache to search for and gather information about packages, and dpkg to install local packages (after of course making sure the dependencies were installed with apt-get).

Since then, I've written a python script called aptly to allow me to take advantage of the most frequently options of the above tools. As an added bonus, aptly allows me to combine some of the above tools in one command without the use of "&&", grep, etc.

Here are the current features:
  • Install local deb files with automatic dependency resolution
  • Install local and remote packages from the same command:
    Code:
    aptly --i remote_package local_deb
  • Get information about multiple packages at once
  • Quickly update and upgrade installed packages:
    Code:
    aptly -uU
  • Install multiple files simultaneously:
    Code:
    aptly -i pkg1 pkg2 pkg3
    or sequentially:
    Code:
    aptly -i pkg1 i- pkg2
While I find this script helpful, I'm not sure if anyone else is interested, which is why I haven't built an official package yet. To try it out, download the *tar.gz archive and run:
Code:
tar -xvzf aptly-[version number].tar.gz
cd ./aptly
python ./apty --hep
If you are tired of having to type "python", then you should give aptly executable permissions (as root):
Code:
chmod +x ./aptly
Then you can just:
Code:
./aptly --help
BTW, the original development topic can be found here. I posted there originally because it was originally just a proof of concept and I hadn't expected to put as much effort into it as I have :-) (which albeit, still wasn't much)
Attached Files
File Type: gz aptly-2009-12-28.1.tar.gz (15.1 KB, 128 views)
__________________
aspidites | blog | aspidites@inbox.com

Last edited by aspidites; 2009-12-30 at 07:29.
 

The Following 6 Users Say Thank You to aspidites For This Useful Post:
Posts: 755 | Thanked: 406 times | Joined on Feb 2008 @ UK
#2
Does it do any intelligent management of space? I know that if you're not careful with massive lists of things you want to install the cached files alone can fill up the rootfs.
Does aptly download deb files the same way as apt-get or handle it itself - e.g. downloading to ~ ?
And I'm assuming afterwards it'll remove the cached files? (especially if it downloads to the rootfs).
 

The Following User Says Thank You to codeMonkey For This Useful Post:
Posts: 22 | Thanked: 1 time | Joined on Dec 2009 @ Dortmund, Germany
#3
Thanks for the tool!
For me only unzip works with
Code:
tar -xvzf aptly-[VERSION].tar.gz
__________________
They say, that the journey can be more important than the destination. In mountainbiking there is no destination; just a bike, a rider and a place to ride...
 

The Following User Says Thank You to NuMetal For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#4
codeMonkey, aptly wraps apt-get so there is no smart memory management. i will play with the idea and see what i can come up with. more than likely i will add an option to specify how full root should be before caching files in home.

NuMetal, thanks. updated OP.

update
The only way I can think of to determine how much space in root a package will take up is to download the deb into ~/, run dpkg on it to get its file contents, then calculate the size of all files that would be installed into /. As such, I've decided to just add an option to allow you to choose where to save package files, optionally deleting them afterwards.

When I have time, I'll add a config file so that you can have sane defaults for these kinds of things.

update 2
I implemented installing to a different cache. Details in the dev form about how much of a pain it has been, lol. Will release on next version. Is anyone actually using this thing?
__________________
aspidites | blog | aspidites@inbox.com

Last edited by aspidites; 2009-12-27 at 04:50.
 

The Following 2 Users Say Thank You to aspidites For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#5
I finally finished implementing custom cache directories (and it now plays nicely with other commands ;-)). This is also the first version to actually have a config file. I'll update the OP with the new package.

Also, I think I'll start a garage page for this thing. Even if it isn't used by anyone else, it will be handy for me to have version control and a backup just in case something happens to my N900 or computer.

BTW, while packages aren't removed automatically (to keep the cache clean, it is trivial add the option:
Code:
aptly -ic pkg1 pkg2...
Or, if you are low on space in root...
Code:
aptly -Cic pkg1 pkg2...
__________________
aspidites | blog | aspidites@inbox.com

Last edited by aspidites; 2009-12-28 at 10:31.
 

The Following User Says Thank You to aspidites For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#6
Not only is a working versin of aptly now in aptly; but I have added a configuration option that allows you to have aptly automatically clean your cache directories every time it is run.

Also, aptly is smart enough to ask you if you want to update before upgrading.

Next I will be adding the ability to install packages based on selections from search results.

Please give aptly a shot and tell me if anything is broken or missing, thamks.
__________________
aspidites | blog | aspidites@inbox.com
 

The Following User Says Thank You to aspidites For This Useful Post:
Posts: 27 | Thanked: 2 times | Joined on Dec 2009 @ Sydney, Australia
#7
dude, awesome, keep it up
 

The Following User Says Thank You to springah For This Useful Post:
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#8
Work continues on Aptly. I was gonna wait until my day off to do any hacking, but I got inspired. This iteration removes a couple of module dependencies and adds numbered search results. It's not quite ready for prime time, as I still have to re-factor more code and colorize (yes, I found a way to do so that is faster than my prior attempts) output!.

In lieu of a new package version, here is a screenshot:

The above was generated by issuing the following:
Code:
aptly -s emulator
__________________
aspidites | blog | aspidites@inbox.com
 
Reply


 
Forum Jump


All times are GMT. The time now is 03:34.