Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow busybox to provide ip/tc #15836

Closed
wants to merge 2 commits into from
Closed

Conversation

CameronNemo
Copy link
Contributor

No description provided.

@Piraty
Copy link
Member

Piraty commented Jun 26, 2020

any reason this is still a draft?

@CameronNemo
Copy link
Contributor Author

@Piraty xbps cannot handle the switch to an alternative.

@CameronNemo CameronNemo closed this Sep 7, 2020
@CameronNemo
Copy link
Contributor Author

I will just wait until XBPS is ready.

@heliocat
Copy link
Contributor

heliocat commented Mar 17, 2021

I wasn't able to replicate this failure using the above patches:

carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ sudo xbps-install -R . iproute2 busybox
Password: 

Name     Action    Version           New version            Download size
iproute2 update    5.11.0_1          5.11.0_2               - 
busybox  update    1.32.1_1          1.32.1_2               - 

Size required on disk:        3975KB
Space available on disk:        14GB

Do you want to continue? [Y/n] 

[*] Verifying package integrity
iproute2-5.11.0_2: verifying SHA256 hash...
busybox-1.32.1_2: verifying SHA256 hash...

[*] Collecting package files
iproute2-5.11.0_2: collecting files...
iproute2-5.11.0_1: collecting files...
busybox-1.32.1_2: collecting files...
busybox-1.32.1_1: collecting files...

[*] Unpacking packages
iproute2-5.11.0_1: updating to 5.11.0_2 ...
iproute2-5.11.0_2: unpacking ...
iproute2-5.11.0_2: registered 'ip' alternatives group
Creating 'ip' alternatives group symlink: ip -> /usr/bin/iproute2-ip
iproute2-5.11.0_2: registered 'tc' alternatives group
Creating 'tc' alternatives group symlink: tc -> /usr/bin/iproute2-tc
busybox-1.32.1_1: updating to 1.32.1_2 ...
Removing 'ash' alternatives group symlink: ash
busybox-1.32.1_2: unpacking ...
Creating 'ash' alternatives group symlink: ash -> /usr/bin/busybox
busybox-1.32.1_2: registered 'ip' alternatives group
busybox-1.32.1_2: registered 'tc' alternatives group

[*] Configuring unpacked packages
iproute2-5.11.0_2: configuring ...
iproute2-5.11.0_2: updated successfully.
busybox-1.32.1_2: configuring ...
busybox-1.32.1_2: updated successfully.

0 downloaded, 0 installed, 2 updated, 2 configured, 0 removed.
carbon:~/src/void-linux/void-packages/hostdir/binpkgs/testing$ readlink -f /usr/bin/ip
/usr/bin/iproute2-ip

Also:

ip
 - iproute2 (current)
  - ip:/usr/bin/iproute2-ip
 - busybox
  - ip:/usr/bin/busybox

@CameronNemo
Copy link
Contributor Author

CameronNemo commented Mar 18, 2021

@heliocat you need to make this test case pass: https://github.com/void-linux/xbps/blob/4a5eb8dc87cf08ad919ec6602ef5a70e8514710c/tests/xbps/xbps-alternatives/main_test.sh#L849

Currently it is set to expect failure.

edit: see also void-linux/xbps#253 (comment)

@heliocat
Copy link
Contributor

Shouldn't test "$(readlink -f root/usr/bin/file)" = "pkg-b-file" be test "$(readlink root/usr/bin/file)" = "pkg-b-file"? realpath/readlink -f will fully canonicalize the path and return an absolute which won't then pass the string equality test. I'll give the test a better pass when I've got some more time but I think there are a few logic issues in there.

@heliocat
Copy link
Contributor

OK, I found two problems with the test and one with my own testing methodology. The two test problems are: it shouldn't call readlink -f (noted above), and the casing on pkg-b-file is inconsistent My own testing (the one that successfully upgraded busybox and iproute2 to alternatives-providing versions) was flawed because I did iproute2 in the transaction first which replaced the owned file before installing a new alternative provider. Had I let ordered things alphabetically (or let xbps-install do it automatically) I would have seen the bug.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2021
@CameronNemo CameronNemo deleted the bb-ip branch September 29, 2021 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants