Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Rewrite auto-remove to always auto-remove all orphaned dependencies #6
Conversation
GhostLyrics
added some commits
May 5, 2015
watercrossing
commented
May 12, 2015
|
This works perfectly on 14.04. Thanks! |
Burstaholic
commented
May 13, 2015
|
|
|
Hey, thanks for the branch and sorry for my slow reply. This branch looks great. I'm sitting on the fence a bit about adding a new option or not. Technically this is a behaviour change but given that a) the old feature apparently never worked reliable b) the wording is already talking about removing dependencies I think its fine to merge it. The thing I would like to see is some tests and extraction of the common code, I will look into this now. |
a-detiste
referenced this pull request
May 26, 2015
Merged
check if user is logged in before reboot #2
GhostLyrics
added some commits
May 26, 2015
|
I just cleaned up the code to remove all the pep8 warnings. Sorry for that, don't have python3 on my Mac. Please re-check the early-exit condition in case I was too eager to simplify. Do you have a primer for starting with the tests? |
|
Hey Alexander! Looks like we may have a mid-air collision here :) I pushed what I had in mind for the cleanup here: https://github.com/mvo5/unattended-upgrades/tree/GhostLyrics-debian/jessie, its just extracting some common code. If you could merge that into your branch, that would rock. As for the tests, I have a look as the code is not that great when it comes to testability :/ |
|
Oh and thanks for the pep8 cleanup! |
|
@mvo5 not sure if that was by accident, but in GhostLyrics-debian/jessie you removed the possibility to test removal via |
|
Hi, I'd like to test this, but I don't have any auto-removable package on my systems at the moment and I don't know how to reliably recreate this condition. I tried this
|
|
(where faking upgrades is a simple matter of pinning random things from sid/experimental) |
|
I like to test in a VM with something along the lines of:
The important part here is:
|
|
I added a test in 0ece9e4 that simulates the dependency removal. |
|
If you merge my changes I'm happy to merge your branch (this way its probably easiest). As for the dry-run option. Its fine to call cache_commit() with dry-run, it will not really do anything expect for printing the dpkg commands it would run. So unless I miss someting (quite possible :) my removal of the "if options.dry_run:" should not have done any harm. If I did miss something, please help me to understand what! |
|
Hey a-detiste , another way of testing this is: "sudo apt-get install 2vcard; sudo apt-mark auto 2vcard; sudo ./unattended-upgrades -v" (with auto-removal enabled). This should remove 2vcard again. |
mvo5
merged commit 688698f
into
mvo5:debian/sid
May 26, 2015
|
Thanks again, I resolved the conflicts and merged into the debian/sid branch (which is the master branch for unattended-upgrades). |
With the recent changes, UU now sends empty mails when it has nothing to do. |
|
@a-detiste do you happen to have missed the following?
|
|
Even with |
|
That might be my changes, I will see how/why I broke this. |
|
@a-detiste this 782f9fb should fix the mail issue you see, the problem was that the commit() of a empty change in auto-remove triggers a mail. |
|
And thanks for the testing, please let us know if there is more :) |
|
I got this
|
|
Thanks! Silly me, I keep forgeting that git does not track dirs, I added a On Tue, May 26, 2015 at 2:28 PM, Alexandre Detiste <notifications@github.com
|
|
I'm still getting the "empty" mails. |
|
Now I've got this ;-)
|
|
Thanks! The test should be fixed now and I also changed the code a bit so On Tue, May 26, 2015 at 3:13 PM, Alexandre Detiste <notifications@github.com
|
GhostLyrics
deleted the
GhostLyrics:debian/jessie
branch
May 26, 2015
|
Hi, I had this message pop up and I didn't understood what it meant & I had to read the code. |
|
Thanks, I changed the message in git now. |
GhostLyrics commentedMay 5, 2015
Let me know if this works for you or if I should try to rebuild it into a new parameter (though I’d honestly prefer not to do that).