'aptly snapshot pull' creates random results #100

Closed
hekr82 opened this Issue Aug 27, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@hekr82

hekr82 commented Aug 27, 2014

In my aptly (v0.7.1) I have created a snapshot from a mirror (architecture="i386") of Debian Wheezy repository:

# aptly snapshot show debian-i386-wheezy-base-20140715
Name: debian-i386-wheezy-base-20140715
Created At: 2014-07-15 06:01:21 CEST
Description: Snapshot from mirror [debian-i386-wheezy-base]: http://ftp.debian.org/debian/ wheezy
Number of packages: 36721

I like to pull some packages including dependencies from this snapshot into an empty snapshot.
If i call the same command severeal times the result will be a random set of packages:

You can do a simple test with 'linux-image':

# aptly snapshot pull empty debian-i386-wheezy-base-20140715 test linux-image
...
# aptly snapshot show test
Name: test
Created At: 2014-08-27 09:18:51 CEST
Description: Pulled into 'empty' with 'debian-i386-wheezy-base-20140715' as source, pull request was: 'linux-image'
Number of packages: 64
# aptly snapshot drop test

# aptly snapshot pull empty debian-i386-wheezy-base-20140715 test linux-image
...
# aptly snapshot show test
Name: test
Created At: 2014-08-27 09:18:11 CEST
Description: Pulled into 'empty' with 'debian-i386-wheezy-base-20140715' as source, pull request was: 'linux-image'
Number of packages: 68

Not only the Number of packages is different.
There are 4 additional packages in the first run, which are not included in the second.
There are 8 additional packages in the second run, which are not included in the first one.

Calling aptly snapshot verify test in both cases returns only missing dependencies for [amd64].

Regards,

Hermann

@smira

This comment has been minimized.

Show comment
Hide comment
@smira

smira Aug 27, 2014

Member

@hekr82 I'm currently looking into the same issue. I haven't got to the root of that, but that seems to be the problem of going through the list of dependencies with variants (like a | b) where depending on the order of processing aptly might choose different packages to satisfy dependencies. I need more time to dig into that.

Member

smira commented Aug 27, 2014

@hekr82 I'm currently looking into the same issue. I haven't got to the root of that, but that seems to be the problem of going through the list of dependencies with variants (like a | b) where depending on the order of processing aptly might choose different packages to satisfy dependencies. I need more time to dig into that.

@smira

This comment has been minimized.

Show comment
Hide comment
@smira

smira Aug 28, 2014

Member

@hekr82 I've pushed a fix to master branch that makes dependency resolution more deterministic, i.e. it should not yield different results each run.

I can't say that algorithm is perfect, it should work better for simple cases (like pulling several packages from backports into main distribution). Pulling into empty snapshot (when no dependencies are satisfied) is the hardest case :)

Please let me know if it works for you.

Member

smira commented Aug 28, 2014

@hekr82 I've pushed a fix to master branch that makes dependency resolution more deterministic, i.e. it should not yield different results each run.

I can't say that algorithm is perfect, it should work better for simple cases (like pulling several packages from backports into main distribution). Pulling into empty snapshot (when no dependencies are satisfied) is the hardest case :)

Please let me know if it works for you.

@smira smira closed this Aug 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment