Re: Unable to install custom package using defined dependency version

2017-05-28 Thread Sijis Aviles
On May 27, 2017 3:48 PM, "David Wright" <deb...@lionunicorn.co.uk> wrote:

On Sat 27 May 2017 at 13:51:01 (-0500), Sijis Aviles wrote:
> On May 26, 2017 7:09 PM, I wrote:
>
>> cpp-4.8 and gcc-4.8,
>> python2.7-minimal and python2.7,
>> python3-minimal and python3,
>> etc.
>>
>  Ahh, I didn't realize you suggested to make the package name include the
> version (eg my-app-1.0.5).
>
> That's an interesting approach I didn't think about.
>
> Related, but how do other places do "nightly" build of their packages.

I don't know what they are.

I just thought about this.

I've been uploading these packages under the 'main' component name. What if
I uploaded the packages under a 'nightly-$(date)' component name instead?
In theory if I have my sources.list setup right, the my-app and app-configs
would need to change their package name to include the version. It would
also mean that they only find each other, right?

I haven't tested this theory out.

Sijis


Re: Unable to install custom package using defined dependency version

2017-05-27 Thread Sijis Aviles
On May 26, 2017 7:09 PM, "David Wright"


No, you will type:

$ apt-get install my-app-1.0.5 and it will install app-configs-1.0.5,

$ apt-get install my-app-1.0.6 and it will install app-configs-1.0.6.

Yes, you reported that. That's because you've made it depend on
"package app-configs version 1.0-5~aaa" and not "package app-configs-1.0.5".

> I want to make sure a speciflc my-app version installs only a specific
> app-configs version.

I don't know how to write it any clearer, so perhaps I should just
tell you to examine how your system deals with, eg,

cpp-4.8 and gcc-4.8,
python2.7-minimal and python2.7,
python3-minimal and python3,
etc.

Examine your /var/lib/dpkg/status file's "Package:" and "Depends:" lines.

Cheers,
David.

 Ahh, I didn't realize you suggested to make the package name include the
version (eg my-app-1.0.5).

That's an interesting approach I didn't think about.

Related, but how do other places do "nightly" build of their packages. Do
they also include the version as part of the package name itself.

Thanks for all the advice. This has made me rethink a few things.

Sijis


Re: Unable to install custom package using defined dependency version

2017-05-26 Thread Sijis Aviles
On Fri, May 26, 2017 at 12:42 PM, David Wright 
wrote:

> Why not just copy the x.y.x version into the package name,
> and then add 1 to allow for updates/corrections. That way,
> you can even have both versions coexist.
>
> app-configs-1.0.5   1.0.5-1
> app-configs-1.0.6   1.0.6-1
>
> à la
>
> cpp-4.7 4.7.4-3
> cpp-4.8 4.8.4-1
> cpp-4.9 4.9.2-10
>
> and many other packages.
>
> Cheers,
> David.
>
>
Thanks for the suggestion. I suppose we could change the versioning to
app-configs-1.0.5-1 and so forth.

I would speculate though that I may still run into my original issue where
I need my-app's control file to depend on a specific version of
app-configs, even though there are multiple available versions (and likely
higher versions) in the repository.

Essentially I'm trying to get the following working:

my-app-1.0.5 requires app-configs-1.0.5
my-app-1.0.6 requires app-configs-1.0.6

So when i type:
$ apt-get install my-app=1.0.5 it installs app-configs-1.0.5.

Currently trying that I get the error:
"my-app : Depends: app-configs (= 1.0-5~aaa) but 1.0-6~ is to be
installed."

I want to make sure a speciflc my-app version installs only a specific
app-configs version.

Sijis


Re: Unable to install custom package using defined dependency version

2017-05-26 Thread Sijis Aviles
On Fri, May 26, 2017 at 9:16 AM, Frank  wrote:


>> If I understand what you say, only 1 version of app-configs should
>> be available in the debian repo in order for this to work.
>>
>
> Simply put: in any particular repository the most recent version of the
> dependency should be compatible with the most recent version of the main
> package.
>

In our case, the latest versions of each would be compatible.

I guess we are trying to basically pair my-app 1.0.5 with a app-configs
1.0.5 version and my-app 1.0.6 with a 1.0.6 app-config version, and so on.
(The version will probably differ a bit and won't match exactly but you
probably get the point).

In my ideal workflow, i would do the following (assume 1.0.6 is hte latest
version)

$ apt-get install my-app
This installs my-app 1.0.6 and app-configs 1.0.6

$apt-get install my-app=1.0.5
This install my-app 1.0.5 and app-configs 1.0.5

I was trying to use the control file in an attempt to pair those packages
together, which doesn't appear its possible.

Sijis


Re: Unable to install custom package using defined dependency version

2017-05-26 Thread Sijis Aviles
Frank,

On Fri, May 26, 2017 at 6:54 AM, Frank <zuiderd...@gmx.com> wrote:

> Op 25-05-17 om 23:36 schreef Sijis Aviles:
>
>> It seems that my qualifier of '=' isn't working as I expect. What am I
>> doing
>> wrong?
>>
>
> You appear to assume you can tell apt to ignore a newer version of one
> package by specifying a previous version of that package as a dependency of
> another package. You can't.
>

Oh bummer!


>
> apt will always go for the most recent version mentioned in the package
> list*), unless you explicitely tell it not to in the apt-get install
> command for that package. In this case apt wants to get app-configs
> 1.0-6~, notices my-app needs 1.0-5~aaa and tells you it can't install
> my-app because of that.
>
> I'm not sure what you're aiming for with those two versions of
> app-configs. You can only have one of them installed at a time anyway. If
> the machine you want to install my-app on doesn't need 1.0.6~, you
> could try
>
> apt-get install my-app app-configs=1.0-5~aaa
>

As suggested, I was able to tell apt to install the specific 1.0.5~aaa
package first and then I was able to install 'my-app' in a subsequent
command. This works but its not what I was expecting to do.

What I was trying to do was automatically build 'my-app' and 'app-configs'
(via Jenkins) every day and upload those .deb files to Artifactory in a
single repo. At some point in time (about once a week), I would want to
release 'my-app' and update its control file to use a specified version of
'app-configs' (probably not the latest), then I would use a script to
install this version of 'my-app', which would only require the specific
version of app-configs.

If I understand what you say, only 1 version of app-configs should be
available in the debian repo in order for this to work. If that's the case,
then what are my options? Does each daily build of 'my-app' and
'app-configs' go into a separate repository?

I do find it strange that I was able to use apt-get install
app-configs=1.0.5~aaa but I cannot specificy something similar through a
control file.


> You may have to 'hold' app-configs after that, because apt-get upgrade
> will 'see' the newer version and may want to remove my-app again (I'm not
> absolutely sure about this, as I'm tracking Testing so I always use
> dist-upgrade - which definitely will remove my-app).
>
> Regards,
> Frank
>
>
> *) I'm ignoring 'priority pinning' here, as we're talking about a single
> repository
>
I'm actually quite curious about this, as I was anticipating coping the
'released' my-app and app-configs into a separate repository for 'safer'
keeping.

Thanks again for an advice you can provide.

Sijis


Unable to install custom package using defined dependency version

2017-05-25 Thread Sijis Aviles

Hi,
I have a custom package named 'app-configs' with the following versions 
uploaded to Artifactory: 1.0.5~aaa and 1.0.6~bbb.

In another custom package, named 'my-app', I have the following in the control 
file 

Depends: app-configs (= 1.0.5~aaa)

When I do 'apt-get install my-app', I'm seeing the following message:

"my-app : Depends: app-configs (= 1.0-5~aaa) but 1.0-6~ is to be installed."

I just want to pin 'my-app' to use a specific version of 'app-configs'.

It seems that my qualifier of '=' isn't working as I expect. What am I doing 
wrong?

Thanks,

Sijis

Unable to install custom package using defined dependency version

2017-05-25 Thread Sijis Aviles
Hi,
I have a custom package named 'app-configs' with the following versions
uploaded to Artifactory: 1.0.5~aaa and 1.0.6~bbb.

In another custom package, named 'my-app', I have the following in the
control file

Depends: app-configs (= 1.0.5~aaa)

When I do 'apt-get install my-app', I'm seeing the following message:

"my-app : Depends: app-configs (= 1.0-5~aaa) but 1.0-6~ is to be
installed."

I just want to pin 'my-app' to use a specific version of 'app-configs'.

It seems that my qualifier of '=' isn't working as I expect. What am I
doing wrong?

Thanks,

Sijis