Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Stefan Pendl

Am 26.10.2012 15:22, schrieb Carlos R. Pasqualini:

Hi there

Is there a way to specify a negative dependency in the package
definition

i want to say:
if package XY is found (installed), then do not even try to install
this package, just wait to wpkg to remove the other package, try again
on next reboot

can we do something like that?



Yes, by adding a condition to the dependency. There has been something 
posted a while ago in this regard.



--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Geoff Brown
Reposted from Stefan (as an example):

'---code start (watch for line wraps)

package id=Java name=Java revision=2011.10.22 reboot=false 
priority=10 execute=once
   include package-id=JRE6 os=5\.0\.\d{4}/
   include package-id=JRE7
   condition
   check type=logical condition=not
   check type=host condition=os value=5\.0\.\d{4}/
   /check
   /condition
   /include
/package

'---code end


On Oct 26, 2012, at 10:57 AM, Stefan Pendl wrote:

 Am 26.10.2012 15:22, schrieb Carlos R. Pasqualini:
 Hi there
 
 Is there a way to specify a negative dependency in the package
 definition
 
 i want to say:
 if package XY is found (installed), then do not even try to install
 this package, just wait to wpkg to remove the other package, try again
 on next reboot
 
 can we do something like that?
 
 
 Yes, by adding a condition to the dependency. There has been something posted 
 a while ago in this regard.
 
 
 --
 Stefan P.
 
 Top-posting:
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?
 A: Top-posting.
 Q: What is the most annoying thing in e-mail?
 -
 wpkg-users mailing list archives  
 http://lists.wpkg.org/pipermail/wpkg-users/
 ___
 wpkg-users mailing list
 wpkg-users@lists.wpkg.org
 http://lists.wpkg.org/mailman/listinfo/wpkg-users


---
Geoff Brown
IT Services, SFU Surrey Campus
Phone : 778-782-7472
Cellular: 604-786-7757
IM: geoff...@jabber.sfu.ca
___
Simon Fraser University Surrey
250 - 13450 102nd Avenue
Surrey, BC
V3T 0A3

-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Stefan Pendl

Am 26.10.2012 20:43, schrieb Geoff Brown:

Reposted from Stefan (as an example):

'---code start (watch for line wraps)

package id=Java name=Java revision=2011.10.22 reboot=false priority=10 
execute=once
include package-id=JRE6 os=5\.0\.\d{4}/
include package-id=JRE7
condition
check type=logical condition=not
check type=host condition=os value=5\.0\.\d{4}/
/check
/condition
/include
/package

'---code end



You may want to use a uninstall check for applications.

'---code start (watch for line wraps)

depends package-id=LibreOffice
condition
check type=logical condition=not
check type=uninstall condition=exists
path=Microsoft Office .* /
/check
/condition
/depends

'---code end

--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Carlos R. Pasqualini
El vie, 26-10-2012 a las 20:56 +0200, Stefan Pendl escribió:
 Am 26.10.2012 20:43, schrieb Geoff Brown:
  Reposted from Stefan (as an example):
 
  '---code start (watch for line wraps)
 
  package id=Java name=Java revision=2011.10.22 reboot=false 
  priority=10 execute=once
  include package-id=JRE6 os=5\.0\.\d{4}/
  include package-id=JRE7
  condition
  check type=logical condition=not
  check type=host condition=os value=5\.0\.\d{4}/
  /check
  /condition
  /include
  /package
 
  '---code end
 
 
 You may want to use a uninstall check for applications.
 
 '---code start (watch for line wraps)
 
 depends package-id=LibreOffice
  condition
  check type=logical condition=not
  check type=uninstall condition=exists
  path=Microsoft Office .* /
  /check
  /condition
 /depends
 
 '---code end
 
 --

Thank you guys but it's not exactly what i mean...

As i can see you are saying:

'this package depends on libreoffice unless msoffice is installed'

to be fair, i'm a Debian user since 1998, even before to start
administering windows networks, so i'm taking this dependencies schema
with the schema of Debian's package dependencies on my mind, and to have
all of those dependencies resolved, i think we need more types of
package dependencies; i cannot find the functionality i'm looking for.

See http://wpkg.org/Package_dependencies
We can define only three relationships between packages:

* depend - depends the current package to another specified package. 
* chain - chains another specified package to this package.
* include - includes another specified package in the overall WPKG
process.

And now see:
http://www.debian.org/doc/debian-policy/ch-relationships.html

There we have:

* Depends (include in wpkg)
* Pre-Depends (depends in wpkg)

I can live without
* Recommends, Suggests, Enhances can be obviated in wpkg logic
* Breaks: Packages which break other packages

But i miss, or it would be great to have:
* Conflicts: Conflicting binary packages (libreoffice conflicts Apache
openoffice)
* Provides: Virtual packages (example: libreoffice and msoffice provides
'office_suite', any package depending on 'office_suite' have it's
dependencies ok if they have any of those suites installed)
* Replaces: Overwriting files and replacing packages (libreoffice
replaces msoffice (and provides it too))

What i was asking for in my first email was something like 'conflicts',
but Provides and Replaces can be very usefull too...

I cannot find this functionality in wpkg.js

is it there and i'm just missing how to get it?


Best Regards


-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Stefan Pendl

Am 26.10.2012 21:26, schrieb Carlos R. Pasqualini:


Thank you guys but it's not exactly what i mean...

As i can see you are saying:

'this package depends on libreoffice unless msoffice is installed'



If MS Office is removed, then Libre Office is installed, that was what 
you asked.


I don't think we need to make things more complicated, I have always 
succeeded using the current available dependencies.


Remove the package from the profile of the host and it gets removed, any 
other package being blocked by that package will be installed afterwards.


I don't think one should create complex dependency constructs for 
software deployment.


Assign what is needed to the host and allow installation of additional 
required software through dependencies, that is simple and supported.



--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Carlos R. Pasqualini
El vie, 26-10-2012 a las 21:37 +0200, Stefan Pendl escribió:
 Am 26.10.2012 21:26, schrieb Carlos R. Pasqualini:
 
  Thank you guys but it's not exactly what i mean...
 
  As i can see you are saying:
 
  'this package depends on libreoffice unless msoffice is installed'
 
 
 If MS Office is removed, then Libre Office is installed, that was what 
 you asked.

yes, but you put it on another package's dependencies...
i want a way to say 'libreoffice conflicts with msoffice' in the
libreoffice package definition, and 'msoffice conflicts with
libreoffice' on the msoffice definition.

 I don't think we need to make things more complicated, I have always 
 succeeded using the current available dependencies.

I agree with you on simple and clean dependencies schema, but at least
to me, not every time i can express the dependencies as i think them.


 Remove the package from the profile of the host and it gets removed, any 
 other package being blocked by that package will be installed afterwards.

 I don't think one should create complex dependency constructs for 
 software deployment.

what if i make a mistake when i'm selecting packages in the profile and
selecting two conflicting packages? (very possible when we have profiles
dependencies specified on different files).
Having a conflict statement on the package definition level will reduce
having troubles on user's machines.

 Assign what is needed to the host and allow installation of additional 
 required software through dependencies, that is simple and supported.

I think i'll need re-think all this issue again... may be it's just a
debianism in my head limiting my think capacity


Best Regards

-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users


Re: [wpkg-users] Negative Dependency

2012-10-26 Thread Stefan Pendl

Am 26.10.2012 22:07, schrieb Carlos R. Pasqualini:


yes, but you put it on another package's dependencies...
i want a way to say 'libreoffice conflicts with msoffice' in the
libreoffice package definition, and 'msoffice conflicts with
libreoffice' on the msoffice definition.



So the check might be moved one level up into the profile and the 
package is only added if the other office suite isn't installed.




what if i make a mistake when i'm selecting packages in the profile and
selecting two conflicting packages? (very possible when we have profiles
dependencies specified on different files).
Having a conflict statement on the package definition level will reduce
having troubles on user's machines.



I wouldn't deploy two office suites in one environment, at least there 
should be a difference between departments.


What is the scenario that you envision?

I would think about starting to manage hosts that have already software 
installed, which would result in such a situation.


You may just want to introduce a package OfficeSuites, where you 
include the appropriate office suites based on conditions.

Packages depending on office suites would depend on this particular package.

This is how I manage Java dependencies/inclusions and PDF readers, for 
instance.


This way you will never apply two office suites to one host.


--
Stefan P.

Top-posting:
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
-
wpkg-users mailing list archives  http://lists.wpkg.org/pipermail/wpkg-users/
___
wpkg-users mailing list
wpkg-users@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users