View Single Post
Posts: 402 | Thanked: 229 times | Joined on Nov 2009 @ Missouri, USA
#1
update 6
-fixed bug mentioned before about option order.
-created topic in Applications to see if this is worth distributing
-all changes from now on will be in aptly/CHANGES from now on

update 5
- regression. re-factoring the code as I have caused some options to be evaluated in th e wrong order. This will be fixed in the next version (in particular --install and --update
- packaging seems to be a lot of work. I will announce this in Applications and if there is enough generated interest I'll officially package it.
update 4
- re-factored/cleaned code
- syntax is more apt-get like in that instead of having to type:
Code:
aptly -i pkg1,pkg2,pkg3
you can type:
Code:
aptly -i pkg1 pkg2 pkg3
- apps are now installed simultaneously instead of sequencially*
- help command is a bit more detailed:


I'm thinking about packaging this shortly and maybe even pushinging to maemo-devel.

update 3
- experimental support for dependency handling for local *.deb files added.
- added todo list and licensing.

update 2
I finally got the basics down (after sacrificing some initial features), and I rather like it. It's a command line app, so there isn't much to screenshot, but here it is anyways


Here is a comparison of doing things with aptly versus pure apt tools:

Update & Upgrade
Code:
# old way
apt-get update && apt-get upgrade

# aptly
aptly -uU
Install & remove simultaneously
Code:
# old way
apt-get remove some_package some_other package && apt-get install new_package

# aptly
aptly -r some_package,some_other_pacakge -i new_package
Install from multiple sources
Code:
# old way
apt-get install some_package_name && dpkg -i some_deb_file

# aplty
aptly -i some_package_name,soem_deb_file
Note that for the above to work, aptly has to be in your PATH. Otherwise, you should run as follows:
Code:
python ./aptly -i some_app
# if you have made aptly executable
./aptly -i some_app

update 1

You can now string commands together. A common use-case is that something like:
Code:
apt-get update && apt-get install app
can be done like this:
Code:
aptly --upgrade --install vim
ore more succiently:
Code:
aptly -ui vim
original post
As the title suggests, I'm writing an apt-get, apt-cache, and dpkg wrapper in python called aptly. In addition to being a learning exercise, I wanted a way to consolidate the functions of all of these programs into one tool.

Here is a screencast of it in it's primitive state.

I am however running into the following problems:
  • On most systems, as long as you set the executable flag on a file and have the appropriate header, you can run it without actually prefixing it with the interpreter (ie "aptly" instead of "python aptly". I can't seem to do this on my N900. (thanks fatalsaint)
  • I can't seem to find a command that will allow me to distinguish from which repo/catalog an app came from. I would use this information to allow a user to specify from which rep/catalog a piece of software comes from. short of disabling and reenabling repos manually, this doesn't seem to be something that apt does natively
  • I have noticed that modifications to /etc/apt/sources.list.d/hildon-application-manager.list by hand don't seem to appear in App.manager. filed a bug report, but doubt it'll get looked into any time soon
__________________
aspidites | blog | aspidites@inbox.com

Last edited by aspidites; 2009-12-26 at 04:15.
 

The Following 2 Users Say Thank You to aspidites For This Useful Post: