Avopkg?

Hi all,

I updated my avogadro tree today, and when I went to reinstall my
plugin, I got the following error:

$ sudo make install
Avopkg v1.0
Usage:
avopkg filename Install package
avopkg -f filename Force installation
avopkg -pack manifest Create new package
avopkg -wizard [package_name] Interactively create new package manifest
avopkg -info filename Show information about package in filename
avopkg -query [package_name] Show information about installed package
Type ‘man avopkg’ for more details
make[3]: *** [CMakeFiles/XtalOpt.avo] Error 255
make[2]: *** [CMakeFiles/XtalOpt.avo.dir/all] Error 2
make[1]: *** [CMakeFiles/install.dir/rule] Error 2
make: *** [install] Error 2

Why has the behavior of make install changed? "avopkg xtalopt.so"
doesn’t work either, as the output seems to suggest. Can avopkg be
optional, and let sudo make install work as usual?

Dave

Hi all,

I updated my avogadro tree today, and when I went to reinstall my
plugin, I got the following error:

$ sudo make install
Avopkg v1.0
Usage:
avopkg filename Install package
avopkg -f filename Force installation
avopkg -pack manifest Create new package
avopkg -wizard [package_name] Interactively create new package manifest
avopkg -info filename Show information about package in filename
avopkg -query [package_name] Show information about installed package
Type ‘man avopkg’ for more details
make[3]: *** [CMakeFiles/XtalOpt.avo] Error 255
make[2]: *** [CMakeFiles/XtalOpt.avo.dir/all] Error 2
make[1]: *** [CMakeFiles/install.dir/rule] Error 2
make: *** [install] Error 2

Why has the behavior of make install changed? "avopkg xtalopt.so"
doesn’t work either, as the output seems to suggest. Can avopkg be
optional, and let sudo make install work as usual?

run ‘make manifest’ or ‘avopkg -wizard’ (should be the same). Then you will be able to run make package to build package or make install to make package and install it. Note, that you don’t need root privileges - if you run as user, plugin will be installed into your $HOME.

I’ve wrote wiki page about it: http://avogadro.openmolecules.net/wiki/Avopkg
Feel free to ask something else if there’s something unclear


Regards,
Konstantin

P.S. it would be logical to call make manifest automatically if manifest is missing. But I’ve ran into strange problem with target dependencies - wizard was called every time make install was run, which is incorrect. If someone is interested, feel free to propose workaround


Regards,
Konstantin

“avopkg xtalopt.so” doesn’t work either, as the output seems to suggest.

It shouldn’t. Correct usage is “avopkg package_name.avo”. Wizard will automatically include *.so into file list of manifest, or you can write it by hands (very easy)


Regards,
Konstantin

On Wed, May 5, 2010 at 4:15 PM, Konstantin Tokarev annulen@yandex.ru wrote:

“avopkg xtalopt.so” doesn’t work either, as the output seems to suggest.

It shouldn’t. Correct usage is “avopkg package_name.avo”. Wizard will automatically include *.so into file list of manifest, or you can write it by hands (very easy)

Ah, I see. I’ll give that a try tomorrow.

Dave


Regards,
Konstantin

On Wed, 5 May 2010 16:53:12 -0400
David Lonie loniedavid@gmail.com wrote:

On Wed, May 5, 2010 at 4:15 PM, Konstantin Tokarev
annulen@yandex.ru wrote:

“avopkg xtalopt.so” doesn’t work either, as the output seems to
suggest.

It shouldn’t. Correct usage is “avopkg package_name.avo”. Wizard
will automatically include *.so into file list of manifest, or you
can write it by hands (very easy)

Ah, I see. I’ll give that a try tomorrow.

Hi, Dave
Have you solved the problem with package installation and avopkg? If you
have questions or suggestions about avopkg, please write


Regards,
Konstantin

On Sun, May 9, 2010 at 11:35 AM, Konstantin Tokarev annulen@yandex.ru wrote:

Hi, Dave
Have you solved the problem with package installation and avopkg? If you
have questions or suggestions about avopkg, please write

Sorry for the delay – it’s been a hectic couple of days…

I did get the plugin to install with avopkg, and I have a couple of ideas:

  1. It should be possible to just install the package the “old
    fashioned” way, e.g. “make install” will just copy the files over. I
    have several people using some of my extensions, and the extra step is
    not going over very well at the moment – I like the idea of avopkg,
    but it should be optional.

  2. Is there a way to uninstall a package that is already installed?

  3. Can I specify the default values for the wizard in the CMake file?

  4. Along the lines of (1), perhaps if all of the wizard values are
    specified in CMakeLists.txt, then avopkg could automatically create
    the manifest without the need to prompt the user. Any deviations from
    cmake; make; make install should be optional, or only for power users.
    Another possibility would be to add an avopkg option to cmake to turn
    on/off package generation.

Thoughts?

Dave

On Wed, 12 May 2010 08:09:34 -0400
David Lonie loniedavid@gmail.com wrote:

On Sun, May 9, 2010 at 11:35 AM, Konstantin Tokarev
annulen@yandex.ru wrote:

Hi, Dave
Have you solved the problem with package installation and avopkg?
If you have questions or suggestions about avopkg, please write

Sorry for the delay – it’s been a hectic couple of days…

I did get the plugin to install with avopkg, and I have a couple of
ideas:

  1. It should be possible to just install the package the “old
    fashioned” way, e.g. “make install” will just copy the files over. I
    have several people using some of my extensions, and the extra step is
    not going over very well at the moment – I like the idea of avopkg,
    but it should be optional.

I’ve overridden built-in install target of CMake. Probably, it’ll be
better to call new target “install-package” or something alike, than
make install will work as it worked before. Do you like this solution?

  1. Is there a way to uninstall a package that is already installed?

Yes.

avopkg -remove packagename (not documented yet, used internally for
proper re-installation)

To know package name
avopkg -list

To get info about package
avopkg -query packagename

This three commands work only with avopkg from 1.1, 1.0.1 includes very
basic package manager (wizard/pack/install only)

  1. Can I specify the default values for the wizard in the CMake file?

Not yet. But default manifest could be hardcoded into CMakeLists.txt or
placed somewhere else

  1. Along the lines of (1), perhaps if all of the wizard values are
    specified in CMakeLists.txt, then avopkg could automatically create
    the manifest without the need to prompt the user. Any deviations from
    cmake; make; make install should be optional, or only for power users.
    Another possibility would be to add an avopkg option to cmake to turn
    on/off package generation.

See 1

Thanks for feedback!


Regards,
Konstantin

  1. It should be possible to just install the package the “old
    fashioned” way, e.g. “make install” will just copy the files over. I
    have several people using some of my extensions

But imagine, that you could simply send them package file with one-step
installation…


Regards,
Konstantin

  1. Can I specify the default values for the wizard in the CMake file?

It’s possible to create manifest from CMake, but with different
approach: set some CMake variables (as it done for deb/rpm in CPack),
create manifest.in with values of those variables replaced with
@VARIABLE_NAME@ (as in avopkg.in itself), and add configure_file
operation => configured manifest without interactive steps

I’ll try to implement this scheme


Regards,
Konstantin

Hi Konstantin,

On Wed, May 12, 2010 at 8:56 AM, Konstantin Tokarev annulen@yandex.ru wrote:

I’ve overridden built-in install target of CMake. Probably, it’ll be
better to call new target “install-package” or something alike, than
make install will work as it worked before. Do you like this solution?

That would be a very reasonable solution.

Dave

On Thu, 13 May 2010 09:30:35 -0400
David Lonie loniedavid@gmail.com wrote:

Hi Konstantin,

On Wed, May 12, 2010 at 8:56 AM, Konstantin Tokarev
annulen@yandex.ru wrote:

I’ve overridden built-in install target of CMake. Probably, it’ll be
better to call new target “install-package” or something alike, than
make install will work as it worked before. Do you like this
solution?

That would be a very reasonable solution.

Done.


Regards,
Konstantin

On Thu, 13 May 2010 09:30:35 -0400
David Lonie loniedavid@gmail.com wrote:

Hi Konstantin,

On Wed, May 12, 2010 at 8:56 AM, Konstantin Tokarev
annulen@yandex.ru wrote:

I’ve overridden built-in install target of CMake. Probably, it’ll be
better to call new target “install-package” or something alike, than
make install will work as it worked before. Do you like this
solution?

That would be a very reasonable solution.

Target install is now install_package, and install does direct
installation as it did before


Regards,
Konstantin